Skip to content

WIP: Jira & Git flow, rules and recomendations

Luka Murn edited this page Jan 25, 2019 · 2 revisions

SciNote development flow

Git Branches

Master

Master branch is the bleeding edge branch and should be treated as unstable. However each version tag can be treated as stable.

Feature branches

It's highly recommended you create a feature branch either on ticket or epic level. Feature branches should be located on the biosistemika/scinote-web repository.

Development branches

It's advisable that you (as a developers) fork your version of scinote-web onto your namespace (e.g. my-awesome-gh-profile/scinote-web), and open development branches on your own repository, while keeping the main branches (master, feature branches) in sync with the branches on biosistemika/scinote-web).

Git naming conventions

Development branch naming

Your development branch should consist of your initials, ticket number and (optional) short description. For example: mm-sci-1234-implementing-crypto

Feature branch naming

Feature branches should have a name like this: features/name-of-the-feature.

Commit messages

At least one of the commits should have the ticket number in the title/description (e.g. git commit -m 'Fix SCI-XXXX'). This helps with Jira hooks, and our automated process. At this point we're not squashing the commits, but using normal merge commits.

Pull requests

Pull request should be named the same as ticket title. Ideally, pull request will have a name like this:

My amazing contribution [SCI-XXXX]

The pull request description should include the following:

  • link to Jira ticket
  • sentence or two about what was done
  • some background/reasoning (optional)
  • todo (optional)

You should also add a label to your pull request; the label should be the target branch to which the pull Request is being opened against. This helps us when viewing all pull requests to quickly distinguish to which branches they are being requested to be pulled.

Typical workflow

  1. Choose an issue from sprint backlog [Jira]
  2. Assign it to yourself, move issue to In Progress [Jira]
  3. Develop
  4. Commit and push
  5. Open pull request [GitHub]
  6. (GitLab only) move your ticket to 'Ready for Merge' column [Jira]
  7. Wait for code review
  8. Have a vigorous debate with your reviewer
  9. If there are requests for changes in your pull request, perform the changes as new commits, re-push to your remote repository.
  10. Merge when:
  • reviewer approved you PR
  • all checks pass
  1. Ticket will be magically moved to 'Ready for Release' column in Jira (actually by GitHub/GitLab webhook, no magic really there)