GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — ci: add PR auto-labeler and auto-generated release notes by Wibias · Pull Request #301 · lidge-jun/opencodex Conversation
|
| Prefix | Label |
|---|---|
| feat / feature / perf | enhancement |
| fix / bugfix / hotfix | bug |
| docs / doc | documentation |
| chore / refactor / style / test / ci / build / revert | chore |
If someone edits a PR title and changes the type, the old label is removed and the new one applied. If a PR title has no recognized prefix, the bot posts a one-time comment tagging the PR creator with examples.
.github/release.yml (new)Tells GitHub how to group those labels into release note sections. GitHub reads this file automatically when --generate-notes is used.
.github/workflows/release.yml (updated)Replaces the manual git log commit dump with gh release create --generate-notes. On every release dispatch, GitHub now builds the categorized release notes from merged PR labels instead of a flat commit list.
The old release notes were a raw git log dump — no structure, no categories, hard to read. This makes every release look like the openai/codex releases with zero ongoing maintenance: just label PRs (or let the labeler do it) and dispatch the release workflow.
One label needs to be created manually — the others (bug, documentation, enhancement) already exist in this repo:
gh label create chore --repo lidge-jun/opencodex --color 'e4e669' --description 'Maintenance, refactors, CI, and non-user-facing changes'
package.json on mainversion, set tag to latest, leave dry-run: true first to verifydry-run: falseGitHub will scan all PRs merged since the previous tag, group them by label, and the release page will look like:
## New Features
- Add Cursor Router optimization levels (#296)
- Add DeepSeek provider support (#291)
## Bug Fixes
- Fix auth token refresh loop (#294)
## Chores
- Bump bun to 1.3.15 (#295)
Full Changelog: https://github.com/lidge-jun/opencodex/compare/v0.3.0...v0.4.0
pr-labeler.yml uses pull_request_target so the token has write access even for fork PRspr-labeler.yml uses a pinned SHA for actions/github-scriptrelease.yml follows the GitHub changelog config schemarelease.yml workflow diff is minimal — only the notes generation block changed, all guards and version checks are untouched
Sorry, something went wrong.
There was an error while loading. Please reload this page.
- .github/workflows/pr-labeler.yml: labels PRs from conventional-commit title prefix (feat -> enhancement, fix -> bug, docs -> documentation, chore/refactor/style/test/ci/build/revert -> chore, perf -> enhancement). Runs on pull_request opened/edited/synchronize. No secrets needed. - .github/release.yml: maps those labels to release note section headings (New Features, Bug Fixes, Documentation, Chores, Other Changes). PRs tagged skip-changelog are excluded. - .github/workflows/release.yml: replace manual git-log notes block with --generate-notes so GitHub builds categorized release notes from the label config automatically on every release dispatch. NOTE for repo owner: create a 'chore' label in lidge-jun/opencodex gh label create chore --repo lidge-jun/opencodex --color 'e4e669' --description 'Maintenance, refactors, CI, and non-user-facing changes'
There was an error while loading. Please reload this page.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
📝 WalkthroughWalkthroughAdds automated PR labeling from conventional-commit titles and configures GitHub release notes to group labeled changes while excluding skipped PRs. ChangesRelease automation
Estimated code review effort: 3 (Moderate) | ~20 minutes Suggested reviewers: Sequence Diagram(s)sequenceDiagram
participant GitHub as GitHub PR event
participant Workflow as pr-labeler workflow
participant PRAPI as GitHub PR API
GitHub->>Workflow: Trigger on PR opened, edited, or synchronized
Workflow->>Workflow: Parse conventional-commit title prefix
Workflow->>PRAPI: Read labels and existing bot comments
PRAPI-->>Workflow: Return PR metadata
Workflow->>PRAPI: Remove stale type labels or add detected label
Workflow->>PRAPI: Post prefix nudge comment when needed
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
When no prefix is detected, post a one-time comment tagging the PR creator with examples and a note that the workflow will re-run once the title is updated. Uses an HTML comment marker to avoid posting the same nudge twice on subsequent edits.
pull_request runs in the fork context, where GITHUB_TOKEN is read-only even with write permissions declared. pull_request_target always runs in the base repo context so the token can write labels and comments. Safe here because we never check out fork code.
|
@coderabbitai review |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
✅ Action performedReview finished.
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Here are some automated review suggestions for this pull request.
Reviewed commit: 714cbb6219
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
…title If a PR was labeled 'enhancement' from 'feat: ...' and the author edits the title to remove the prefix, the old label was left behind and would still categorize the PR in release notes. Now clears any managed type label before posting the nudge comment.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
.github/workflows/pr-labeler.yml (1)
58-66: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winDuplicate-comment check doesn't paginate.
listCommentsdefaults to the first page (30 items, oldest first). On a PR that accumulates more than 30 comments, this lookup could still find the marker for typical cases (it's usually posted early), but relying on default pagination is fragile — considergithub.paginateto be safe.♻️ Proposed fix
- const existing = await github.rest.issues.listComments({ - owner: context.repo.owner, - repo: context.repo.repo, - issue_number: pr, - }); - const alreadyCommented = existing.data.some( + const existingComments = await github.paginate(github.rest.issues.listComments, { + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: pr, + }); + const alreadyCommented = existingComments.some( c => c.user.login === 'github-actions[bot]' && c.body.includes('<!-- opencodex-label-nudge -->') );🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/pr-labeler.yml around lines 58 - 66, Update the existing-comments lookup in the labeler workflow to use github.paginate with issues.listComments, ensuring all PR comments are searched for the opencodex-label-nudge marker. Preserve the existing alreadyCommented check and comment-posting behavior.
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/pr-labeler.yml:
- Around line 31-54: Update the PREFIX_TO_LABEL lookup used to compute detected
so inherited Object.prototype names such as constructor, toString, and
hasOwnProperty resolve as no prefix. Use an own-property guard or a
null-prototype mapping before returning the mapped label, while preserving
normal case-insensitive prefix handling and the existing no-prefix branch.
In @.github/workflows/release.yml:
- Around line 289-295: Update the existing-release branch in the release
workflow to generate release notes before invoking gh release edit, then pass
the generated notes via the supported --notes or --notes-file option while
preserving the release title and prerelease behavior. Keep the gh release create
path unchanged.
---
Nitpick comments:
In @.github/workflows/pr-labeler.yml:
- Around line 58-66: Update the existing-comments lookup in the labeler workflow
to use github.paginate with issues.listComments, ensuring all PR comments are
searched for the opencodex-label-nudge marker. Preserve the existing
alreadyCommented check and comment-posting behavior.
Fix all unresolved CodeRabbit comments on this PR:
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: cae5cc9c-31e5-46ed-af5f-eb2f3624f850
.github/release.yml.github/workflows/pr-labeler.yml.github/workflows/release.yml
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
…t notes pr-labeler.yml: use hasOwnProperty guard on PREFIX_TO_LABEL so prefixes like 'constructor' or 'toString' don't resolve to inherited prototype members and blow up the addLabels call. release.yml: gh release edit does not support --generate-notes (only gh release create does). For the edit path, call the GitHub generate-notes API directly and pass the result via --notes-file instead.
…busy PRs listComments returns only the first 30 by default. On a PR with 30+ comments the marker could be on a later page, causing a second nudge. Use github.paginate to fetch all comments before checking.
There was an error while loading. Please reload this page.
|
Post-merge Sol review note: Reverted from |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Combined issue-translator (#299) and issue-deduplicator (#298) into a single issue-triage.yml with deterministic translate→dedup sequencing and split inference/mutation permissions. Rebuilt pr-labeler (#301) with graceful label creation and live title refetch. Updated release.yml with --notes-start-tag for explicit range. Addresses all Sol review findings. Original ideas credited to Wibias. Co-authored-by: Wibias <[email protected]> Based-on: PR #301, PR #298, PR #299
Combined issue-translator (#299) and issue-deduplicator (#298) into a single issue-triage.yml with deterministic translate→dedup sequencing and split inference/mutation permissions per job. Rebuilt pr-labeler (#301) with graceful label creation (creates missing labels instead of failing) and live title refetch before mutation. Added .github/release.yml category config for auto-generated notes. Addresses all Sol review findings: deterministic sequencing, split permissions, label prerequisites, BOM removal, EOF newlines. Co-authored-by: Wibias <[email protected]> Based-on: PR #301, PR #298, PR #299
PR lidge-jun#301 (labeler): missing chore label, release notes range change. PR lidge-jun#298 (dedup): no ordering with translator, prompt injection surface. PR lidge-jun#299 (translator): no sequencing guarantee, prompt injection risk. All three need combined workflow with deterministic sequencing.
Sol reviewed all 10 PRs. Results: - Merged: lidge-jun#286 (500→400), lidge-jun#296 (Cursor Router), lidge-jun#302 (Kiro hardening) - Rebuild-on-dev: lidge-jun#255, lidge-jun#283, lidge-jun#293, lidge-jun#301, lidge-jun#298, lidge-jun#299 - Keep open: lidge-jun#249 (Cloudflare tunnel) Typecheck + full test suite pass (3574/3574) after all merges.
Combined issue-translator (lidge-jun#299) and issue-deduplicator (lidge-jun#298) into a single issue-triage.yml with deterministic translate→dedup sequencing and split inference/mutation permissions. Rebuilt pr-labeler (lidge-jun#301) with graceful label creation and live title refetch. Updated release.yml with --notes-start-tag for explicit range. Addresses all Sol review findings. Original ideas credited to Wibias. Co-authored-by: Wibias <[email protected]> Based-on: PR lidge-jun#301, PR lidge-jun#298, PR lidge-jun#299
Combined issue-translator (lidge-jun#299) and issue-deduplicator (lidge-jun#298) into a single issue-triage.yml with deterministic translate→dedup sequencing and split inference/mutation permissions per job. Rebuilt pr-labeler (lidge-jun#301) with graceful label creation (creates missing labels instead of failing) and live title refetch before mutation. Added .github/release.yml category config for auto-generated notes. Addresses all Sol review findings: deterministic sequencing, split permissions, label prerequisites, BOM removal, EOF newlines. Co-authored-by: Wibias <[email protected]> Based-on: PR lidge-jun#301, PR lidge-jun#298, PR lidge-jun#299
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.