Skip to content

chore: fix typo 'accomodate' -> 'accommodate' in install.go #9

chore: fix typo 'accomodate' -> 'accommodate' in install.go

chore: fix typo 'accomodate' -> 'accommodate' in install.go #9

# Post a sticky reminder when a PR is missing a changelog label.
#
# Labels: needs-changelog (user-facing change; add release note in PR description)
# no-changelog (no release note needed)
#
# Authors set one of those labels in the GitHub UI (or maintainers do). That fires
# pull_request labeled events and changelog-label-check.yml re-runs automatically.
name: Changelog label assist
on:
pull_request_target:
types: [opened, reopened, synchronize, labeled, unlabeled]
branches:
- master
- stable/v**
permissions:
pull-requests: write
concurrency:
group: changelog-label-pr-${{ github.event.pull_request.number }}
cancel-in-progress: true
jobs:
assist:
name: Changelog label assist
runs-on: ubuntu-latest
steps:
- name: Harden the runner (Audit all outbound calls)
uses: step-security/harden-runner@a5ad31d6a139d249332a2605b85202e8c0b78450 # v2.19.1
with:
egress-policy: audit
- name: Resolve changelog label state
id: pr_labels
env:
GH_TOKEN: ${{ github.token }}
PR_NUMBER: ${{ github.event.pull_request.number }}
run: |
set -euo pipefail
repo="${{ github.repository }}"
pr="${PR_NUMBER}"
mapfile -t labels < <(gh api "repos/${repo}/pulls/${pr}" --jq '.labels[].name')
has_needs=false
has_no=false
for label in "${labels[@]}"; do
case "$label" in
needs-changelog) has_needs=true ;;
no-changelog) has_no=true ;;
esac
done
if [[ "$has_needs" == false && "$has_no" == false ]]; then
echo "show_reminder=true" >> "$GITHUB_OUTPUT"
else
echo "show_reminder=false" >> "$GITHUB_OUTPUT"
fi
- name: Post sticky changelog reminder
if: steps.pr_labels.outputs.show_reminder == 'true'
uses: marocchino/sticky-pull-request-comment@0ea0beb66eb9baf113663a64ec522f60e49231c0 # v3.0.4
with:
header: changelog-label
number: ${{ github.event.pull_request.number }}
message: |
## Changelog label required
This PR must have exactly one changelog label before it can merge:
- **`needs-changelog`** — user-facing change; add a release-note entry in the PR description (e.g. under a `## Changelog` section)
- **`no-changelog`** — no release note needed; please add a brief rationale in the PR description (e.g. under the changelog question in the PR template)
Set **`needs-changelog`** or **`no-changelog`** on this PR in the GitHub labels panel (right sidebar). That re-runs the required **Changelog label validation** check automatically.
Merge is blocked only until one of these labels is set — release note or rationale text in the PR description is encouraged but not required to merge.
- name: Remove sticky changelog reminder
if: steps.pr_labels.outputs.show_reminder == 'false'
uses: marocchino/sticky-pull-request-comment@0ea0beb66eb9baf113663a64ec522f60e49231c0 # v3.0.4
with:
header: changelog-label
number: ${{ github.event.pull_request.number }}
delete: true