Skip to content

PR Guidelines for Golang

Anuj Verma edited this page Jun 4, 2020 · 1 revision

Note: Any PR not adhering to these guidelines will be rejected

Here is one example PR which follows all the below guidelines:

https://github.com/joshsoftware/peerly/pull/178

Make a branch

Please create a separate branch for each issue that you're working on. Branch names should be in following format:

(type)/(short-description)-(tracker issue id)

where type can be one of:

  • feature (a new feature)
  • task (a small enhancement to existing feature, eg: add missing testcases)
  • bugfix (bug fix in any existing merged code)
  • hotfix (hot fix which needs to be deployed urgently)

example: feature/recognition-apis-25

Push Your Code ASAP

  • Push your code as soon as you can
  • Make a pull request as soon as you can and mark the title with a [WIP]. You can create a draft pull request.

Describing the pull request

  • Title

    should precisely summarise the work done in pull request

  • Description

    Description of the pull request should contain the following:

    ***Description***
    [Write a short description of what your pull request does]
    
    ***Acceptance Criteria***
    [Link to pivotal tracker story, github issue, link to external document, or write a description]
    
    ***Anticipated Side-Effects for Upgrades***
    [What types of issues could occur when deploying this change?]
    
    ***Tests Added***
    [Were additional programmatic tests added to support this change?]
    
    ***Manual Testing Needed***
    [Does this change require any additional manual testing?]
    
  • Make sure to assign the pull request to the project maintainer or any other interested parties

  • Assign the pull request to Golang Backend project

  • Make sure to add the go-backend label to pull request

Request Review

Once your pull request is ready, remove the "[WIP]" from the title and/or change it from a draft PR to a regular PR. Project maintainer shall automatically review it then.

Incorporating feedback

If there are any changes requested on your pull request, please add wip label again when you start working on those. Once you complete the changes, remove the wip label so that it can be reviewed again.