Skip to content

Commit ce63bfc

Browse files
docs(agents): fix new-contributor detection and tags.yaml/doc drift
- tags.yaml: drop "(or HEAD)" from the changelog prompt; the doc says "never HEAD" and the workflow now matches. - docs/agents/changelog.md: exclude the current release file from the "previous contributors" set used for first-time-contributor detection. The previous globbing on `docs/changelogs/v*.md` swept up the file being generated, so `comm -23` would never report any newcomers. Assisted-By: Claude <[email protected]> Signed-off-by: Myasnikov Daniil <[email protected]>
1 parent 0f9198d commit ce63bfc

2 files changed

Lines changed: 10 additions & 5 deletions

File tree

‎.github/workflows/tags.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,7 +331,7 @@ jobs:
331331
VERSION: ${{ steps.tag.outputs.version }}
332332
run: |
333333
copilot \
334-
--prompt "Generate the release changelog for tag v${VERSION}. The repository is checked out at the v${VERSION} tag commit, so HEAD == the release commit. Use v${VERSION} (or HEAD) as the upper bound when comparing against the previous version — never assume HEAD is on main, because patch releases are cut from release-X.Y branches. Follow the instructions in @docs/agents/changelog.md exactly, including the 'Scope and boundaries' section at the top. Your deliverable is the single file docs/changelogs/v${VERSION}.md — write it and exit; this workflow handles branching, committing, pushing, and opening the PR." \
334+
--prompt "Generate the release changelog for tag v${VERSION}. The repository is checked out at the v${VERSION} tag commit. Use v${VERSION} as the upper bound when comparing against the previous version — never use HEAD, because if the tag is missing locally HEAD may diverge from the release commit. Follow the instructions in @docs/agents/changelog.md exactly, including the 'Scope and boundaries' section at the top. Your deliverable is the single file docs/changelogs/v${VERSION}.md — write it and exit; this workflow handles branching, committing, pushing, and opening the PR." \
335335
--allow-all-tools --allow-all-paths < /dev/null
336336
337337
- name: Create changelog branch and commit

‎docs/agents/changelog.md‎

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -511,8 +511,11 @@ Create a new changelog file in the format matching previous versions:
511511
512512
**Get all previous contributors (to identify new ones):**
513513
```bash
514-
# Extract GitHub usernames from all previous changelogs (filtering out bot/CI accounts)
515-
grep -hoE '\[\*\*@[a-zA-Z0-9_/-]+\*\*\]' docs/changelogs/v*.md | \
514+
# Extract GitHub usernames from all previous changelogs (filtering out bot/CI accounts).
515+
# Exclude the current release file (v<version>.md) — otherwise current contributors
516+
# would also appear in the "previous" set, hiding real first-time contributors.
517+
find docs/changelogs -maxdepth 1 -name 'v*.md' ! -name 'v<version>.md' -print0 | \
518+
xargs -0 grep -hoE '\[\*\*@[a-zA-Z0-9_/-]+\*\*\]' | \
516519
sed -E 's|\[\*\*@||; s|\*\*\]||' | \
517520
grep -viE '^(app/|.*\[bot\]$|cozystack-ci$|github-actions$|dependabot$|renovate$)' | \
518521
sort -u > /tmp/previous_contributors.txt
@@ -526,8 +529,10 @@ Create a new changelog file in the format matching previous versions:
526529
grep -viE '^(app/|.*\[bot\]$|cozystack-ci$|github-actions$|dependabot$|renovate$)' | \
527530
sort -u > /tmp/current_contributors.txt
528531
529-
# Get all previous contributors (filtering out bot/CI accounts)
530-
grep -hoE '\[\*\*@[a-zA-Z0-9_/-]+\*\*\]' docs/changelogs/v*.md | \
532+
# Get all previous contributors, excluding the current release file
533+
# (filtering out bot/CI accounts)
534+
find docs/changelogs -maxdepth 1 -name 'v*.md' ! -name 'v<version>.md' -print0 | \
535+
xargs -0 grep -hoE '\[\*\*@[a-zA-Z0-9_/-]+\*\*\]' | \
531536
sed -E 's|\[\*\*@||; s|\*\*\]||' | \
532537
grep -viE '^(app/|.*\[bot\]$|cozystack-ci$|github-actions$|dependabot$|renovate$)' | \
533538
sort -u > /tmp/all_previous_contributors.txt

0 commit comments

Comments
 (0)