mirror of
https://github.com/Homebrew/brew.git
synced 2026-08-12 22:29:27 +04:00
Enforce responsible AI contribution policy
- Keep commit history tied to accountable human contributors - Ensure reviewers engage directly with responsible contributors
This commit is contained in:
@@ -22,6 +22,8 @@ body:
|
||||
required: true
|
||||
- label: This issue's title and/or description do not reference a single formula e.g. `brew install wget`. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.
|
||||
required: true
|
||||
- label: I did not use AI/LLM to create this issue, or I disclosed the tool and model used; I will answer maintainer questions myself without AI/LLM.
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
render: shell
|
||||
|
||||
@@ -12,6 +12,8 @@ body:
|
||||
options:
|
||||
- label: This issue's title and/or description do not reference a single formula e.g. `brew install wget`. If they do, open an issue at https://github.com/Homebrew/homebrew-core/issues/new/choose instead.
|
||||
required: true
|
||||
- label: I did not use AI/LLM to create this issue, or I disclosed the tool and model used; I will answer maintainer questions myself without AI/LLM.
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Provide a detailed description of the proposed feature
|
||||
|
||||
@@ -14,8 +14,8 @@
|
||||
|
||||
-----
|
||||
|
||||
- [ ] AI was used to generate or assist with generating this PR.
|
||||
- [ ] I did not use AI/LLM to create this PR, or I disclosed the tool/model below and reviewed its output; I did not attribute commits to AI and will answer maintainer questions and review comments myself without AI/LLM.
|
||||
|
||||
<!-- If ticked, explain below how AI was used and how you verified the changes. Non-maintainers may only have one AI-assisted PR open at a time. See https://docs.brew.sh/Responsible-AI-Usage for guidance. -->
|
||||
<!-- If AI was used, explain below how it was used and how you verified the changes. Non-maintainers may only have one AI-assisted PR open at a time. See https://docs.brew.sh/Responsible-AI-Usage for guidance. -->
|
||||
|
||||
-----
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
name: Commit Style
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: ["**"]
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
check-commit-format:
|
||||
runs-on: ubuntu-slim
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: read
|
||||
statuses: write
|
||||
steps:
|
||||
- name: Check commit format
|
||||
uses: Homebrew/actions/check-commit-format@9af03b7ae3f9e2ae5c174f659d5c3909f7e7dbac # 2026.07.29.1
|
||||
with:
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
check_package_commit_format: false
|
||||
@@ -1,39 +0,0 @@
|
||||
name: Commit Style
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: ["**"]
|
||||
|
||||
permissions: {}
|
||||
|
||||
jobs:
|
||||
reject-conventional-commits:
|
||||
runs-on: ubuntu-slim
|
||||
permissions:
|
||||
contents: read
|
||||
steps:
|
||||
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
|
||||
with:
|
||||
fetch-depth: 25
|
||||
persist-credentials: false
|
||||
|
||||
- name: Check commit titles
|
||||
env:
|
||||
BASE_SHA: ${{ github.event.pull_request.base.sha }}
|
||||
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
pattern='^(feat|fix|chore|refactor|perf|ci)(\([^)]*\))?!?:'
|
||||
violations=()
|
||||
while IFS= read -r title; do
|
||||
if [[ "$title" =~ $pattern ]]; then
|
||||
violations+=("$title")
|
||||
fi
|
||||
done < <(git log --format=%s "${BASE_SHA}..${HEAD_SHA}")
|
||||
if (( ${#violations[@]} > 0 )); then
|
||||
echo "Conventional commit prefixes are not allowed. Found:"
|
||||
printf ' - %s\n' "${violations[@]}"
|
||||
exit 1
|
||||
fi
|
||||
echo "OK — no conventional commit prefixes found."
|
||||
+2
-1
@@ -28,7 +28,8 @@ We allow you to create issues and pull requests with AI/LLM with the following r
|
||||
|
||||
* You must disclose in the initial issue or pull request that you used AI/LLM and what tool/model/etc. you used.
|
||||
* You must review all AI/LLM generated code, prose, etc. content before you ask anyone in Homebrew to review it for you.
|
||||
* You must be able to address all pull request review comments, manually if the AI/LLM cannot do so for you.
|
||||
* You must not attribute a commit to AI/LLM as an author, co-author, committer or signatory, including through an `Assisted-by`, `Co-developed-by` or similar commit trailer.
|
||||
* You must answer all maintainer questions and pull request review comments yourself, without using AI/LLM.
|
||||
* Unless you are a maintainer, you may only have one AI-assisted/generated pull request open at a time.
|
||||
* If you reach the point where you feel unwilling or unable to do the above, please close your issue or pull request.
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
last_review_date: "2026-07-18"
|
||||
last_review_date: "2026-07-26"
|
||||
---
|
||||
|
||||
# How to Open a Homebrew Pull Request
|
||||
@@ -151,7 +151,8 @@ We allow you to create issues and pull requests with AI/LLM with the following r
|
||||
|
||||
* You must disclose in the initial issue or pull request that you used AI/LLM and what tool/model/etc. you used.
|
||||
* You must review all AI/LLM generated code, prose, etc. content before you ask anyone in Homebrew to review it for you.
|
||||
* You must be able to address all pull request review comments, manually if the AI/LLM cannot do so for you.
|
||||
* You must not attribute a commit to AI/LLM as an author, co-author, committer or signatory, including through an `Assisted-by`, `Co-developed-by` or similar commit trailer.
|
||||
* You must answer all maintainer questions and pull request review comments yourself, without using AI/LLM.
|
||||
* If you reach the point where you feel unwilling or unable to do the above, please close your issue or pull request.
|
||||
|
||||
## Following up
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
---
|
||||
last_review_date: "2026-06-10"
|
||||
last_review_date: "2026-07-26"
|
||||
---
|
||||
|
||||
# Responsible AI Usage
|
||||
@@ -15,12 +15,17 @@ These guidelines exist to make Homebrew better rather than shifting work and ris
|
||||
|
||||
AI is not responsible for its output: you are responsible for the output of the AI tools you use.
|
||||
A pull request with your name on it is your work regardless of how much of it an AI wrote.
|
||||
Do not identify an AI tool as an author, co-author, committer or signatory of a commit, including through an `Assisted-by`, `Co-developed-by` or similar commit trailer.
|
||||
Disclose the tool's involvement in the pull request description instead.
|
||||
|
||||
Verify AI output for correctness as you would that of an avatarless GitHub user with no previous contributions.
|
||||
Read it, run it, test it and make sure you understand it.
|
||||
|
||||
Do not ask other humans to review your AI-generated code until you have reviewed it yourself.
|
||||
This is already a requirement in our [Contributing guide](https://github.com/Homebrew/brew/blob/HEAD/CONTRIBUTING.md): you must review all AI/LLM-generated content before asking anyone in Homebrew to review it, and you must be able to address all review comments yourself even when the AI cannot.
|
||||
This is already a requirement in our [Contributing guide](https://github.com/Homebrew/brew/blob/HEAD/CONTRIBUTING.md): you must review all AI/LLM-generated content before asking anyone in Homebrew to review it.
|
||||
|
||||
Answer maintainer questions and pull request review comments yourself without using AI/LLM.
|
||||
Reviewers need to engage directly with the person responsible for the contribution.
|
||||
|
||||
As the [pull request template](https://github.com/Homebrew/brew/blob/HEAD/.github/PULL_REQUEST_TEMPLATE.md) sets out, disclose when AI was used to generate or assist with a pull request and explain how you verified the changes.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user