Announcement detector script - #2441
Open
Su (sushmangupta) wants to merge 1 commit into
Open
Conversation
Developer Docs healthcheckStatus: Completed with |
Contributor
📢 Developer Announcement RecommendationRecommendation: ✅ Recommend Announcement Detected Signals
|
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a GitHub Actions workflow plus a small Node-based analyzer that scans pull request metadata and diffs for “announcement-worthy” signals, then posts (or updates) a recommendation comment on the PR.
Changes:
- Introduces a new PR-triggered workflow to run an announcement detector script.
- Adds a ruleset and detection logic to identify documentation/API/security/performance signals.
- Adds a lightweight GitHub REST client and a reporter to publish/update a PR comment.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| .github/workflows/announcement-detector.yml | New workflow to run the detector on PR events and publish a recommendation comment. |
| .github/scripts/announcement-detector.js | Entry point that loads PR + files, runs detection, and publishes the result. |
| .github/scripts/detector.js | Core detection engine that evaluates PR/files against configured rules. |
| .github/scripts/rules.js | Rule definitions (signals) used to decide whether an announcement is recommended. |
| .github/scripts/reporter.js | Builds and creates/updates the PR comment with the recommendation and signals. |
| .github/scripts/github.js | Minimal GitHub API wrapper used to fetch PR data/files and manage PR comments. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v5 |
Comment on lines
+10
to
+13
| permissions: | ||
| contents: read | ||
| pull-requests: write | ||
|
|
Comment on lines
+14
to
+16
| jobs: | ||
| analyze: | ||
| runs-on: ubuntu-latest |
Comment on lines
+91
to
+97
| async function getFiles(number) { | ||
|
|
||
| return get( | ||
| `${API}/pulls/${number}/files?per_page=100` | ||
| ); | ||
|
|
||
| } |
Comment on lines
+99
to
+105
| async function getComments(number) { | ||
|
|
||
| return get( | ||
| `${API}/issues/${number}/comments` | ||
| ); | ||
|
|
||
| } |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Related links
Checklist
PageRefreferences where relevant..gitbook.yamlif pages were moved, renamed, or deleted..wordlist.txt(and sorted it) if spellcheck flags new legitimate terms.Notes