<commit_before>.. _docs-contributing:

============
Contributing
============
We'd love to accept your patches and contributions to Pigweed. There are just a
few small guidelines you need to follow. Before making or sending major
changes, please reach out on the `mailing list
<https://groups.google.com/forum/#!forum/pigweed>`_ first to ensure the changes
make sense for upstream. We generally go through a design phase before making
large changes.

Before participating in our community, please take a moment to review our
:ref:`docs-code-of-conduct`. We expect everyone who interacts with the project
to respect these guidelines.

Pigweed contribution overview
-----------------------------

#. One-time contributor setup:

  - Sign the `Contributor License Agreement <https://cla.developers.google.com/>`_.
  - Verify that your Git user email (git config user.email) is either Google
    Account email or an Alternate email for the Google account used to sign
    the CLA (Manage Google account → Personal Info → email)
  - Install the Gerrit commit hook to automatically add a ``Change-Id: ...``
    line to your commit
  - Install the Pigweed presubmit check hook with ``pw presubmit --install``

.. TODO(pwbug/209) inclusive-language: disable

#. Ensure all files include the correct copyright and license headers
#. Include any necessary changes to the documentation
#. Run :ref:`module-pw_presubmit` to detect style or compilation issues before
   uploading
#. Upload the change with ``git push origin HEAD:refs/for/master``
#. Address any reviewer feedback by amending the commit (``git commit --amend``)
#. Submit change to CI builders to merge. If you are not part of Pigweed's
   core team, you can ask the reviewer to add the `+2 CQ` vote, which will
   trigger a rebase and submit once the builders pass
<commit_msg>docs: Add instructions for obtaining a Gerrit cookie<commit_after>.. _docs-contributing:

============
Contributing
============
We'd love to accept your patches and contributions to Pigweed. There are just a
few small guidelines you need to follow. Before making or sending major
changes, please reach out on the `mailing list
<https://groups.google.com/forum/#!forum/pigweed>`_ first to ensure the changes
make sense for upstream. We generally go through a design phase before making
large changes.

Before participating in our community, please take a moment to review our
:ref:`docs-code-of-conduct`. We expect everyone who interacts with the project
to respect these guidelines.

Pigweed contribution overview
-----------------------------

#. One-time contributor setup:

  - Sign the `Contributor License Agreement <https://cla.developers.google.com/>`_.
  - Verify that your Git user email (git config user.email) is either Google
    Account email or an Alternate email for the Google account used to sign
    the CLA (Manage Google account → Personal Info → email)
  - Obtain a login cookie from Gerrit's `new-password <https://pigweed-review.googlesource.com/new-password>`_ page
  - Install the Gerrit commit hook to automatically add a ``Change-Id: ...``
    line to your commit
  - Install the Pigweed presubmit check hook with ``pw presubmit --install``

.. TODO(pwbug/209) inclusive-language: disable

#. Ensure all files include the correct copyright and license headers
#. Include any necessary changes to the documentation
#. Run :ref:`module-pw_presubmit` to detect style or compilation issues before
   uploading
#. Upload the change with ``git push origin HEAD:refs/for/master``
#. Address any reviewer feedback by amending the commit (``git commit --amend``)
#. Submit change to CI builders to merge. If you are not part of Pigweed's
   core team, you can ask the reviewer to add the `+2 CQ` vote, which will
   trigger a rebase and submit once the builders pass

{'fraction_non_alphanumeric': 0.09745873722818968, 'fraction_numerical': 0.002095886822111606, 'mean_word_length': 3.876117496807152, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 5, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1032085', 'n_tokens_mistral': 1029, 'n_tokens_neox': 953, 'n_words': 498}