Skip to content

Commit

Permalink
add workflow to label cherry-pick versions on Pre-Commit-CI PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
omkarkhatavkar committed Nov 3, 2023
1 parent 478d177 commit 8e102ea
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/pre_commit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: add cherry-pick version labels to pre-commit-ci pr's

on:
pull_request_target:
types:
- opened
- ready_for_review
- reopened
- synchronize


jobs:
add-labels:
name: apply cherry-pick version labels.
if: github.actor == 'pre-commit-bot'
runs-on: ubuntu-latest
steps:
- name: apply supported version labels to cherry-pick PRs created by the pre-commit-bot.
uses: actions/github-script@v6
with:
github-token: ${{ secrets.CHERRYPICK_PAT }}
script: |
github.rest.issues.addLabels({
issue_number: ${{ steps.cherrypick.outputs.number }},
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['CherryPick', '6.14.z', '6.13.z', '6.12.z']
})

0 comments on commit 8e102ea

Please sign in to comment.