postCmd

package
v0.20.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 11, 2016 License: MIT Imports: 23 Imported by: 2

README

review post

Post review requests for the specified revisions.

Usage

salsaflow review post [-fixes=RRID] [-reviewer=REVIEWER]
                      [-story_tag=STORY_TAG] [-open] [REVISION...]

salsaflow review post -parent=BRANCH [-fixes=RRID] [-no_fetch]
                     [-no_rebase] [-no_merge] [-merge_no_ff]
                     [-ask_once] [-pick] [-reviewer=REVIEWER] [-open]

See the command help page for more details in the flags and such.

Description

Post review requests for selected commits. The commits can be specified in multiple ways:

  1. By using the parent flag, all revisions between BRANCH and the current branch (HEAD) are selected for being posted into the code review system.
  2. When not using the parent flag, you can specify one or more revisions or revision ranges. SalsaFlow uses git show to get relevant commits, so check the relevant docs to know what to expect.
  3. 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 on the wiki.

Story ID Tags

review post 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 case you really need to post a commit missing the tag in this case, you need to use -story_tag, which will set the Story-Id tag just for the code review module without amending the commit.

Use -story_tag=unassigned to post an unassigned commit for review.

Steps
Parent Mode

This command goes through the following steps:

  1. Fetch the repository unless -no_fetch is specified.
  2. Select the commits to be posted for review - PARENT.. range.
  3. 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.
  4. Reset the current branch to point to the temporary branch.
  5. Merge the current branch into the parent branch unless -no_merge is set.
  6. Push the parent branch unless -no_merge is set. Otherwise the current branch is pushed.
  7. Post a review request for every commit in the range.
Revision Mode
  1. Make sure the selected commits are associated with a story by the Story-Id tag. Fail in case the tag is not there and no -story_tag is specified.
  2. Post the selected commits for code review.

Documentation

Overview

Post review requests for the specified revisions.

salsaflow review post [-fixes=RRID] [-reviewer=REVIEWER]
                      [-story_tag=STORY_TAG] [-open] [REVISION...]

salsaflow review post -parent=BRANCH [-fixes=RRID] [-no_fetch]
                     [-no_rebase] [-no_merge] [-merge_no_ff]
                     [-ask_once] [-pick] [-reviewer=REVIEWER] [-open]

See the command help page for more details in the flags and such.

Description

Post review requests for selected commits. The commits can be specified in multiple ways:

  1. By using the `parent` flag, all commits between `BRANCH` and the current branch (`HEAD`) are selected for being posted into the code review system.
  2. When not using the `parent` flag, you can specify one or more revisions or revision ranges. SalsaFlow uses `git show` to get relevant commits, so check the relevant docs to know what to expect.
  3. When not using the `parent` flag and not even specifying any `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 case you really need to post a commit missing the tag in this case, you need to use `-story_tag`, which will set the `Story-Id` tag just for the code review module without amending the commit.

Use `-story_tag=unassigned` to post an unassigned commit for review.

Steps

For the parent mode, the command goes through the following steps:

  1. Fetch the repository unless -no_fetch is specified.
  2. Select the commits to be posted for review - PARENT.. range.
  3. 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.
  4. Reset the current branch to point to the temporary branch.
  5. Merge the current branch into the parent branch unless -no_merge is set.
  6. Push the parent branch unless -no_merge is set. In that case the current branch is pushed.
  7. Post a review request for every commit in the range.

For the revision mode, the command goes through the following steps:

  1. Make sure the selected commits are associated with a story by the Story-Id tag. Fail in case the tag is not there and -story_tag is not specified.
  2. Post the selected commits for code review.

Index

Constants

This section is empty.

Variables

View Source
var Command = &gocli.Command{
	UsageLine: `
  post [-fixes=RRID] [-reviewer=REVIEWER]
       [-story_tag=STORY_TAG] [-open] [REVISION...]

  post [-fixes=RRID] [-no_fetch]
       [-no_rebase] [-no_merge] [-merge_no_ff]
       [-ask_once] [-pick]
       [-reviewer=REVIEWER] [-open] -parent=BRANCH`,
	Short: "post code review requests",
	Long: `
  Post a code review request for each commit specified.

  In case one or more revision ranges are specified, the commits included
  in the ranges are posted for review. SalsaFlow uses git show, so check
  the relevant docs to understand what commits will be selected.

  Also 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.

  Specifying the parent branch means automatically that the current branch
  is going to be merged into the parent branch unless -no_merge is set.
  In that case the current branch is pushed instead and mo merge occurs.
  To make sure a merge commit is created, see -merge_no_ff, which ensures
  that git merge is always run with --no-ff flag.

  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,
}
View Source
var ErrNoCommits = errors.New("no commits selected for code review")

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL