Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ jobs:
- run: make docs

- run: make docs-insiders
if: github.event.pull_request.head.repo.full_name == github.repository || github.ref == 'refs/heads/main'
if: (github.event.pull_request.head.repo.full_name == github.repository || github.ref == 'refs/heads/main') && github.repository == 'pydantic/pydantic-ai'
env:
PPPR_TOKEN: ${{ secrets.PPPR_TOKEN }}

Expand All @@ -103,7 +103,7 @@ jobs:
test-live:
runs-on: ubuntu-latest
timeout-minutes: 5
if: github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push'
if: (github.event.pull_request.head.repo.full_name == github.repository || github.event_name == 'push') && github.repository == 'pydantic/pydantic-ai'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could this be simplified? I don't know if we still need the github.event.pull_request.head.repo.full_name == github.repository check was was presumably meant to accomplish something similar.

Copy link
Author

@lars20070 lars20070 Nov 11, 2025

Choose a reason for hiding this comment

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

TLDR, I cannot see a simplification. github.event.pull_request.head.repo.full_name == github.repository checks that the PR is from a branch within the base repository (not from a fork).

(1) True when you push a feature branch to your main.
(2) Also true when I push a feature branch from my fork to main in my fork. Say if I want to experiment and not want to clutter your "PR inbox" with my drafts.
(3) False if I push a feature branch from my fork to your main.

The most important use case (3) is covered by the existing code. My new conditional covers (2), and is orthogonal. We cannot remove github.event.pull_request.head.repo.full_name == github.repository.

Alternatively, I can check for the existence of every secret instead, for example secrets.PPPR_TOKEN != ''. But if you introduce a new secret, the code breaks.

steps:
- uses: actions/checkout@v4

Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,5 @@ node_modules/
/test_tmp/
.mcp.json
.claude/
/.cursor/
/.devcontainer/