Skip to content

Commit

Permalink
Merge pull request #8 from zdw/master
Browse files Browse the repository at this point in the history
Change env vars to match Gerrit Trigger Jenkins plugin
  • Loading branch information
heppu committed Mar 11, 2020
2 parents 3f57bd8 + 3f91388 commit ae70663
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,11 @@ Latest version from master can be installed by running: `go get github.com/heppu
go-review uses following environment variables to access gerrit review server:

- `GERRIT_REVIEW_URL`: required
- `GERRIT_CHANGE_ID`: required
- `GERRIT_PATCHSET_REVISION`: required
- `GERRIT_CHANGE_NUMBER`: required
- `GERRIT_PATCHSET_NUMBER`: required
- `GERRIT_USERNAME`: optional
- `GERRIT_PASSWORD`: optional
- `GERRIT_PASSWORD`: optional - This is the HTTP Credential, not the password
used to login to gerrit.

Behavior can be controlled with following flags:

Expand Down
4 changes: 2 additions & 2 deletions cmd/go-review/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ func main() {
}

reviewURL := parseEnv("GERRIT_REVIEW_URL", true)
changeID := parseEnv("GERRIT_CHANGE_ID", true)
revision := parseEnv("GERRIT_PATCHSET_REVISION", true)
changeID := parseEnv("GERRIT_CHANGE_NUMBER", true)
revision := parseEnv("GERRIT_PATCHSET_NUMBER", true)
username := parseEnv("GERRIT_USERNAME", false)
password := parseEnv("GERRIT_PASSWORD", false)

Expand Down

0 comments on commit ae70663

Please sign in to comment.