Skip to content

chore: take pull requests from branches of each repository instead of forks - #10

Merged
aditeyabaral merged 2 commits into
mainfrom
chore/same-repo-branches
Nov 13, 2026
Merged

aditeyabaral merged 2 commits into
mainfrom
chore/same-repo-branches

Conversation

@aditeyabaral

@aditeyabaral aditeyabaral commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

pesu-dev is moving from fork pull requests to branches of each repository: contributors clone pesu-dev/<repo>, push a branch that is not dev or main, and open the pull request from it. Forks are no longer accepted. This updates this repository's own check and every doc, skill and role that described the fork workflow.

Supersedes #9. Thank you @Vector316I71A for starting this change; this PR builds on it and covers the rest of the repository.

1. This repository's own policy

File Change
.github/workflows/source.yaml A PR must come from a branch of this repository (forks fail) that is not main, and target main. The job is still validate-pr-origin, so the required check on main keeps working
.github/workflows/pre-commit.yaml Runs on pushes to main only, so a push to a branch with an open PR does not run the hooks twice
README.md Clone pesu-dev/<project>; contribute here from a branch of this repository; try an unmerged change with fetch origin <branch> + checkout FETCH_HEAD (a branch here is now fetchable from a project's submodule)
common/AGENTS.md, common/skills/pesu-pr-description The org rule: branches of the repository, not dev/main, to dev (or main where there is no dev); branch names are shared, so push only to your own
README.md, source.yaml Pushing a branch needs write access; the README says to ask on PESU Discord, and the fork rejection points there

2. auth/ (auth's AGENTS.md, skills and roles)

Area Change
Remotes origin is pesu-dev/auth: every upstream/dev, upstream/main and git fetch upstream becomes origin. setup-environment, docs/ci-cd.md and open-pull-request show how to re-point a clone made from a fork
Boundaries Agents push only to branches they created, never to dev or main, and never delete branches (AGENTS.md, autonomous-workflow.md, ci-cd.md, release-manager)
PR source checker Rejects forks, dev/main heads and bases other than dev (ci-cd.md, fix-ci, ci-investigator, open-pull-request). fix-ci: a PR's head cannot change, so a fork PR becomes a new PR from a branch
Live tests Branches of pesu-dev/auth receive the TEST_* secrets, so CI runs the live tests on every PR except Dependabot's (which get no secrets), as the merge queue and dev already did (testing.md, ci-cd.md, fix-ci, implement-feature, definition of done)
Dependabot The Version check skips only runs Dependabot triggers, so a maintainer who pushes regenerated agents onto Dependabot's branch bumps the version too (ci-cd.md, bump-version)
Copilot Assign the issue in pesu-dev/auth; Copilot's PR is the PR; a maintainer may need to approve its runs (autonomous-workflow.md, review-pull-request)
PR previews Render deploys every PR to pesuauth-dev-pr-<n>.onrender.com with pesuauth-dev's environment variables, so its /health reports staging (ci-cd.md, security.md, review-pull-request, diagnose-production)
Security security.md: write access is now the trust boundary, for every secret pesu-dev/auth can use (TEST_*, RENDER_API_KEY, DOCKER_*, the org's RELEASE_BOT_*); CI Checks keeps a read-only token; never sign in to a PR preview with your own credentials (also in review-pull-request)
Known issues The "CONTRIBUTING requires forks but CI does not" entry is gone: the checker now enforces the policy

The release-manager role's description changed, so pesu-dev/auth regenerates its Copilot wrapper when it bumps the submodule. pesu-dev/auth#267 does that, together with the matching CI and docs changes, pointing at this branch's commit until this merges.

Checks

uvx pre-commit run --all-files passes (mdformat re-aligned the edited tables). This PR comes from a branch of this repository, so it runs the new source.yaml against itself.

🤖 Generated with Claude Code

… forks

pesu-dev now has contributors clone pesu-dev/<repo> itself, push a branch that is not dev or main,
and open the pull request from it. Forks are no longer accepted.

This repository's own PR origin check (source.yaml) now requires a branch of this repository and
still rejects main; its job name, validate-pr-origin, is unchanged, so branch protection keeps
working. Pre-Commit Checks runs on pushes to main only, since a push to a branch with an open pull
request would otherwise run it twice.

common/AGENTS.md states the org rule, and the README, pesu-pr-description and every auth doc, skill
and role that described the fork workflow now describe the new one:

- origin is pesu-dev/auth: upstream/dev and upstream/main become origin/dev and origin/main, and
  setup-environment shows how to re-point a clone made from a fork.
- Branch names are shared, so implement-feature checks a name is free, and agents push only to
  branches they created and never to dev or main.
- Same-repository pull requests receive the TEST_* secrets, so CI runs the live tests on every PR
  (as the merge queue and dev already did); testing, fix-ci and the definition of done say so.
- Copilot's cloud agent is assigned in pesu-dev/auth itself; its PR is the PR.
- Render builds a preview of every PR with pesuauth-dev's environment variables, so its /health
  says staging. ci-cd, security, review-pull-request and diagnose-production describe it.
- security.md records that write access is now the trust boundary for the repository's secrets.
- The known issue about CONTRIBUTING requiring forks that CI did not enforce is gone: the PR source
  checker now enforces the policy.

The release-manager role's description changed, so pesu-dev/auth must regenerate its Copilot
wrappers when it bumps the submodule.
- security.md: list every secret a branch's workflow can read, not just TEST_*, and record that
  CI Checks keeps a read-only token; never sign in to a PR preview with your own credentials.
- review-pull-request: previews are for the test account only, and Dependabot's PRs get no
  secrets, so CI has not run the live tests on them.
- ci-cd.md, testing.md, fix-ci: the live tests run on every PR except Dependabot's.
- ci-cd.md, bump-version: the Version check skips only runs Dependabot triggers, so a maintainer
  who pushes regenerated agents onto Dependabot's branch bumps the version too.
- ci-cd.md: how to re-point a fork clone that has no upstream remote.
- common/AGENTS.md: main is advanced only by the production workflow where there is a dev branch,
  and origin checks are not always source.yaml.
- source.yaml, README: the fork rejection says pushing needs write access; README says how to ask.
aditeyabaral added a commit to pesu-dev/auth that referenced this pull request Nov 13, 2026
- ci_checks.yml: pull requests now come from branches of this repository and run their own code
  here, so the workflow token is read-only instead of the repository's write default. The image
  build keeps packages: write, which its reusable workflow asks for (it pushes nothing on PRs).
- ci_checks.yml: the fork rejection says pushing needs write access and where to ask for it.
- CONTRIBUTING, deployment.md: never sign in to a PR preview with your own PESU Academy
  credentials, since it runs unreviewed code.
- testing.md, run_tests.py: Dependabot's pull requests get no secrets and run the reduced suite.
- development.md: a maintainer pushing regenerated agents onto Dependabot's branch also bumps the
  version, and how to re-point a fork clone that has no upstream remote.
- .agents/pesudev-skills: pesu-dev/skills#10 with the same review fixes.
@aditeyabaral
aditeyabaral merged commit b8bceb1 into main Nov 13, 2026
2 checks passed
aditeyabaral added a commit to pesu-dev/auth that referenced this pull request Nov 13, 2026
The submodule pointed at the branch commit of pesu-dev/skills#10. Its squash merge, b8bceb1, has
the same tree, so nothing else changes.
Vector316I71A pushed a commit to Vector316I71A/auth_fix that referenced this pull request Nov 13, 2026
…su-dev#267)

* chore: accept pull requests only from branches of this repository

Contributors now clone pesu-dev/auth, push a branch of their own to it and open the pull request
from that branch, instead of working on a fork.

The PR source checker enforces it: a pull request from a fork, or from dev or main, fails, as does
one that targets anything but dev. Every other job needs the checker, so a rejected pull request
runs nothing else. Dependabot's and Copilot's branches live in this repository and still pass.

CONTRIBUTING, docs/development.md, docs/testing.md and docs/deployment.md describe the new flow:
- clone pesu-dev/auth, branch from origin/dev with a name nobody else uses, push to origin; how to
  re-point a clone made from a fork; how to get write access;
- Copilot's cloud agent is assigned here, and its pull request is the pull request;
- branches of this repository receive the repository's secrets, so CI runs the live tests on every
  pull request, as the merge queue and dev already did;
- Render deploys every pull request to pesuauth-dev-pr-<number>.onrender.com with staging's
  environment variables, so a preview's /health reports staging.

Copilot Setup Steps now runs on pushes to dev only: a branch with an open pull request would
otherwise run it twice, once for the push and once for the pull request.

Verified with SKIP=pytest uv run pre-commit run --all-files and uv run pytest tests/unit (613
passed); the full suite and the live tests run in CI on the pull request.

* chore: update the agent skills for pull requests from branches of this repository

Bumps .agents/pesudev-skills to the pesu-dev/skills change that moves AGENTS.md, the skills and the
roles from forks to branches of pesu-dev/auth (origin/dev instead of upstream/dev, agents push only
to branches they created, live tests in CI on every pull request, PR previews).

The release-manager role's description changed, so its Copilot wrapper is regenerated with
uv run python scripts/sync_agents.py.

* chore: bump version to 5.10.0

* chore: address the review of the move to branches

- ci_checks.yml: pull requests now come from branches of this repository and run their own code
  here, so the workflow token is read-only instead of the repository's write default. The image
  build keeps packages: write, which its reusable workflow asks for (it pushes nothing on PRs).
- ci_checks.yml: the fork rejection says pushing needs write access and where to ask for it.
- CONTRIBUTING, deployment.md: never sign in to a PR preview with your own PESU Academy
  credentials, since it runs unreviewed code.
- testing.md, run_tests.py: Dependabot's pull requests get no secrets and run the reduced suite.
- development.md: a maintainer pushing regenerated agents onto Dependabot's branch also bumps the
  version, and how to re-point a fork clone that has no upstream remote.
- .agents/pesudev-skills: pesu-dev/skills#10 with the same review fixes.

* chore: point .agents/pesudev-skills at pesu-dev/skills#10's merge

The submodule pointed at the branch commit of pesu-dev/skills#10. Its squash merge, b8bceb1, has
the same tree, so nothing else changes.
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.

1 participant