Skip to content

Add Chronus Verify CI workflow and update changelog docs to reference azpysdk changelog#46585

Open
Copilot wants to merge 8 commits into
mainfrom
copilot/update-changelog-for-azpysdk
Open

Add Chronus Verify CI workflow and update changelog docs to reference azpysdk changelog#46585
Copilot wants to merge 8 commits into
mainfrom
copilot/update-changelog-for-azpysdk

Conversation

Copilot AI commented Apr 28, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR delivers what #45803 originally set out to do — CI enforcement of Chronus change descriptions — updated to reflect the azpysdk changelog command that has since been added to the repo.

When a PR fails the check, contributors fix it by running azpysdk changelog add locally and pushing the resulting .chronus/changes/*.md file, or by asking GitHub Copilot to fix the failing check directly from the PR's Checks tab.

What changed since PR #45803

Area #45803 This PR
Package location .github/package.json .github/chronus/package.json (already in repo)
Package manager pnpm npm
Lockfile .github/pnpm-lock.yaml .github/chronus/package-lock.json (already in repo)
User-facing tool npx chronus add azpysdk changelog add (with npx chronus as fallback)

Changes

.github/workflows/chronus-verify.yml (new)

  • Triggers on PRs to main that touch sdk/*/*/**
  • Skips runs from the azure-sdk bot (automated release PRs)
  • Installs pinned Chronus from .github/chronus/package-lock.json via npm ci
  • Runs chronus verify from the repo root
  • On failure: posts a sticky PR comment (main-repo PRs) and an error annotation that point contributors to azpysdk changelog add and to Copilot's fix-the-check option
  • SHA-pinned actions; least-privilege permissions (contents: read, issues: write)

doc/dev/changelog_updates.md (updated)

  • Recommends azpysdk changelog (add / verify / status / create) as the primary tool
  • Keeps npx chronus commands as alternatives for users without azpysdk installed
  • Notes that the CI workflow enforces verification on every qualifying PR, and how to fix a failure (local azpysdk changelog add or Copilot)

On chronus-verify failure, post a sticky PR comment instructing the
contributor to comment '/chronus add [kind]' for a one-click fix.

Add chronus-fix.yml: an issue_comment-triggered workflow that
verifies commenter permissions, rejects fork PRs (security), parses
the requested kind, runs 'chronus add <package> --kind X --message
<PR title>' for each missing package, and pushes the result back to
the PR branch.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ghter perms

- Pin actions/checkout, setup-node, github-script to SHA + version comment.
- chronus-fix: restore .github/chronus from base branch before npm ci/run,
  so PR-head changes to the tooling cannot execute under the write token.
- persist-credentials: false on both checkouts; push uses an explicit
  x-access-token URL only at push time.
- Permissions: verify drops pull-requests:write for issues:write only;
  fix drops pull-requests:write to pull-requests:read.
- Slash command parsed by strict regex; rejects /chronus additive etc.
- Add concurrency groups on both workflows.
- Consolidate 4 small github-script steps into one auth+metadata step.
- Merge 4 terminal reply steps into one always() switch step.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
l0lawrence pushed a commit that referenced this pull request May 1, 2026
Touches sdk/template/azure-template without a chronus changelog entry to
confirm the new chronus-verify workflow posts the sticky one-click-fix
comment. This branch will be closed without merging.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Comment thread .github/workflows/chronus-verify.yml Outdated
…ilot autofix

The custom slash-command bot (chronus-fix.yml) parsed 'chronus verify'
output for sdk/ paths, but verify emits package names, so it could never
detect packages and never added an entry. Per review feedback, drop the
bot entirely and rely on running 'azpysdk changelog add' locally or using
GitHub Copilot to fix the failing check. Reword the Chronus Verify sticky
comment, annotation, and docs accordingly.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@l0lawrence l0lawrence changed the title Add Chronus CI workflow and update changelog docs to reference azpysdk changelog Add Chronus Verify CI workflow and update changelog docs to reference azpysdk changelog Jun 5, 2026
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Comment thread .github/workflows/chronus-verify.yml Outdated
Comment thread .github/workflows/chronus-verify.yml Outdated
Comment on lines +6 to +7
paths:
- "sdk/*/*/**"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If constraining to these paths then this job cannot be made required. Is the intent for this workflow to block PRs?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Initially I dont want this to block prs but eventually yes this should

@l0lawrence

Copy link
Copy Markdown
Member

test run here: #47564

@l0lawrence l0lawrence marked this pull request as ready for review June 19, 2026 18:14
@l0lawrence l0lawrence requested a review from a team as a code owner June 19, 2026 18:14
Copilot AI review requested due to automatic review settings June 19, 2026 18:14
@l0lawrence l0lawrence requested a review from a team as a code owner June 19, 2026 18:14

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds a new GitHub Actions workflow (chronus-verify.yml) that enforces the presence of Chronus change descriptions on pull requests touching SDK package source, and revises doc/dev/changelog_updates.md to promote the in-repo azpysdk changelog commands (add/verify/status/create) as the primary interface, keeping raw npx chronus as a fallback. It builds on the earlier #45803 effort, updated to match the npm-based pinned tooling now committed under .github/chronus.

Changes:

  • New Chronus Verify workflow: triggers on PRs to main matching sdk/*/*/**, skips azure-sdk bot PRs, installs pinned Chronus via npm ci, runs chronus verify, and on failure posts a sticky PR comment (main-repo PRs) plus an error annotation; uses SHA-pinned actions and least-privilege permissions.
  • Documentation rewritten to recommend azpysdk changelog commands and to describe the new CI enforcement and remediation steps.

Notable review findings:

  • The doc and the workflow's failure guidance steer users to azpysdk changelog add, but the azpysdk changelog implementation installs/looks for Chronus under .github, while the pinned deps the workflow uses live in .github/chronus. This mismatch means the recommended remediation command likely won't work until changelog.py is reconciled (the fix is outside this PR's diff).
  • The sticky failure comment is never cleared once the check passes, so a "Missing changelog entry" comment can persist after the issue is fixed.
  • This introduces a repo-wide, potentially merge-blocking CI check and auto-comments on PRs; the predecessor PR explicitly noted partner teams should be pinged before merging.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/chronus-verify.yml New CI workflow enforcing Chronus change descriptions, with sticky comment + annotation on failure.
doc/dev/changelog_updates.md Updated guidance to recommend azpysdk changelog commands and document the new CI enforcement and fix steps.

## Prerequisites

Chronus is distributed as an npm package. To use it, you need [Node.js](https://nodejs.org/) installed (LTS version recommended). You can then run Chronus without a global install using `npx`:
The recommended way to interact with Chronus is through the `azpysdk` CLI, which is already available in this repository's developer environment and handles installing Chronus automatically.
Comment on lines +43 to +45
- name: Post sticky fix-instructions PR comment on failure
if: failure() && steps.verify.conclusion == 'failure' && github.event.pull_request.head.repo.full_name == github.repository
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants