github.com/TrueCloudLab/frostfs-api-go/v2@v2.0.0-20230228134343-196241c4e79a/CONTRIBUTING.md (about)

     1  # Contribution guide
     2  
     3  First, thank you for contributing! We love and encourage pull requests from
     4  everyone. Please follow the guidelines:
     5  
     6  - Check the open [issues](https://github.com/TrueCloudLab/frostfs-api-go/issues) and
     7    [pull requests](https://github.com/TrueCloudLab/frostfs-api-go/pulls) for existing
     8    discussions.
     9  
    10  - Open an issue first, to discuss a new feature or enhancement.
    11  
    12  - Open a pull request, and reference the relevant issue(s).
    13  
    14  - Make sure your commits are logically separated and have good comments
    15    explaining the details of your change.
    16  
    17  - After receiving feedback, amend your commits or add new ones as
    18    appropriate.
    19  
    20  - **Have fun!**
    21  
    22  ## Development Workflow
    23  
    24  Start by forking the `frostfs-api-go` repository, make changes in a branch and then
    25  send a pull request. We encourage pull requests to discuss code changes. Here
    26  are the steps in details:
    27  
    28  ### Set up your GitHub Repository
    29  Fork [FrostFS node upstream](https://github.com/TrueCloudLab/frostfs-api-go/fork) source
    30  repository to your own personal repository. Copy the URL of your fork (you will
    31  need it for the `git clone` command below).
    32  
    33  ```sh
    34  $ git clone https://github.com/TrueCloudLab/frostfs-api-go
    35  ```
    36  
    37  ### Set up git remote as ``upstream``
    38  ```sh
    39  $ cd frostfs-api-go
    40  $ git remote add upstream https://github.com/TrueCloudLab/frostfs-api-go
    41  $ git fetch upstream
    42  $ git merge upstream/master
    43  ...
    44  ```
    45  
    46  ### Create your feature branch
    47  Before making code changes, make sure you create a separate branch for these
    48  changes. Maybe you will find it convenient to name branch in
    49  `<type>/<Issue>-<changes_topic>` format.
    50  
    51  ```
    52  $ git checkout -b feature/123-something_awesome
    53  ```
    54  
    55  ### Test your changes
    56  After your code changes, make sure
    57  
    58  - To add test cases for the new code.
    59  - To run `make lint`
    60  - To squash your commits into a single commit or a series of logically separated
    61    commits run `git rebase -i`. It's okay to force update your pull request.
    62  
    63  ### Commit changes
    64  After verification, commit your changes. This is a [great
    65  post](https://chris.beams.io/posts/git-commit/) on how to write useful commit
    66  messages. Try following this template:
    67  
    68  ```
    69  [#Issue] <component> Summary
    70  
    71  Description
    72  
    73  <Macros>
    74  
    75  <Sign-Off>
    76  ```
    77  
    78  ```
    79  $ git commit -am '[#123] Add some feature'
    80  ```
    81  
    82  ### Push to the branch
    83  Push your locally committed changes to the remote origin (your fork)
    84  ```
    85  $ git push origin feature/123-something_awesome
    86  ```
    87  
    88  ### Create a Pull Request
    89  Pull requests can be created via GitHub. Refer to [this
    90  document](https://help.github.com/articles/creating-a-pull-request/) for
    91  detailed steps on how to create a pull request. After a Pull Request gets peer
    92  reviewed and approved, it will be merged.
    93  
    94  ## DCO Sign off
    95  
    96  All authors to the project retain copyright to their work. However, to ensure
    97  that they are only submitting work that they have rights to, we are requiring
    98  everyone to acknowledge this by signing their work.
    99  
   100  Any copyright notices in this repository should specify the authors as "the
   101  contributors".
   102  
   103  To sign your work, just add a line like this at the end of your commit message:
   104  
   105  ```
   106  Signed-off-by: Samii Sakisaka <samii@ivunojikan.co.jp>
   107  ```
   108  
   109  This can easily be done with the `--signoff` option to `git commit`.
   110  
   111  By doing this you state that you can certify the following (from [The Developer
   112  Certificate of Origin](https://developercertificate.org/)):
   113  
   114  ```
   115  Developer Certificate of Origin
   116  Version 1.1
   117  
   118  Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
   119  1 Letterman Drive
   120  Suite D4700
   121  San Francisco, CA, 94129
   122  
   123  Everyone is permitted to copy and distribute verbatim copies of this
   124  license document, but changing it is not allowed.
   125  
   126  
   127  Developer's Certificate of Origin 1.1
   128  
   129  By making a contribution to this project, I certify that:
   130  
   131  (a) The contribution was created in whole or in part by me and I
   132      have the right to submit it under the open source license
   133      indicated in the file; or
   134  
   135  (b) The contribution is based upon previous work that, to the best
   136      of my knowledge, is covered under an appropriate open source
   137      license and I have the right under that license to submit that
   138      work with modifications, whether created in whole or in part
   139      by me, under the same open source license (unless I am
   140      permitted to submit under a different license), as indicated
   141      in the file; or
   142  
   143  (c) The contribution was provided directly to me by some other
   144      person who certified (a), (b) or (c) and I have not modified
   145      it.
   146  
   147  (d) I understand and agree that this project and the contribution
   148      are public and that a record of the contribution (including all
   149      personal information I submit with it, including my sign-off) is
   150      maintained indefinitely and may be redistributed consistent with
   151      this project or the open source license(s) involved.
   152  ```