Documentation ¶
Overview ¶
Post review requests for the specified revisions.
salsaflow review post [-update=RRID] [-fixes=RRID] [-open] [REVISION] salsaflow review post -parent=BRANCH [-no_fetch] [-no_rebase] [-ask_once] [-open]
See the command help page for more details in the flags and such.
Description ¶
Post review requests for the specified revisions. The revision range can be specified in multiple ways:
- By using the `parent` flag, all revisions between `BRANCH` and the current branch (`HEAD`) are selected for being posted into the code review system.
- When not using the `parent` flag, you can specify `REVISION`. This selects just a single commit to be posted.
- When not using the `parent` flag and not even specifying `REVISION`, the tip of the current branch (`HEAD`) is selected.
The overall workflow is explained in more details at https://github.com/salsaflow/salsaflow/wiki/SalsaFlow-Workflow.
Tags ¶
SalsaFlow will not allow you to post review requests without the selected commits containing the Story-Id tag in the commit message. No need to worry, though. When SalsaFlow finds a commit not containing the right tag, it will prompt you to select the story to assign the commit to and it will amend the commit message to insert the tag.
This mechanism is never triggered when REVISION is specified explicitly. In general it is not possible to amend any commit in the git graph, so this option is simply disabled in this case.
Steps ¶
For the parent mode, the command goes through the following steps:
- Fetch the repository unless -no_fetch is specified.
- Select the commits to be posted for review - TRUNK..BRANCH range.
- Walk the commits to check the `Story-Id` tags. In case the tag is missing for any of the selected commits, start constructing the revision range on a temporary branch, asking the user and amending the commit messages where necessary.
- Reset BRANCH to point to the temporary branch.
- Post a review request for every commit in the range.
For the revision mode, the command goes through the following steps:
- Make sure the selected commit is associated with a story by the Story-Id tag. In case REVISION is given, fail in case the tag is not there. In case it is HEAD that is chosen, ask the user to select the story to assign the commit to. Amend the commit message.
- Post a review request for the given commit.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Command = &gocli.Command{
UsageLine: `
post [-update=RRID] [-fixes=RRID] [-reviewer=REVIEWER] [-open] [REVISION]
post [-fixes=RRID] [-no_fetch] [-no_rebase] [-ask_once]
[-pick] [-reviewer=REVIEWER] [-open] [-no_dialog] -parent=BRANCH`,
Short: "post code review requests",
Long: `
Post a code review request for each commit specified.
In case REVISION is specified, the selected revision is posted for review.
Make sure the Story-Id tag is in the commit message, salsaflow will not try
to rewrite the commit message for you in case it is not there.
In case the parent branch BRANCH is specified, all the commits between
BRANCH and HEAD are selected to be posted for code review. Using git revision
ranges, these are the commits matching BRANCH..HEAD, or BRANCH.. for short.
The selected commits are rebased onto the parent branch before posting.
To prevent rebasing, use -no_rebase. To be asked to pick up the missing
story ID only once and use it for all commits, set -ask_once.
When no parent branch nor the revision is specified, the last commit
on the current branch is selected and posted alone into the code review tool.
`,
Action: run,
}
var ErrNoCommits = errors.New("no commits selected for code review")
Functions ¶
This section is empty.
Types ¶
This section is empty.