Skip to content

after_merge_steps

Slava Semushin edited this page Feb 10, 2019 · 14 revisions

What to do after your commit has been merged?

Create tickets for technical debt

Unit tests

When you are modifying code in the *ServiceImpl.java files, you should also add/update unit tests. However, if you didn't provide unit tests then I'm asking you to create an issue for adding them later.

Follow the recommendations:

  • Add a title by a template: <ClassName>.<methodName>(): add unit tests
  • Add labels: techdebt, area/unit tests
  • Fill comment by template: Tech debt for: <commit> (#<issueNumber>)

Hint: for a very trivial methods you can generate unit test by using the following Golang code: https://play.golang.org/p/0XwWR5K7w-V

Hint: you can add special comments to a code that will create issue(s) automatically after a commit with such a comment will be merged.

Example: // @todo #123 CategoryServiceImpl.doSomething(): add unit tests

Integration tests

When you are modifying application behaviour (and especially when it is visible to user) you should also add/update integration tests. However, if you didn't provide integration tests then I'm asking you to create an issue for adding them later.

Follow the recommendations:

  • Add title by template: Add integration tests for <short case description>
  • Add labels: techdebt, area/integration tests
  • Describe cases with steps that should be tested
  • Append to line to comment: Tech debt for: <commit> (#<issueNumber>)

Hint: you can add special comments to a code that will create issue(s) automatically after a commit with such a comment will be merged.

Example: // @todo #123 Add integration tests for searching the stamps by a catalog name

Remove merged branch

$ git checkout master
$ git push origin --delete <branchName> # remove remote branch
$ git branch -D <branchName>            # remove local branch
$ git remote prune origin               # remove local copy of remote origin branch
$ git remote prune upstream             # remove local copy of remote upstream branch