...

Text file src/github.com/sigstore/rekor/CONTRIBUTORS.md

Documentation: github.com/sigstore/rekor

     1# Contributing
     2
     3When contributing to this repository, please first discuss the change you wish
     4to make via an [issue](https://github.com/sigstore/rekor/issues).
     5
     6## Pull Request Process
     7
     81. Create an [issue](https://github.com/sigstore/rekor/issues)
     9   outlining the fix or feature.
    102. Fork the rekor repository to your own github account and clone it locally.
    113. Hack on your changes.
    124. Update the README.md with details of changes to any interface, this includes new environment
    13   variables, exposed ports, useful file locations, CLI parameters and
    14   new or changed configuration values.
    155. Correctly format your commit message see [Commit Messages](#Commit Message Guidelines)
    16   below.
    176. Ensure that CI passes, if it fails, fix the failures.
    187. Every pull request requires a review from the [core rekor team](https://github.com/orgs/github.com/sigstore/teams/core-team)
    19   before merging.
    208. If your pull request consists of more than one commit, please squash your
    21   commits as described in [Squash Commits](#Squash Commits)
    22
    23## Commit Message Guidelines
    24
    25We follow the commit formatting recommendations found on [Chris Beams' How to Write a Git Commit Message article]((https://chris.beams.io/posts/git-commit/).
    26
    27Well formed commit messages not only help reviewers understand the nature of
    28the Pull Request, but also assists the release process where commit messages
    29are used to generate release notes.
    30
    31A good example of a commit message would be as follows:
    32
    33```
    34Summarize changes in around 50 characters or less
    35
    36More detailed explanatory text, if necessary. Wrap it to about 72
    37characters or so. In some contexts, the first line is treated as the
    38subject of the commit and the rest of the text as the body. The
    39blank line separating the summary from the body is critical (unless
    40you omit the body entirely); various tools like `log`, `shortlog`
    41and `rebase` can get confused if you run the two together.
    42
    43Explain the problem that this commit is solving. Focus on why you
    44are making this change as opposed to how (the code explains that).
    45Are there side effects or other unintuitive consequences of this
    46change? Here's the place to explain them.
    47
    48Further paragraphs come after blank lines.
    49
    50 - Bullet points are okay, too
    51
    52 - Typically a hyphen or asterisk is used for the bullet, preceded
    53   by a single space, with blank lines in between, but conventions
    54   vary here
    55
    56If you use an issue tracker, put references to them at the bottom,
    57like this:
    58
    59Resolves: #123
    60See also: #456, #789
    61```
    62
    63Note the `Resolves #123` tag, this references the issue raised and allows us to
    64ensure issues are associated and closed when a pull request is merged.
    65
    66Please refer to [the github help page on message types](https://help.github.com/articles/closing-issues-using-keywords/)
    67for a complete list of issue references.
    68
    69## Squash Commits
    70
    71Should your pull request consist of more than one commit (perhaps due to
    72a change being requested during the review cycle), please perform a git squash
    73once a reviewer has approved your pull request.
    74
    75A squash can be performed as follows. Let's say you have the following commits:
    76
    77    initial commit
    78    second commit
    79    final commit
    80
    81Run the command below with the number set to the total commits you wish to
    82squash (in our case 3 commits):
    83
    84    git rebase -i HEAD~3
    85
    86You default text editor will then open up and you will see the following::
    87
    88    pick eb36612 initial commit
    89    pick 9ac8968 second commit
    90    pick a760569 final commit
    91
    92    # Rebase eb1429f..a760569 onto eb1429f (3 commands)
    93
    94We want to rebase on top of our first commit, so we change the other two commits
    95to `squash`:
    96
    97    pick eb36612 initial commit
    98    squash 9ac8968 second commit
    99    squash a760569 final commit
   100
   101After this, should you wish to update your commit message to better summarise
   102all of your pull request, run:
   103
   104    git commit --amend
   105
   106You will then need to force push (assuming your initial commit(s) were posted
   107to github):
   108
   109    git push origin your-branch --force
   110
   111Alternatively, a core member can squash your commits within Github.
   112## Code of Conduct
   113
   114Rekor adheres to and enforces the [Contributor Covenant](http://contributor-covenant.org/version/1/4/) Code of Conduct.
   115Please take a moment to read the [CODE_OF_CONDUCT.md](https://github.com/sigstore/rekor/blob/master/CODE_OF_CONDUCT.md) document.
   116

View as plain text