|
1 |
| -# github-flow-manager |
| 1 | +# github-flow-manager |
| 2 | +## Help |
| 3 | +``` |
| 4 | +Main goal for that app is to push commits between branches |
| 5 | +but just those which pass evaluation checks. |
| 6 | +Example use case "push all commits pushed to branch develop more than 30 minutes ago to branch master" |
| 7 | +
|
| 8 | +Usage: |
| 9 | + github-flow-manager [OWNER] [REPOSITORY] [SOURCE_BRANCH] [DESTINATION_BRANCH] [EXPRESSION] [flags] |
| 10 | +
|
| 11 | +Flags: |
| 12 | + -c, --commits-number int Number of commits to get under evaluation (>0, <=100) (default 100) |
| 13 | + -d, --dry-run Don't modify repository |
| 14 | + -f, --force Use the force Luke... - Changes branch HEAD with force |
| 15 | + -t, --github-token string GitHub token (can be passed also as GITHUB_TOKEN env variable |
| 16 | + -h, --help help for github-flow-manager |
| 17 | + -v, --verbose Print table with commits evaluation status |
| 18 | +``` |
| 19 | + |
| 20 | +## Example |
| 21 | +``` |
| 22 | +GITHUB_TOKEN=xxx github-flow-manager octocat Hello-World test master "StatusSuccess == false" --verbose --dry-run |
| 23 | +``` |
| 24 | + |
| 25 | +# Expressions |
| 26 | +### Available variables |
| 27 | + - `SHA` |
| 28 | + - `Message` |
| 29 | + - `PushedDate` - when commit was pushed |
| 30 | + - `StatusSuccess` - f.ex. CI status |
| 31 | + |
| 32 | +### Examples |
| 33 | +##### Commit message contains "string" |
| 34 | +`Message contains "HOTFIX"` |
| 35 | +##### Commit message not contains "string" |
| 36 | +`Message NOT contains "FEATURE"` |
| 37 | +##### Commit message equals "string" |
| 38 | +`Message == "very important commit"` |
| 39 | +##### Commit status is SUCCESS |
| 40 | +`StatusSuccess == true` |
| 41 | +##### Commit was pushed more than 30 minutes ago |
| 42 | +`PushedDate < "now-30m"` |
| 43 | +##### Commit was pushed more than 30 minutes ago and status is SUCCESS |
| 44 | +`PushedDate < "now-30m" AND StatusSuccess == true` |
0 commit comments