Reusable cloud connector #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Add author:obs-ux-management label to PRs | |
| on: | |
| pull_request_target: | |
| types: [opened] | |
| jobs: | |
| label-obs-ux-management-team: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| pull-requests: write | |
| contents: read | |
| steps: | |
| - name: Label if author is in the obs-ux-management team | |
| uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1 | |
| with: | |
| script: | | |
| const obsUxManagementTeam = [ | |
| "maryam-saeidi", | |
| "jasonrhodes", | |
| "kdelemme", | |
| "mgiota", | |
| "shahzad31", | |
| "fkanout", | |
| "dominiqueclarke", | |
| "justinkambic", | |
| "cesco-f", | |
| "benakansara", | |
| "baileycash-elastic" | |
| ]; // GitHub usernames | |
| const label = "author:obs-ux-management"; | |
| const author = context.payload.pull_request.user.login; | |
| if (obsUxManagementTeam.includes(author)) { | |
| await github.rest.issues.addLabels({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.payload.pull_request.number, | |
| labels: [label], | |
| }); | |
| } |