postCmd

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2015 License: MIT Imports: 22 Imported by: 0

README

review post

Post review requests for the specified revisions.

Usage

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:

  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 REVISION. This selects just a single commit to be posted.
  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 general it is not possible to amend any commit in the git graph, so this option is simply disabled in this case.

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 - TRUNK..BRANCH 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 BRANCH to point to the temporary branch.
  5. Post a review request for every commit in the range.
Revision Mode
  1. 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.
  2. Post a review request for the given commit.

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:

  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 `REVISION`. This selects just a single commit to be posted.
  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 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:

  1. Fetch the repository unless -no_fetch is specified.
  2. Select the commits to be posted for review - TRUNK..BRANCH 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 BRANCH to point to the temporary branch.
  5. 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 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.
  2. Post a review request for the given commit.

Index

Constants

This section is empty.

Variables

View Source
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,
}
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