Skip to content

Commit

Permalink
Automatically add internal labels
Browse files Browse the repository at this point in the history
  • Loading branch information
caendesilva committed Mar 16, 2024
1 parent cfd788c commit 1ed0959
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion .github/workflows/label-pull-requests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,16 @@ jobs:
pull-requests: write

steps:
# Todo
# If PR title starts with "Internal: " then add the "Internal" label
- name: Label Internal Pull Requests
if: "startsWith(github.event.pull_request.title, 'Internal: ')"
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.rest.issues.addLabels({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['Internal']
})

0 comments on commit 1ed0959

Please sign in to comment.