Implement validators to handle different SOFT entity flavors #18
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: CI - Update [bot] PR | |
on: | |
pull_request: | |
types: [opened, reopened] | |
branches: | |
- 'main' | |
jobs: | |
add_skip-changelog_label: | |
name: Add 'skip-changelog' label | |
runs-on: ubuntu-latest | |
if: github.event.pull_request.user.type == 'Bot' | |
permissions: | |
contents: read | |
issues: write | |
pull-requests: write | |
steps: | |
- name: Add 'skip-changelog' label | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
const labels = await github.rest.issues.listLabelsOnIssue({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
issue_number: context.issue.number | |
}) | |
for (const label of labels.data) { | |
if (label.name === 'skip-changelog') { | |
console.log("Label 'skip-changelog' already exists 👌") | |
return // Skip adding the label if it already exists | |
} | |
} | |
await github.rest.issues.addLabels({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
issue_number: context.issue.number, | |
labels: ['skip-changelog'] | |
}) | |
console.log("Label 'skip-changelog' added 🎉") |