Skip to content

ci(labels): add missing review status to new issues - #1969

Merged
dnlrsls merged 1 commit into
Gentleman-Programming:mainfrom
dnlrsls:ci/issue-1966-fallback-status
Oct 21, 2026
Merged

dnlrsls merged 1 commit into
Gentleman-Programming:mainfrom
dnlrsls:ci/issue-1966-fallback-status

Conversation

@dnlrsls

@dnlrsls dnlrsls commented Oct 21, 2026 •

Copy link
Copy Markdown
Member

🔗 Linked Issue

Closes #1966

🏷️ PR Type

  • type:chore — Maintenance, dependencies, tooling

📝 Summary

  • On issue opening only, fetch current API labels and add only status:needs-review when no status:* label exists.
  • Preserve all existing labels and maintainer decisions; leave all four issue forms untouched.
  • Add regression tests to existing issue-test discovery and document the fallback; no existing CI workflow changes.

📂 Changes

File Change
.github/workflows/issue-status-fallback.yml Pinned github-script v8, issues:write only, no checkout, shell, or untrusted expression interpolation
.github/scripts/issue-status-fallback.test.mjs Execute actual inline script with mocked APIs; verify additions, preserved statuses/labels, current metadata, errors and workflow scope
CONTRIBUTING.md Document fallback and exclusions

🧪 Test Plan

  • RED: node --test .github/scripts/issue-status-fallback.test.mjs — 6 failures before workflow creation, exit 1.
  • Focused: same command — 6 passed, exit 0; independently repeated and parent spot-checked.
  • Affected suite: node --test .github/scripts/*.test.mjs — 366 passed, exit 0; independently repeated.
  • git diff --cached --check before commit — passed; worktree clean after tests/commit.
  • Independent verification — PASS, no blockers.
  • Native four-lens review — approved and exact acknowledgement completed for 87a9436 (review-d80ee0e756389205).
  • GitHub CI full unit/E2E/lint and applicable platform checks — pending actual execution.

No Go behavior changed; broad Go checks are left to PR CI. actionlint is unavailable locally. Mocked local tests do not prove hosted execution or token capability. This issue-open workflow becomes available only after default-branch integration; no pre-merge live issue mutations attempted.

✅ Contributor Checklist

  • Linked an approved issue with a real assignee.
  • Exactly one type label.
  • Recorded focused regression and affected suite evidence.
  • Recorded additional local checks and missing CI/live proof.
  • Docs updated.
  • Conventional commit; no Co-Authored-By trailers.
  • All changed paths comply with the Transient Artifact Policy.

💬 Notes for Reviewers

Risk: item 5 — new GitHub Actions workflow with issue-label write permission. No inference of approval/type/priority/effort, backfill, label-removal handling, new dependency, settings change or merge.

Known non-blocking API limitation: GET and addLabels are separate requests. A status added concurrently by a maintainer between those requests can leave multiple statuses. This workflow reads fresh metadata, not an atomic singleton guarantee; no broad reconciliation is introduced.

Upstream rejected direct branch creation with GH013 (six required checks expected). This PR follows the documented fork workflow instead; required checks and repository rules remain unchanged.

Summary by CodeRabbit

  • New Features

    • Issues opened outside standard forms automatically receive the status:needs-review label when no status label is present.
    • Existing status labels are preserved, and current labels are checked before updates.
  • Documentation

    • Added guidance describing fallback labeling behavior for issues created through the CLI or API.

@dnlrsls dnlrsls added the type:chore Maintenance/tooling label Oct 21, 2026
@coderabbitai

coderabbitai Bot commented Oct 21, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: Gentleman-Programming/engram/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 56ee11b1-42d2-4eee-8f58-c1822e1f3f03
📥 Commits

Reviewing files that changed from the base of the PR and between 23dbc73 and 87a9436.

📒 Files selected for processing: 3
  • .github/scripts/issue-status-fallback.test.mjs
  • .github/workflows/issue-status-fallback.yml
  • CONTRIBUTING.md

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 3 remain after this review.

📝 Walkthrough

The pull request adds a workflow that checks current labels when an issue opens and adds status:needs-review only if no status:* label exists. It also adds tests for workflow behavior and configuration, and documents the fallback’s scope.

Changes: Issue status fallback

Layer / File(s) Summary
Issue-open fallback labeling and validation
.github/workflows/issue-status-fallback.yml, .github/scripts/issue-status-fallback.test.mjs, CONTRIBUTING.md
The workflow checks current API labels and adds status:needs-review only when no status:* label exists. Tests cover label preservation, API failures, and workflow configuration. The contributor documentation describes the fallback’s scope and exclusions.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~15 minutes

Change: Other

Suggested reviewers: gentleman-programming

Merge Risk: ⚪ Minimal · up to 87a94

The issue-open fallback is ready for normal checks before merging; no actionable merge-blocking risk remains.

Pre-merge checks: Passed 4
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: adding a missing review status to newly opened issues through CI label handling.
Linked Issues check Passed Issue #1966 requirements are met. The workflow triggers only on issues opened, grants issues: write, reads current labels, and adds only status:needs-review when no status:* label exists. It…
Out of Scope Changes check Passed All changed files support issue #1966. The workflow implements the fallback, the tests verify its behavior and scope, and CONTRIBUTING.md documents its operation and exclusions. No unrelated CI work…
Full details: Linked Issues check

Explanation

Issue #1966 requirements are met. The workflow triggers only on issues opened, grants issues: write, reads current labels, and adds only status:needs-review when no status:* label exists. It uses an additive addLabels call, does not read issue content, and does not infer metadata. The diff does not modify the four issue forms. The workflow cannot backfill existing issues or react to later label removal. The new test file executes the actual script and covers missing status, existing statuses, current API metadata, API failures, permissions, trigger scope, and workflow restrictions. CONTRIBUTING.md documents the fallback and exclusions.

Full details: Out of Scope Changes check

Explanation

All changed files support issue #1966. The workflow implements the fallback, the tests verify its behavior and scope, and CONTRIBUTING.md documents its operation and exclusions. No unrelated CI workflow, issue form, label classification, backfill, or reconciliation change appears in the diff.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@dnlrsls
dnlrsls added this pull request to the merge queue Oct 21, 2026
Merged via the queue into Gentleman-Programming:main with commit b60f1d2 Oct 21, 2026
37 of 39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type:chore Maintenance/tooling

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci(labels): add a fallback review status for newly opened issues

1 participant