Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 4 additions & 23 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,10 @@
# actions/labeler config. Adapted from resq-software/npm's format
# (label -> changed-files -> any-glob-to-any-file). This is a Cargo/Anchor
# monorepo whose members are the two on-chain programs; pkg:* labels track
# each program dir, A-* track cross-cutting areas, C-* track categories.
# each program dir and A-* track cross-cutting areas. Change-type C-* labels
# are owned solely by the conventional-title labeler (.github/workflows/
# conventional-title-labeler.yml); keeping them out of this path config so
# actions/labeler's sync-labels:true cannot strip a title-applied C-* label.

# ── Program (package) scope labels ──────────────────────────────────────

Expand Down Expand Up @@ -45,25 +48,3 @@
- any-glob-to-any-file:
- scripts/**/*
- "**/*.sh"

# ── Category labels ─────────────────────────────────────────────────────

"C-Documentation":
- changed-files:
- any-glob-to-any-file:
- "**/*.md"
- docs/**/*

"C-Testing":
- changed-files:
- any-glob-to-any-file:
- "**/tests/**/*"
- scripts/test.sh

"C-Chore":
- changed-files:
- any-glob-to-any-file:
- package.json
- osv-scanner.toml
- .gitignore
- .gitattributes
12 changes: 6 additions & 6 deletions .github/workflows/conventional-title-labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ jobs:
esac
# Converge the title-derived label: on an `edited` re-run the type may have
# changed (feat -> fix) or lost its prefix, so a prior C-* would go stale and
# mis-categorize the release notes. Remove the previously applied change-type
# label before adding the current one. Only the four types below are managed
# here because the path labeler (.github/labeler.yml) never applies them;
# C-Documentation / C-Testing / C-Chore are co-owned by paths and are left
# untouched so this workflow never strips a label the path labeler owns.
exclusive="C-Feature C-Bug C-Performance C-Refactor"
# mis-categorize the release notes. This workflow is the SOLE owner of the
# change-type C-* labels below (the path labeler in .github/labeler.yml owns
# only A-* / pkg:* area labels), so it can safely remove the previously
# applied change-type label before adding the current one without racing
# actions/labeler's sync-labels:true.
exclusive="C-Feature C-Bug C-Performance C-Documentation C-Refactor C-Testing C-Chore"
current="$(gh pr view "$PR" --repo "$GITHUB_REPOSITORY" --json labels --jq '.labels[].name')"
for l in $exclusive; do
if [ "$l" != "$label" ] && printf '%s\n' "$current" | grep -qxF "$l"; then
Expand Down
Loading