potiuk opened a new pull request, #77135:
URL: https://github.com/apache/airflow/pull/77135

   Adding `use project ci` by hand has two gaps:
   - The fork CI monitor reacts only on its next run, so a fork `CI passed` 
success posted before the label still lets the pull request merge until then, 
auto-merge included. #76536 merged this way.
   - The label does not start project CI.
   
   #76672 first closed the window with a `pull_request_target` workflow. That 
was dropped because the trigger is being disabled for the repository, and the 
window became a documented limitation.
   
   This adds two maintainer commands, run with the maintainer's own `gh` 
credentials.
   
   **`breeze ci use-project-ci <PR>`** does, in this order:
   1. If the head commit's `CI passed` is a fork CI success, sets it to 
`pending` ("Waiting for project CI (use project ci)"). This is the same status, 
link and description the monitor writes when it releases the pull request, so 
its next run changes nothing. A success that project CI earned is kept.
   2. Adds `use project ci`, and removes `use fork ci` if present.
   3. Closes and reopens the pull request to start project CI. `--no-restart` 
leaves that to the author's next push.
   
   Because the success is withheld before the label is added, there is no 
moment at which the pull request carries the label and can still merge on the 
fork result.
   
   **`breeze ci use-fork-ci <PR>`** removes `use project ci` and adds `use fork 
ci`. The monitor gates the pull request on its next run, and a `CI passed` that 
project CI earned stays.
   
   Both commands:
   - take `--github-repository` and `--dry-run`;
   - refuse a closed pull request;
   - report what they changed.
   
   `GitHubClient` gets a `reopen` method. The commands are documented in 
`dev/breeze/doc/08_ci_tasks.rst`, with regenerated command images. The triage 
guide and the design doc's note on this window are rewritten in #77133. Once 
both are merged, I'll update them to point to `use-project-ci`.
   
   Tested:
   - `dev/breeze/tests/test_fork_ci_pr_move.py` (new) covers the order of the 
writes, the statuses that must not be withheld, label changes, a closed pull 
request, and the commands' arguments and errors. The `reopen` test is in 
`test_fork_ci_github.py`.
   - All breeze tests pass.
   - The command images were regenerated from an uncached build, and the 
option-group check passes.
   - Static checks pass.
   
   Not yet run against a real pull request.
   
   ---
   
   ##### Was generative AI tooling used to co-author this PR?
   
   - [X] Yes — Claude Code (Claude Opus 5)
   
   Generated-by: Claude Code (Claude Opus 5) following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   
   https://claude.ai/code/session_01NyQq9U7i5HhjDgrQ9qd3gq
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to