Skip to content

ci: enforce rule zero - block a pull request that references no issue - #29

Merged
phoenix-server merged 1 commit into
mainfrom
fix/require-issue-check
Sep 17, 2026
Merged

phoenix-server merged 1 commit into
mainfrom
fix/require-issue-check

Conversation

@phoenix-server

@phoenix-server phoenix-server commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

Closes #22 — proposal 3 is the last piece.

What was already fixed before this PR

Proposals 1 and 2 landed in #25:

  • .github/workflows/validate.yml runs bash scripts/validate-catalog.sh on every pull_request and on push to main, with fetch-depth: 0 and a read-only token, no deploy step.
  • The validator was extended with exactly the checks the issue named: every schematic-kind pin resolves (commit reachable from history, file present at it, sha256 matches, pin text's version equals the linked file's frontmatter), every modules//scripts//skeleton//templates//assets/ path a spec references exists in the package, and every composes[] name exists in the catalog. Run on main: catalog ok: 19 entries, featured=[...], 18 specs, 21 pins verified.

What this PR adds

Proposal 3, the stronger of the two options: the rule is now enforced instead of softened.

  • .github/workflows/require-issue.yml fails a pull request whose body references no issue (#N), with a check message that cites rule zero and links CONTRIBUTING.md.
  • The job is exempt for OWNER, MEMBER, COLLABORATOR and bots. Rule zero exists so that an outside contributor's idea gets a public discussion before anyone spends effort; someone with push access does not need that gate, and a bot cannot open an issue.
  • CONTRIBUTING.md now names the workflow and states the exemption, so the promise and the automation say the same thing.

Note on proposal 4

Issue #8 (GitHub Pages previews) is superseded, not pending: Cloudflare Pages deploys every PR and comments the preview URL — see the bot comment and the passing Cloudflare Pages check on #19. #8 can be closed.

What is proven live, and what is not

The skip path is proven on this PR: the reference check appears and reports skipping, because the branch was pushed by a collaborator. The fail path is proven only as a shell test (no issue link → exit 1, pasted above): exercising it on GitHub needs a pull request from an account that is not a collaborator, which cannot be arranged from here. Worth a one-off check the next time an outside contribution arrives.

CONTRIBUTING promised that PRs from outside contributors without a prior
issue "are rejected automatically, and the rejection will cite this rule".
Nothing enforced it, and #18 and #19 were merged/opened with no issue at all.

The workflow reads the PR body from the event payload and fails when it has
no `#N`, so the check cites the rule and the PR shows a failing check instead
of a silent merge. Collaborators, the owner and bots are exempt: rule zero is
a gate for contributors who need the public discussion, not for the people
who already run the repository.

CONTRIBUTING's sentence now names the workflow, so the promise and the
automation say the same thing.
@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying agentic-schematics with  Cloudflare Pages  Cloudflare Pages

Latest commit: fb474ce
Status: ✅  Deploy successful!
Preview URL: https://0cab90fb.agentic-schematics.pages.dev
Branch Preview URL: https://fix-require-issue-check.agentic-schematics.pages.dev

View logs

@phoenix-server
phoenix-server merged commit 179218f into main Sep 17, 2026
5 checks passed
@phoenix-server
phoenix-server deleted the fix/require-issue-check branch September 17, 2026 23:23
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.

Nothing runs scripts/validate-catalog.sh, and CONTRIBUTING promises automation that does not exist

2 participants