Skip to content

docs(governance): propose communication-protocol rule (Ask/Question/Propose/Alert) #1378

docs(governance): propose communication-protocol rule (Ask/Question/Propose/Alert)

docs(governance): propose communication-protocol rule (Ask/Question/Propose/Alert) #1378

Workflow file for this run

name: PR Labeling
# Story 6.1 - Added concurrency
on:
pull_request_target:
types: [opened, synchronize]
concurrency:
group: pr-labeling-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
label:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Label PR based on files changed
uses: actions/labeler@v6 # v6
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: .github/labeler.yml
sync-labels: true
- name: Check for squad changes and add label
uses: actions/github-script@v9 # v9
with:
script: |
const files = await github.paginate(github.rest.pulls.listFiles, {
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
per_page: 100
});
const hasSquadChanges = files.some(f =>
f.filename.startsWith('squads/') ||
f.previous_filename?.startsWith('squads/')
);
if (hasSquadChanges) {
await github.rest.issues.addLabels({
issue_number: context.payload.pull_request.number,
owner: context.repo.owner,
repo: context.repo.repo,
labels: ['needs-po-review']
});
}