diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 000000000..a9174229b --- /dev/null +++ b/.github/workflows/main.yml @@ -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], + });