Skip to content

Commit

Permalink
Merge pull request #452 from hkad98/trivial
Browse files Browse the repository at this point in the history
TRIVIAL: delete branch after back merge

Reviewed-by: Tomas Kouba
             https://github.com/tomaso
  • Loading branch information
gdgate authored Nov 23, 2023
2 parents f037aa4 + d90cad6 commit ae8f951
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/actions/merge/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ inputs:
description: "GitHub token to use for pull/push"
type: string
required: true
delete_branch:
description: "Delete the source branch after merge"
type: boolean
default: false

runs:
using: "composite"
Expand All @@ -49,6 +53,7 @@ runs:
shell: bash
id: push
- name: Create the promote/backmerge PR
id: pr
run: |
gh pr create \
--title "[bot] Merge ${{ inputs.source }}/${{ steps.push.outputs.short }} into ${{ inputs.target }}" \
Expand All @@ -64,3 +69,9 @@ runs:
shell: bash
env:
GH_TOKEN: ${{ inputs.token_pr }}
- name: Delete the source branch
if: ${{ inputs.merge == 'true' && inputs.delete_branch == 'true' }}
run: git push origin -d ${{ steps.push.outputs.branch }}
shell: bash
env:
GH_TOKEN: ${{ inputs.token_pr }}
1 change: 1 addition & 0 deletions .github/workflows/rel-dev-back-merge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ jobs:
target: "rel/dev"
token_pr: ${{ secrets.TOKEN_GITHUB_YENKINS_ADMIN }}
token_push: ${{ secrets.TOKEN_GITHUB_YENKINS_ADMIN }}
delete_branch: true

0 comments on commit ae8f951

Please sign in to comment.