This is an automated email from the ASF dual-hosted git repository.

potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git


The following commit(s) were added to refs/heads/main by this push:
     new 5eed7c76b69 Add PR creation instructions for AI agents to AGENTS.md 
(#62575)
5eed7c76b69 is described below

commit 5eed7c76b690c6c691b3916a237aae79867f4465
Author: Jarek Potiuk <[email protected]>
AuthorDate: Fri Feb 27 19:08:51 2026 +0100

    Add PR creation instructions for AI agents to AGENTS.md (#62575)
    
    * Add PR creation instructions for AI agents to AGENTS.md
    
    Agents must create PRs via `gh pr create --web` to open the browser
    with the repository's PR template pre-filled. Includes instructions
    to disclose generative AI usage with the Generated-by line.
    
    Co-Authored-By: Claude Opus 4.6 <[email protected]>
    
    * Apply suggestion from @potiuk
    
    ---------
    
    Co-authored-by: Claude Opus 4.6 <[email protected]>
---
 AGENTS.md | 45 +++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/AGENTS.md b/AGENTS.md
index 456a87ca4b2..24f7c001d5f 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -81,6 +81,51 @@ Write commit messages focused on user impact, not 
implementation details.
 Add a newsfragment for user-visible changes:
 `echo "Brief description" > 
airflow-core/newsfragments/{PR_NUMBER}.{bugfix|feature|improvement|doc|misc|significant}.rst`
 
+### Creating Pull Requests
+
+**Always push to the user's fork**, not to the upstream `apache/airflow` repo. 
Never push
+directly to `main`.
+
+Before pushing, determine the GitHub username with `gh api user -q .login` and 
identify the
+user's fork remote from the existing remotes. Run `git remote -v` and look for 
a remote
+pointing to `github.com:<GITHUB_USER>/airflow.git` where `<GITHUB_USER>` is 
**not** `apache`.
+That is the user's fork remote. If no such remote exists, create the fork and 
add it:
+
+```bash
+gh repo fork apache/airflow --remote --remote-name <GITHUB_USER>
+```
+
+Then push the branch to the user's fork remote and open the PR creation page 
in the browser
+with the body pre-filled (including the generative AI disclosure already 
checked):
+
+```bash
+git push -u <GITHUB_USER> <branch-name>
+gh pr create --web --title "Short title (under 70 chars)" --body "$(cat <<'EOF'
+Brief description of the changes.
+
+closes: #ISSUE  (if applicable)
+
+---
+
+##### Was generative AI tooling used to co-author this PR?
+
+- [X] Yes — <Agent Name and Version>
+
+Generated-by: <Agent Name and Version> following [the 
guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#gen-ai-assisted-contributions)
+
+EOF
+)"
+```
+
+The `--web` flag opens the browser so the user can review and submit. The 
`--body` flag
+pre-fills the PR template with the generative AI disclosure already completed.
+
+Remind the user to:
+
+1. Review the PR title — keep it short (under 70 chars) and focused on user 
impact.
+2. Add a brief description of the changes at the top of the body.
+3. Reference related issues when applicable (`closes: #ISSUE` or `related: 
#ISSUE`).
+
 ## Boundaries
 
 - **Ask first**

Reply via email to