Skip to content

chore: accept pull requests only from branches of this repository - #267

Merged
aditeyabaral merged 5 commits into
devfrom
chore/same-repo-branches
Nov 13, 2026
Merged

aditeyabaral merged 5 commits into
devfrom
chore/same-repo-branches

Conversation

@aditeyabaral

@aditeyabaral aditeyabaral commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

📌 Description

Contributors now clone pesu-dev/auth, push a branch of their own to it, and open the pull request from that branch to dev, instead of working on a fork. This makes CI enforce that, and updates the docs and the agent instructions to match.

Supersedes #266. Thank you @Vector316I71A for starting this change; this PR builds on it.

Area Change
.github/workflows/ci_checks.yml The PR source checker fails a PR from a fork, from dev or main, or to anything but dev, and says where to ask for write access. Every other job needs it, so a rejected PR runs nothing else. Dependabot's and Copilot's branches are in this repository and still pass
.github/workflows/ci_checks.yml permissions The workflow token is now read-only (contents: read). Fork PRs always got a read-only token, but a branch PR gets the repository's default, which is write, while CI runs the PR's unreviewed code. The image build keeps packages: write, because its reusable workflow asks for it; it pushes nothing on PRs
CONTRIBUTING.md Clone this repository, branch from origin/dev with a name nobody else uses, push to origin; how to get write access; Copilot is assigned here; CI runs the live tests on every PR; PR previews, and never signing in to one with your own credentials
docs/development.md Clone URL; how to re-point a clone made from a fork (with or without an upstream remote); Dependabot follow-ups (a maintainer pushing onto Dependabot's branch also bumps the version, since the Version check runs on that push) and Copilot without forks; the PR source checker; the version check against origin/dev
docs/testing.md Branches of this repository receive the secrets, so CI runs the live tests on every PR except Dependabot's, in the merge queue and on dev
docs/deployment.md New "Pull request previews" section: pesuauth-dev-pr-<number>.onrender.com, staging's environment variables, /health reports staging, never sign in with your own credentials
scripts/run_tests.py A comment that said every PR runs without secrets; now only local runs without .env and Dependabot's PRs do
copilot-setup-steps.yml Runs on pushes to dev only, so a branch with an open PR does not run it twice
.agents/pesudev-skills, .github/agents/ The submodule points at pesu-dev/skills#10 (merged as b8bceb1), which moves AGENTS.md, the skills and the roles to the same flow; release-manager.agent.md is regenerated because that role's description changed

ℹ️ Fixes / Related Issues
Related: #266, pesu-dev/skills#10, pesu-dev/actions#1

🧱 Type of Change

Please indicate the type of changes introduced in your PR. Anything left unchecked will be assumed to be non-relevant

  • 🐛 Bug fix – Non-breaking fix for a functional/logic error
  • ✨ New feature – Adds functionality without breaking existing APIs
  • ⚠️ Breaking change – Introduces backward-incompatible changes (API, schema, etc.)
  • 📝 Documentation update – README, docstrings, OpenAPI tags, etc.
  • 🧪 Test suite change – Adds/updates unit, functional, or integration tests
  • ⚙️ CI/CD pipeline update – Modifies GitHub Actions, pre-commit, or Docker build
  • 🧹 Code quality / Refactor – Improves structure, readability, or style (no functional changes)
  • 🐢 Performance improvement – Speeds up auth, profile retrieval, or reduces I/O
  • 🕵️ Debug/logging enhancement – Adds or improves logging/debug support
  • 🔧 Developer tooling – Scripts, benchmarks, local testing improvements
  • 🔒 Security fix – Addresses auth/session/data validation vulnerabilities
  • 🧰 Dependency update – Updates libraries in pyproject.toml, uv.lock

🧪 How Has This Been Tested?

Please indicate how you tested your changes. Completing all the relevant items on this list is mandatory

  • Unit Tests (tests/unit/)
  • Functional Tests (tests/functional/)
  • Integration Tests (tests/integration/)
  • Manual Testing

⚙️ Test Configuration:

  • OS: Linux
  • Python: 3.14 via uv
  • Docker build tested

uv run pytest tests/unit passed (613). The functional, integration and live tests were not run locally; CI runs the full suite, live tests included, on this PR, since it comes from a branch of this repository. SKIP=pytest uv run pre-commit run --all-files passes, including sync-agents against the new submodule commit, and check_version_bump.py accepts 5.9.0 → 5.10.0.

✅ Checklist

Please indicate the work items you have carried out. Completing all the relevant items on this list is mandatory. Anything left unchecked will be assumed to be non-relevant

  • My code follows the CONTRIBUTING.md guidelines
  • I've performed a self-review of my changes
  • I've added/updated necessary comments and docstrings
  • I've updated relevant docs (README or endpoint docs)
  • No new warnings introduced
  • I've added tests to cover my changes
  • All tests pass locally (scripts/run_tests.py)
  • I've run linting and formatting (pre-commit run --all-files)
  • Docker image builds and runs correctly
  • Changes are backwards compatible (if applicable)
  • Feature flags or .env vars updated (if applicable)
  • I've tested across multiple environments (if applicable)
  • Benchmarks still meet expected performance (scripts/benchmark/benchmark_requests.py)

🛠️ Affected API Behaviour

Please indicate the areas affected by changes introduced in your PR

  • app/app.py – Modified /authenticate route logic
  • app/pesu.py – Updated PESU Academy login or profile handling
  • app/exceptions/ – Error types, their status codes or messages
  • app/metrics/ – Metrics collection, exposition or the /metrics token
  • app/docs/ – OpenAPI (Swagger) examples and descriptions

🧩 Models

  • app/models/request.py – Input validation or request schema changes
  • app/models/response.py – Authentication response formatting
  • app/models/profile.py – Profile response schema
  • app/models/upstream.py – Parsing of PESU Academy's login and profile responses

🐳 DevOps & Config

  • Dockerfile – Changes to base image or build process
  • .github/workflows/*.yml – CI/CD pipeline or deployment updates
  • pyproject.toml / uv.lock – Dependency version changes
  • .pre-commit-config.yaml – Linting or formatting hook changes
  • .github/scripts/check_version_bump.py – The CI version check

📊 Benchmarks & Analysis

  • scripts/benchmark/benchmark_requests.py – Performance or latency measurement changes
  • scripts/benchmark/analyze_benchmark.py – Benchmark result analysis changes
  • scripts/run_tests.py – Custom test runner logic or behavior updates (a comment only)

📸 Screenshots / API Demos (if applicable)

No API change.

🧠 Additional Notes (if applicable)

  • Submodule: chore: take pull requests from branches of each repository instead of forks skills#10 is merged, and .agents/pesudev-skills points at its squash commit, b8bceb1.
  • Version: 5.10.0, a minor bump by default. There is no API change, so 5.9.1 also fits if you prefer a patch for CI and docs work.
  • Settings this needs, outside the PR: new contributors must be added to developer-team before they can push. Please confirm the "ask in #pesu-auth on PESU Discord" wording in CONTRIBUTING.
  • Consequences of branches in this repository:
    • Every writer's branch workflows can read every secret the repository can use: TEST_*, but also RENDER_API_KEY, DOCKER_* and the org's RELEASE_BOT_*. TEST_* is accepted so that live tests run on PRs; moving the deploy and release secrets into the staging/production environments would take the rest out of reach.
    • Every PR gets a Render preview that shares staging's environment variables. This is kept, and documented here.

🤖 Generated with Claude Code

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.
…s 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.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

An organization owner can choose the repository organization as the billing source for reviews requested by members with a paid Copilot license. Learn about Copilot code review billing.

- 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.
The submodule pointed at the branch commit of pesu-dev/skills#10. Its squash merge, b8bceb1, has
the same tree, so nothing else changes.
@aditeyabaral
aditeyabaral temporarily deployed to chore/same-repo-branches - pesuauth-dev PR #267 November 13, 2026 05:36 — with Render Destroyed

@Vector316I71A Vector316I71A left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@aditeyabaral
aditeyabaral added this pull request to the merge queue Nov 13, 2026
Merged via the queue into dev with commit fc491f9 Nov 13, 2026
8 checks passed
@aditeyabaral
aditeyabaral deleted the chore/same-repo-branches branch November 13, 2026 07:08

This branch was successfully deployed

No deployments
chore/same-repo-branches - pesuauth-dev PR #267 — d7cece80 Deployed Nov 13, 2026 by aditeyabaral
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.

4 participants