diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 4da710499..c38e5bb56 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -1,5 +1,6 @@ +############ Contributing -============ +############ You can contribute to the project in multiple ways: @@ -75,6 +76,9 @@ This creates a clearer project history, and automates our `Releases`_ and change * Bad: ``Update documentation for projects`` * Good: ``docs(projects): update example for saving project attributes`` +Also see the `AI attribution section `_ for +information on attributing contributions from AI. + Coding Style ------------ @@ -90,6 +94,30 @@ To format your code according to our guidelines before committing, run: cd python-gitlab/ tox -e black,isort +.. _ai_attribution_section: + +AI Attribution +-------------- + +When an AI coding assistant contributed meaningfully to a commit (writing or +significantly modifying code, suggesting the fix, generating tests, etc.), +add an ``Assisted-by`` trailer to the commit footer:: + + Assisted-by: : + +Place it alongside any ``Closes:`` or ``BREAKING CHANGE:`` lines. Omit it when +the AI contribution was trivial (e.g. a one-word suggestion or only +autocomplete) or purely mechanical (running linters, reformatting). + +Example:: + + fix(cli): correct the --spam flag + + The --spam flag now says spam three times. + + Closes: #1234 + Assisted-by: Claude:claude-sonnet-4-6 + Running unit tests ------------------ diff --git a/docs/contributing.rst b/docs/contributing.rst new file mode 100644 index 000000000..e582053ea --- /dev/null +++ b/docs/contributing.rst @@ -0,0 +1 @@ +.. include:: ../CONTRIBUTING.rst diff --git a/docs/index.rst b/docs/index.rst index 1d0a0ed53..65d8f3a2e 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -16,6 +16,7 @@ changelog release-notes faq + contributing Indices and tables