Skip to content

Commit

Permalink
Workflow to auto label Pull Request
Browse files Browse the repository at this point in the history
  • Loading branch information
ammallya authored Oct 1, 2024
1 parent 9f43c9f commit 5579604
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Add Label to PR

on:
pull_request:
types: [opened]

jobs:
add-label:
runs-on: ubuntu-latest

steps:
- name: Add label to PR
uses: actions/github-script@v6
with:
script: |
const prNumber = context.payload.pull_request.number;
const label = 'APPROVED_FOR_CI';
await github.issues.addLabels({
...context.repo,
issue_number: prNumber,
labels: [label],
});

0 comments on commit 5579604

Please sign in to comment.