From fdbfd4b2d8cbb322d5eab6f35b6affc7991fc663 Mon Sep 17 00:00:00 2001 From: Jarek Potiuk Date: Tue, 6 Jan 2026 10:56:03 +0100 Subject: [PATCH 1/4] Add description about Gen-AI contributions to our guide --- contributing-docs/05_pull_requests.rst | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/contributing-docs/05_pull_requests.rst b/contributing-docs/05_pull_requests.rst index a0d41e7ffc353..90dc2c10a3ffe 100644 --- a/contributing-docs/05_pull_requests.rst +++ b/contributing-docs/05_pull_requests.rst @@ -100,6 +100,31 @@ these guidelines: - Adhere to guidelines for commit messages described in this `article `__. This makes the lives of those who come after you (and your future self) a lot easier. +Gen-AI Assisted contributions +----------------------------- + +Generally, it's fine to use Gen-AI tools to help you create Pull Requests for Apache Airflow as long as you +adhere to the following guidelines: + +* Follow the `Apache Software Foundation (ASF) Generative Tooling guideliens `__. +* Ensure that you review and understand all code generated by Gen-AI tools before including it in your PR - + do not blindly trust the generated code. +* Make sure that the generated code adheres to the project's coding standards and best practices described + above +* Make sure to run all relevant static checks and tests locally to verify that the generated code works as + intended and does not introduce any issues. +* State in your PR description that you have used Gen-AI tools to assist in creating the PR. +* Be prepared to explain and justify the use of Gen-AI tools if asked by project maintainers or reviewers. +* Remember that the final responsibility for the code in your PR lies with you, regardless of whether + it was generated by a tool or written by you. +* By contributing code generated by Gen-AI tools, you agree to comply with the project's licensing terms + and any applicable laws and regulations. +* Remember that when you blindly copy & paste hallucinated code from Gen-AI tools, you are not improving your + skills as a developer and you might be introducing security and stability risks to the project and maintainers + when spot such repeated behaviours will close all such PRs and might block the contributor from further + contributions. Your personal reputation goes south with such behaviour, so if your goal is to increase + your value as a developer, avoid such practices. + Requirement to resolve all conversations ---------------------------------------- From 9008ee9c695353775519aaac3396db225a80252d Mon Sep 17 00:00:00 2001 From: Jarek Potiuk Date: Tue, 6 Jan 2026 15:45:51 +0100 Subject: [PATCH 2/4] Update contributing-docs/05_pull_requests.rst Co-authored-by: Pierre Jeambrun --- contributing-docs/05_pull_requests.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/contributing-docs/05_pull_requests.rst b/contributing-docs/05_pull_requests.rst index 90dc2c10a3ffe..bceee5b8d97fc 100644 --- a/contributing-docs/05_pull_requests.rst +++ b/contributing-docs/05_pull_requests.rst @@ -119,11 +119,11 @@ adhere to the following guidelines: it was generated by a tool or written by you. * By contributing code generated by Gen-AI tools, you agree to comply with the project's licensing terms and any applicable laws and regulations. -* Remember that when you blindly copy & paste hallucinated code from Gen-AI tools, you are not improving your - skills as a developer and you might be introducing security and stability risks to the project and maintainers - when spot such repeated behaviours will close all such PRs and might block the contributor from further - contributions. Your personal reputation goes south with such behaviour, so if your goal is to increase - your value as a developer, avoid such practices. +* Blindly copy & pasting code from Gen-AI tools is detrimental as it might introduce security and +stability risks to the project. Maintainers that spot such behaviours will have no choice but to +close the related PRs. It adds extra burden on the maintainers and doesn't help the project. +The contributor reputation is also impacted as maintainers will lose confidence and might block +the user from making further contributions. Requirement to resolve all conversations ---------------------------------------- From 1606c71b8e1baa8f4eb5375ff48e67492a962322 Mon Sep 17 00:00:00 2001 From: Jarek Potiuk Date: Wed, 7 Jan 2026 10:35:21 +0100 Subject: [PATCH 3/4] fixup! Update contributing-docs/05_pull_requests.rst --- .gitattributes | 1 + .github/PULL_REQUEST_TEMPLATE.md | 57 +++++++++++--------------- .pre-commit-config.yaml | 7 +++- contributing-docs/05_pull_requests.rst | 6 +-- 4 files changed, 35 insertions(+), 36 deletions(-) diff --git a/.gitattributes b/.gitattributes index a2bdd2ec133e0..b38c5f047383d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -15,6 +15,7 @@ scripts export-ignore Dockerfile.ci export-ignore CONTRIBUTING.rst export-ignore ISSUE_TRIAGE_PROCESS.rst export-ignore +.github/PULL_REQUEST_TEMPLATE.md export-ignore .asf.yaml export-ignore .bash_completion export-ignore diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index adbee6faeae11..35078652861f7 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,44 +1,37 @@ +Thank you for contributing! - + +## Was generative AI tooling used to co-author this PR? -How to write a good git commit message: -http://chris.beams.io/posts/git-commit/ + +- [ ] Yes (please specify the tool below) + - --- -**^ Add meaningful description above** -Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)** for more information. -In case of fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed. -In case of a new dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x). -In case of backwards incompatible changes please leave a note in a newsfragment file, named `{pr_number}.significant.rst` or `{issue_number}.significant.rst`, in [airflow-core/newsfragments](https://github.com/apache/airflow/tree/main/airflow-core/newsfragments). + +* Read the **[Pull Request Guidelines](https://github.com/apache/airflow/blob/main/contributing-docs/05_pull_requests.rst#pull-request-guidelines)** for more information. +* For fundamental code changes, an Airflow Improvement Proposal ([AIP](https://cwiki.apache.org/confluence/display/AIRFLOW/Airflow+Improvement+Proposals)) is needed. +* When adding dependency, check compliance with the [ASF 3rd Party License Policy](https://www.apache.org/legal/resolved.html#category-x). +* For significant user-facing changes create newsfragment: `{pr_number}.significant.rst` or `{issue_number}.significant.rst`, in [airflow-core/newsfragments](https://github.com/apache/airflow/tree/main/airflow-core/newsfragments). diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cfc3016633229..ad21e5b0aea28 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -54,6 +54,9 @@ repos: ^docs/README\.md$| ^\.github/.*\.md$| ^airflow-core/tests/system/README\.md$ + exclude: + (?x) + .github/PULL_REQUEST_TEMPLATE\.md$ args: - "--maxlevel" - "2" @@ -155,13 +158,15 @@ repos: - id: insert-license name: Add license for all Markdown files files: \.md$ - exclude: PROVIDER_CHANGES.*\.md$ args: - --comment-style - "" - --license-filepath - scripts/ci/license-templates/LICENSE.txt - --fuzzy-match-generates-todo + exclude: + (?x) + .github/PULL_REQUEST_TEMPLATE\.md$ - id: insert-license name: Add license for all other files exclude: ^\.github/.*$ diff --git a/contributing-docs/05_pull_requests.rst b/contributing-docs/05_pull_requests.rst index bceee5b8d97fc..dd15f68239063 100644 --- a/contributing-docs/05_pull_requests.rst +++ b/contributing-docs/05_pull_requests.rst @@ -119,10 +119,10 @@ adhere to the following guidelines: it was generated by a tool or written by you. * By contributing code generated by Gen-AI tools, you agree to comply with the project's licensing terms and any applicable laws and regulations. -* Blindly copy & pasting code from Gen-AI tools is detrimental as it might introduce security and -stability risks to the project. Maintainers that spot such behaviours will have no choice but to +* Blindly copy & pasting code from Gen-AI tools is detrimental as it might introduce security and +stability risks to the project. Maintainers that spot such behaviours will have no choice but to close the related PRs. It adds extra burden on the maintainers and doesn't help the project. -The contributor reputation is also impacted as maintainers will lose confidence and might block +The contributor reputation is also impacted as maintainers will lose confidence and might block the user from making further contributions. Requirement to resolve all conversations From b72829ed4dfc2017c555ca309b887aebcb2ed210 Mon Sep 17 00:00:00 2001 From: Jarek Potiuk Date: Fri, 9 Jan 2026 02:23:11 +0100 Subject: [PATCH 4/4] Update contributing-docs/05_pull_requests.rst Co-authored-by: Jed Cunningham <66968678+jedcunningham@users.noreply.github.com> --- contributing-docs/05_pull_requests.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contributing-docs/05_pull_requests.rst b/contributing-docs/05_pull_requests.rst index dd15f68239063..2375d4b4c13bb 100644 --- a/contributing-docs/05_pull_requests.rst +++ b/contributing-docs/05_pull_requests.rst @@ -122,7 +122,7 @@ adhere to the following guidelines: * Blindly copy & pasting code from Gen-AI tools is detrimental as it might introduce security and stability risks to the project. Maintainers that spot such behaviours will have no choice but to close the related PRs. It adds extra burden on the maintainers and doesn't help the project. -The contributor reputation is also impacted as maintainers will lose confidence and might block +The contributor reputation is also impacted as maintainers will lose confidence and might block the user from making further contributions. Requirement to resolve all conversations