Skip to content

Commit

Permalink
Added docs for commitConflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
sorenlouv committed Aug 25, 2023
1 parent 4d04119 commit d863786
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 43 deletions.
83 changes: 42 additions & 41 deletions docs/cli-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,47 +2,48 @@

The CLI options will override the [config-file-options.md](/docs/config-file-options.md).

| Option | Shorthand notation | Description | Default |
| ------------------- | ------------------ | -------------------------------------------------------------------------- | ------------------------- |
| --access-token | | Github access token | |
| --all | -a | Show commits from any author. Opposite of `--author` | false |
| --assignee | --assign | Assign users to the target PR | |
| --author | | Filter commits by Github username. Opposite of `--all` | _Current user_ |
| --auto-assign | | Assign current user to the target PR | false |
| --branch | -b | Target branch to backport to | |
| --config-file | | Custom path to project config file (.backportrc.json) | |
| --dir | | Clone repository into custom directory | ~/.backport/repositories/ |
| --dry-run | | Perform backport without pushing to Github | false |
| --editor | | Editor (eg. `code`) to open and resolve conflicts | nano |
| --fork | | Create backports in fork repo | true |
| --git-hostname | | Hostname for Git | github.com |
| --interactive | | Enable interactive prompts | true |
| --mainline | | Parent id of merge commit | 1 |
| --max-number | --number, -n | Number of commits to choose from | 10 |
| --multiple | | Multi-select for commits and branches | false |
| --multiple-branches | | Multi-select for branches | true |
| --multiple-commits | | Multi-select for commits | false |
| --no-cherrypick-ref | | Do not append "(cherry picked from commit...)". [Git Docs][1] | false |
| --no-status-comment | | Do not publish a status comment to Github with the results of the backport | false |
| --no-verify | | Bypass the pre-commit and commit-msg hooks | false |
| --path | -p | Filter commits by path | |
| --pr-description | --description | Description for pull request | |
| --pr-filter | | Find PRs using [Github's search syntax][2] | |
| --pr-title | --title | Title of pull request | |
| --pull-number | --pr | Backport pull request by number | |
| --repo-fork-owner | | The owner of the fork where the backport branch is pushed. | _Current user_ |
| --repo-name | | Name of repository | |
| --repo-owner | | Owner of repository | |
| --reset-author | | Set yourself as commit author | |
| --reviewer | | Add reviewer to the target PR | |
| --sha | | Sha of commit to backport | |
| --signoff | -s | Pass the --signoff option to the cherry-pick command | false |
| --source-branch | | Specify a non-default branch to backport from | |
| --source-pr-label | | Labels added to the source PR | |
| --target-branch | -b | Target branch(es) to backport to | |
| --target-pr-label | --label, -l | Labels added to the target PR | |
| --help | | Show help | |
| -v, --version | | Show version number | |
| Option | Shorthand notation | Description | Default |
| ------------------- | ------------------ | --------------------------------------------------------------------------- | ------------------------- |
| --access-token | | Github access token | |
| --all | -a | Show commits from any author. Opposite of `--author` | false |
| --assignee | --assign | Assign users to the target PR | |
| --author | | Filter commits by Github username. Opposite of `--all` | _Current user_ |
| --auto-assign | | Assign current user to the target PR | false |
| --branch | -b | Target branch to backport to | |
| --commit-conflicts | | Commit conflicts instead of aborting. Only takes effect in `non-interactive | false |
| --config-file | | Custom path to project config file (.backportrc.json) | |
| --dir | | Clone repository into custom directory | ~/.backport/repositories/ |
| --dry-run | | Perform backport without pushing to Github | false |
| --editor | | Editor (eg. `code`) to open and resolve conflicts | nano |
| --fork | | Create backports in fork repo | true |
| --git-hostname | | Hostname for Git | github.com |
| --interactive | | Enable interactive prompts | true |
| --mainline | | Parent id of merge commit | 1 |
| --max-number | --number, -n | Number of commits to choose from | 10 |
| --multiple | | Multi-select for commits and branches | false |
| --multiple-branches | | Multi-select for branches | true |
| --multiple-commits | | Multi-select for commits | false |
| --no-cherrypick-ref | | Do not append "(cherry picked from commit...)". [Git Docs][1] | false |
| --no-status-comment | | Do not publish a status comment to Github with the results of the backport | false |
| --no-verify | | Bypass the pre-commit and commit-msg hooks | false |
| --path | -p | Filter commits by path | |
| --pr-description | --description | Description for pull request | |
| --pr-filter | | Find PRs using [Github's search syntax][2] | |
| --pr-title | --title | Title of pull request | |
| --pull-number | --pr | Backport pull request by number | |
| --repo-fork-owner | | The owner of the fork where the backport branch is pushed. | _Current user_ |
| --repo-name | | Name of repository | |
| --repo-owner | | Owner of repository | |
| --reset-author | | Set yourself as commit author | |
| --reviewer | | Add reviewer to the target PR | |
| --sha | | Sha of commit to backport | |
| --signoff | -s | Pass the --signoff option to the cherry-pick command | false |
| --source-branch | | Specify a non-default branch to backport from | |
| --source-pr-label | | Labels added to the source PR | |
| --target-branch | -b | Target branch(es) to backport to | |
| --target-pr-label | --label, -l | Labels added to the target PR | |
| --help | | Show help | |
| -v, --version | | Show version number | |

[1]: https://git-scm.com/docs/git-cherry-pick#Documentation/git-cherry-pick.txt--x
[2]: https://docs.github.com/en/search-github/getting-started-with-searching-on-github/understanding-the-search-syntax
12 changes: 10 additions & 2 deletions docs/config-file-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,11 @@ Please select the necessary access scopes:

<img width="971" alt="image" src="https://user-images.githubusercontent.com/7416358/226398066-54cd918e-7d5a-420b-9f84-bb34f9f43dd6.png">


**For public repos only**
![image](https://user-images.githubusercontent.com/209966/67081207-018ec400-f197-11e9-86aa-4ae4a003fcbd.png)

<img width="971" alt="image" src="https://user-images.githubusercontent.com/7416358/226398088-715a5bab-7ac8-4733-b48c-d94da593ca04.png">


#### `editor`

If a merge conflicts occurs during backportin your editor of choice will be opened to make it easier for you to resolve the conflict
Expand Down Expand Up @@ -208,6 +206,16 @@ Automatically detech which branches a pull request should be backported to, base

_Note: backslashes must be escaped._

#### `commitConflicts`

When running backport on CI (aka in non-interactive mode) any commit conflicts will result in the backport being aborted. When `commitConflicts: true` even files with conflicts will be committed and a backport PR created. It is then up to a user to manually resolve the conflict, If auto-merge is enabled, this will be disabled for this PR specifically to avoid merging unresolved conflicts.

```json
{
"commitConflicts": true
}
```

#### `dir`

Clone repository into custom directory
Expand Down

0 comments on commit d863786

Please sign in to comment.