Skip to content

Add org-wide required workflow: PR must reference a Linear issue - #1

Merged
Ryan Zhu (underthestars-zhy) merged 1 commit into
mainfrom
claude/require-linear
Oct 7, 2026
Merged

Ryan Zhu (underthestars-zhy) merged 1 commit into
mainfrom
claude/require-linear

Conversation

@claude

@claude claude Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Requested by Ryan Zhu · Slack thread

Before: PRs can merge without any Linear issue reference.

After: once an org ruleset "Require workflows to pass before merging" points at this file, PRs fail the check unless they reference ENG-123 in title/branch/description, are opened by an allowlisted bot, or carry a no-linear label applied by a maintain/admin user.

How: adds .github/workflows/require-linear.yml, a single actions/github-script job that runs on pull_request (opened/edited/synchronize/reopened/labeled/unlabeled) and merge_group. It always runs and explicitly passes or fails, never skips, so a skipped check can't satisfy the ruleset. It passes immediately for allowlisted bot authors and for merge-queue runs. For a no-linear label, it looks up who applied it most recently in the issue events and checks that person's repo permission. If neither applies, it searches the title, branch name and body for ENG-\d+. This PR changes no org settings. The ruleset still has to be set up separately, as the file header describes.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NsMkr3BJgeq2SmvvuV6cdg


Generated by Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NsMkr3BJgeq2SmvvuV6cdg
@coderabbitai

coderabbitai Bot commented Oct 7, 2026

Copy link
Copy Markdown

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 0d2356f7-bc0c-43fe-aafa-5df54988aae4

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@underthestars-zhy
Ryan Zhu (underthestars-zhy) merged commit 5931ab2 into main Oct 7, 2026
3 checks passed
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.

2 participants