start_release
after_checkout(branch_checkout, stashed)
¶
Notify the user that the branch has switched.
Optionally if there are stashed changes they will be popped.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
branch_checkout |
str
|
output from git checkout. |
required |
stashed |
bool
|
If True, it will run git stash pop. |
required |
Returns:
Type | Description |
---|---|
Res[None]
|
A OneOf with None. There should be no issues. A warning may show up. |
Source code in m/ci/start_release.py
assert_git_status(status, description)
¶
Assert that the current branch is in a clean state.
This action may stash some changes. This happens when the developer works on a hotfix and starts making changes directly in the branch.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
status |
str
|
short key describing the status |
required |
description |
str
|
The text used to determine the status |
required |
Returns:
Type | Description |
---|---|
Res[bool]
|
An issue explaining why we cannot complete the release setup. If |
Res[bool]
|
successful it will return a boolean value. A true value means that |
Res[bool]
|
the process stashed changes and they will need to be popped. |
Source code in m/ci/start_release.py
start_release(gh_token, hotfix=False)
¶
Start the release process.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
gh_token |
str
|
The GITHUB_TOKEN to use to make api calls to Github. |
required |
hotfix |
bool
|
Set to true to start a hotfix. |
False
|
Returns:
Type | Description |
---|---|
Res[None]
|
None if successful, otherwise an issue. |
Source code in m/ci/start_release.py
verify_release(commits, hotfix)
¶
Compare the number of commits to verify if the release should proceed.
In some cases we may start a hotfix without realizing that there are already some commits in the branch that have not been released. In this case it should have been a full release instead.
This step can be skipped if commits
is None
.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
commits |
list[str] | None
|
List of unreleased commits. |
required |
hotfix |
bool
|
flag to let us know if the release is a hotfix. |
required |
Returns:
Type | Description |
---|---|
Res[None]
|
None if everything is good, otherwise an issue. |