Copy Abilities Adjustments #11776
Workflow file for this run
This file contains 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: validate pr labels | |
on: | |
pull_request_target: | |
types: [labeled, unlabeled, opened, reopened, synchronize, ready_for_review] | |
jobs: | |
check-pr: | |
name: Validate Release Labels | |
runs-on: ubuntu-20.04 | |
steps: | |
# ensure that a semantic version label is present | |
- name: check_semver_labels | |
if: > | |
!(contains(github.event.pull_request.labels.*.name, 'semver:feature') | |
|| contains(github.event.pull_request.labels.*.name, 'semver:patch')) | |
uses: actions/github-script@v3 | |
with: | |
script: | | |
core.setFailed('No semver label was found on this PR!') | |
# ensure that the 'for next beta' label is not present | |
- name: check_for_next_beta_labels | |
if: > | |
contains(github.event.pull_request.labels.*.name, 'for next beta') | |
uses: actions/github-script@v3 | |
with: | |
script: | | |
core.setFailed('This PR is labeled to wait until next beta cycle for release.') | |
# ensure that this is not an unfinished change | |
- name: check_draft_label | |
if: > | |
contains(github.event.pull_request.labels.*.name, 'draft') | |
uses: actions/github-script@v3 | |
with: | |
script: | | |
core.setFailed('This change is still under construction.') | |
# ensure that this change is not under active discussion | |
- name: check_discussion_label | |
if: > | |
contains(github.event.pull_request.labels.*.name, 'discussion ongoing') | |
uses: actions/github-script@v3 | |
with: | |
script: | | |
core.setFailed('This change has not yet been agreed upon.') | |
# ensure that this is not a character change waiting for balance approval | |
- name: check_balance_labels | |
if: > | |
contains(github.event.pull_request.labels.*.name, 'character change') | |
&& !contains(github.event.pull_request.labels.*.name, 'balance approved') | |
uses: actions/github-script@v3 | |
with: | |
script: | | |
core.setFailed('This character change has not been approved for balance yet.') | |
- name: all_is_well | |
run: echo "This PR is in an appropriately labeled state." |