Skip to content

Commit

Permalink
test label action
Browse files Browse the repository at this point in the history
  • Loading branch information
Water-Melon committed Oct 10, 2024
1 parent a199310 commit 7ff6a18
Showing 1 changed file with 3 additions and 26 deletions.
29 changes: 3 additions & 26 deletions .github/workflows/backport.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
name: Backport
on:
pull_request_target:
types: [closed, labeled] # runs when the pull request is closed/merged or labeled (to trigger a backport in hindsight)
pull_request:

permissions:
contents: write # so it can comment
pull-requests: write # so it can create pull requests
Expand All @@ -13,30 +13,7 @@ jobs:
if: github.event.pull_request.merged
steps:
- uses: actions/checkout@v4
- name: Create backport pull requests
uses: korthout/backport-action@924c8170740fa1e3685f69014971f7f251633f53 # v2.4.1
id: backport
with:
github_token: ${{ secrets.PAT }}
pull_title: '[backport -> ${target_branch}] ${pull_title}'
merge_commits: 'skip'
copy_labels_pattern: ^(?!backport ).* # copies all labels except those starting with "backport "
label_pattern: ^backport (release\/[^ ]+)$ # filters for labels starting with "backport " and extracts the branch name
pull_description: |-
Automated backport to `${target_branch}`, triggered by a label in #${pull_number}.
## Original description
${pull_description}
copy_assignees: true
copy_milestone: true
copy_requested_reviewers: true
experimental: >
{
"detect_merge_method": true
}
- name: add label
if: steps.backport.outputs.was_successful == 'false'
uses: actions-ecosystem/action-add-labels@18f1af5e3544586314bbe15c0273249c770b2daf # v1.1.0
uses: Kong/action-add-labels@bump_to_node20
with:
labels: incomplete-backport

0 comments on commit 7ff6a18

Please sign in to comment.