chore: rework contribution policy to issue-first, with CI enforcement - #188
Merged
Merged
Conversation
CONTRIBUTING.md invited pull requests we can never merge. Its "Safe to edit (PRs welcome directly)" list named paths the sync overwrites -- every entry on it except the generated tool files. PR #138's hand-written unit tests were rewritten three commits after merge. Two mechanical traps compounded it: fork CI could not go green (test.yml passed a secret that is empty for forks, and direct.test.ts spawned the real server with no guard), and the documented `pnpm build && pnpm test && pnpm lint` chain hung because `pnpm test` is bare vitest in watch mode. Reframe the guide around issues as the primary contribution path, keep docs and repository tooling genuinely mergeable, and enforce the boundary in CI. Docs - Rewrite CONTRIBUTING.md: state once that tool definitions and the server implementation are synced from Postman's internal source of truth, then spend the document on what contributors can do. Replace the wrong "safe to edit" list with an open-vs-synced table. Correct the test commands, tell people not to run `pnpm build` (it recompiles the committed dist/), and add the missing --learn flag. - Extract SECURITY.md and CODE_OF_CONDUCT.md to root files so GitHub surfaces them; add SUPPORT.md to route usage questions away from the bug tracker. - Add a Contributing section to README.md, which never linked CONTRIBUTING.md. Enforcement - .github/synced-paths.json as the single source of truth, so the docs and the workflow cannot drift. - synced-paths-guard.yml comments once on fork PRs touching synced paths, applies a `synced-path` label, and retracts both if the PR is split. Uses pull_request_target with no checkout of PR-head code and reads its config from the base commit; actions/github-script only, no third-party actions. Advisory, not blocking. - Issue forms for bug reports, tool requests, and docs, each with a Proposed solution field so design proposals keep flowing in. Blank issues disabled. - A PR template that asks about synced paths up front. CI and tooling - Split test.yml into a fork-safe `unit` job (lint, typecheck, unit tests, no secrets) and an `integration` job gated on same-repo PRs and pushes. Add permissions: contents: read and --frozen-lockfile. - Add test:ci, test:unit, and typecheck scripts. - Guard direct.test.ts on POSTMAN_API_KEY. describe.skipIf alone was not enough: the suite imports PostmanAPIClient, which imports src/env.ts, which calls process.exit(1) at module load -- before skipIf can skip anything. Make that one import lazy so the guard works. `vitest run` now passes with no key (2 passed, 2 skipped). This file is synced, so the same change needs to land upstream to survive; test.yml is what keeps fork CI green regardless. - Untrack .idea/workspace.xml, which exposed a maintainer's local path, and extend .gitignore to cover editor and local agent config. Refs PSTAPI-1647 Co-Authored-By: Claude <noreply@anthropic.com>
christosgkoros
requested review from
akinard-postman,
akira28,
alexander-rubia,
garciasdos and
rubenbaraut
as code owners
August 19, 2026 07:22
This was referenced Aug 19, 2026
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.
Refs PSTAPI-1647
Why
CONTRIBUTING.mdinvites pull requests we can never merge. Its "Safe to edit (PRs welcome directly)" list names paths the sync overwrites — every entry on it except the generated tool files. PR #138's hand-written unit tests were rewritten byabebf8bthree commits after merge.Two mechanical traps compound it for a first-time contributor:
test.ymlpassedsecrets.POSTMAN_API_KEY, which is empty for fork PRs, anddirect.test.tsspawned the real server with no guard whilesrc/env.tscallsprocess.exit(1)without a key. A valid docs PR got an unexplained red X.pnpm testis barevitest(watch mode), sopnpm build && pnpm test && pnpm linthangs. Anddist/is committed, so "runpnpm buildbefore pushing" produces a ~180-file diff that contradicts the guide's own "one focused change per PR" rule.This reframes the guide around issues as the primary contribution path, keeps docs and repository tooling genuinely mergeable, and enforces the boundary in CI. It says that tool definitions and the server implementation are synced from Postman's internal source of truth, and nothing about how that pipeline works.
What's in here
Docs
CONTRIBUTING.md: state the constraint once, early, then spend the document on what contributors can do. Replace the incorrect "safe to edit" list with an open-vs-synced table. Correct the test commands, tell people not to runpnpm build, add the missing--learnflag.SECURITY.mdandCODE_OF_CONDUCT.mdto root files so GitHub surfaces them (Security tab, issue sidebar, community profile); addSUPPORT.md.README.md, which never linkedCONTRIBUTING.md.Enforcement
.github/synced-paths.jsonas the single source of truth, so docs and workflow can't drift.synced-paths-guard.ymlcomments once on fork PRs touching synced paths, applies asynced-pathlabel, and retracts both if the PR is split.pull_request_targetwith no checkout of PR-head code, config read from the base commit,actions/github-scriptonly — no third-party actions in a job holding a write token. Advisory, not blocking.CI and tooling
test.ymlinto a fork-safeunitjob (lint, typecheck, unit tests, no secrets) and anintegrationjob gated on same-repo PRs and pushes. Addspermissions: contents: readand--frozen-lockfile.test:ci,test:unit,typecheckscripts..idea/workspace.xmland extend.gitignore.Verification
The new-contributor path passes with
POSTMAN_API_KEYunset:pnpm lintpnpm typecheckpnpm test:unitpnpm test:ciAll 4 issue forms and both workflows parse; the guard's embedded JS passes
node --check. Matcher tested against real data: sync commitb361515→ 261/261 hits, docs-only PR → 0, near-misses (srcfoo.ts,docs/src/x.ts,vitest.config.ts.bak) → 0.Reviewer notes
describe.skipIfalone was not enough fordirect.test.ts. The suite importsPostmanAPIClient, which importssrc/env.ts, which callsprocess.exit(1)at module load — beforeskipIfcan skip anything. Making that one import lazy is what actually fixes it. This file is synced, so the same change needs to land upstream to survive.test.ymlis what keeps fork CI green regardless.package.jsonscripts have to exist before the docs and CI reference them.src/tests/integration/learnToolset.test.tsis intentionally not included — pre-existing untracked file, not part of this change. Note it has a type error thattsconfig.json'sexclude: ["src/tests/**"]currently hides frompnpm typecheck.Before merging
SECURITY.mdhas no acknowledgement SLA — currently "we'll acknowledge and keep you updated", pending real wording from Postman security.synced-pathandneeds-triage.ISSUE_TEMPLATE/config.yml404s until then.pull_request_targetandactions/github-script.test, the rename tounit/integrationbreaks it.--frozen-lockfileis new — it will fail if a sync bumpspackage.jsondeps without regeneratingpnpm-lock.yaml. That's the point, but the first red build shouldn't surprise anyone.Follow-ups (not in this repo)
direct.test.tsguard and lazy import upstream, or the next sync reverts them.src/env.ts:13-15referencesshared/env.ts, a path that doesn't exist here — an internal-monorepo reference in public source. Only fixable upstream.@generatedbanner in the upstream tool templates; no generated file currently carries any in-file warning.Generated with Claude Code