Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add branching model team agreement doc #18

Merged
merged 2 commits into from
Dec 2, 2021

Conversation

mikevespi
Copy link
Collaborator

Starting point for the agreement discussed by the team.

@kriscooke kriscooke linked an issue Dec 2, 2021 that may be closed by this pull request
- Reviews can be done by the first person who gets to it. If the code needs explaining, request the author to walk you through it
- Follow peer review best practices by suggesting opportunities to improve code during peer review, merging as soon as the code is better than the code in the target branch and release ready
- Treat any opportunity for improvement feedback identified during peer review but not implemented in the PR where it was raised as technical debt worthy of a new issue referencing the PR where the comments first came up
- Branch naming policy is as follows: dm-issue#-brief-description

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the dm- prefix performing some meaningful function? (per the example of this branch being dm-14-branching-model-agreement) Or could we do with a more succinct issue#-brief-description?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the upstream there's a pattern (maybe team agreement) of beginning each branch with the JIRA ticket number. Perhaps we continued that practice in this repo? A team agreement on consistent naming would be helpful...though there's often a one-to-many relation between an issue and the PRs that close it. Perhaps we could consider including the ticket number we're closing in the description section of the commit that substantially delivers the feature? For single-commit pull requests (or draft PRs that begin after pushing the very first commit) the title and description of the commit message are auto populated into the github PR title and description.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The dm- prefix is something we're doing in the upstream, so we decided to keep it the same here

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Branch naming policy is as follows: dm-issue#-brief-description
- Branch naming policy is as follows: brief-description

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps there's a risk that by keeping it the same as upstream we will confuse references to JIRA ticket numbers (the DM-xx form) with the Github Issues of this fork? In standup @BCerki asked if the suggestion above was a typo. The option of beginning branches with the issue number they relate to issue#-brief-description is another possible team agreement, and the impact of that decision would be to create a mechanism whereby we avoid making pull requests that don't correspond to tracked issues. As we were discussing in standup, sometimes a quick refactor is best enabled by directly sending a pull request without creating an issue–sometimes trivial refactors unblock our feature tickets. Additionally, I'd note that our branches are a transitory artifact–per suggestion above migrating the issue linkage to commit messages themselves would make this ephemeral linkage permanent and immutable.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Marked this unresolved until we fully migrate discussion to #21 so it shows when people follow link from that issue.

kriscooke
kriscooke previously approved these changes Dec 2, 2021
Copy link

@wenzowski wenzowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe clarity on why the team agreed to these merging guardrails helps understand each guardrail?

## Guardrails
- The default branch for this repo is `main`
- all commits must be made to a non-protected branch and submitted via a pull request before they can be merged into `main`. (There can be no direct commits made to `main`.)
- Pull requests require at least 1 approval before the can be merged to `main`. Any commits made to an approved branch will dismiss the approval. (If you commit new code to a branch after it gets approved but before you merge it, you have to get it approved again.)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Pull requests require at least 1 approval before the can be merged to `main`. Any commits made to an approved branch will dismiss the approval. (If you commit new code to a branch after it gets approved but before you merge it, you have to get it approved again.)
- Pull requests require at least 1 approval before they can be merged to `main`. Any commits made to an approved branch will dismiss the approval. (If you commit new code to a branch after it gets approved but before you merge it, you have to get it approved again.)


## Guardrails
- The default branch for this repo is `main`
- all commits must be made to a non-protected branch and submitted via a pull request before they can be merged into `main`. (There can be no direct commits made to `main`.)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- all commits must be made to a non-protected branch and submitted via a pull request before they can be merged into `main`. (There can be no direct commits made to `main`.)
- All commits must be made to a non-protected branch and submitted via a pull request before they can be merged into `main`. (There can be no direct commits made to `main`.)

- Pull requests require at least 1 approval before the can be merged to `main`. Any commits made to an approved branch will dismiss the approval. (If you commit new code to a branch after it gets approved but before you merge it, you have to get it approved again.)
- Pull requests must pass CI checks in order to be merged to `main`
- Branches are automatically deleted when merged
- Squash merge has been disabled

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Squash merge has been disabled
- Squash merge has been disabled to increase efficiency of `git bisect`

- all commits must be made to a non-protected branch and submitted via a pull request before they can be merged into `main`. (There can be no direct commits made to `main`.)
- Pull requests require at least 1 approval before the can be merged to `main`. Any commits made to an approved branch will dismiss the approval. (If you commit new code to a branch after it gets approved but before you merge it, you have to get it approved again.)
- Pull requests must pass CI checks in order to be merged to `main`
- Branches are automatically deleted when merged

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- Branches are automatically deleted when merged
- Branches are automatically deleted on Github when a PR is merged. Each teammate should set `git config fetch.prune true` to mirror this behaviour to their local workstation.

kriscooke
kriscooke previously approved these changes Dec 2, 2021
Copy link

@kriscooke kriscooke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's get started with this, and can follow up on some of the editorial revisions suggested here with #21

@sonarcloud
Copy link

sonarcloud bot commented Dec 2, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@kriscooke kriscooke merged commit 1639afd into main Dec 2, 2021
@kriscooke kriscooke deleted the dm-14-branching-model-agreement branch December 2, 2021 17:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Branching Model Team Agreement
5 participants