-
Notifications
You must be signed in to change notification settings - Fork 1
review: honour Gerald .github/NOTIFIED in the reviewer #264
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
c6bae6b
[jeresig/review-workflow-notified-144eb8] review: honour Gerald .gith…
jeresig 7d22998
[jeresig/review-workflow-notified-144eb8] review: address NOTIFIED re…
jeresig 4a56602
[jeresig/review-workflow-notified-144eb8] review: polish NOTIFIED per…
jeresig 56c407f
[jeresig/review-workflow-notified-144eb8] review: close NOTIFIED test…
jeresig File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "review": minor | ||
| --- | ||
|
|
||
| Honour Gerald `.github/NOTIFIED` in the reviewer. New `lib/notified.ts` parses the file's `[ON PULL REQUEST]` notify rules (ignoring the documentation preamble above the `----…ignored!----` marker and the `[ON PUSH WITHOUT PULL REQUEST]` section) and matches them against the PR: path globs against the changed-file list, quoted `"/body/flags"` diff regexes against each file's staged unified diff. It groups the matches by `@mention`, carries each rule's label, and renders a ready-to-insert `### Notified` block. On approval, review.md Step 7 runs the CLI (`REVIEW_REPO_ROOT=$GITHUB_WORKSPACE npx -y tsx workflows/review/lib/notified.ts`) and pastes that block into the Review Guidance comment, so a matched person/team is pinged and told the label and which changed files matched them; the notification set feeds the comment's post trigger and its `risksPatternsKey` idempotency signature so a repost re-pings only when the set changes. The matching is a self-contained, practical subset of Gerald's micromatch (`**`, `*`, `?`, `{a,b,c}`, `[…]`, `(a|b)`, `?(…) *(…) +(…) @(…)`) anchored at the repo root, so the lib stays dependency-free (runs under `npx tsx` with no install); it is not a faithful micromatch reimplementation (wildcards match dotfiles, `!(…)` is unsupported — documented in the README). An unsupported glob construct degrades to no match; a malformed rule (bad regex body, unterminated quote) is dropped and surfaces a `Note:` on the PR — never a crashed review. The base-branch copy of `.github/NOTIFIED` is read (like `.github/REVIEWERS`), so a PR cannot inject notify rules that fire before it merges. Delivery of the pings still depends on the workflow's gh-aw `mentions:` allow-list (repository collaborators are allowed by default); the README documents how to widen it for teams. No existing review semantics change; a repo with no `.github/NOTIFIED` gets no section. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.