Skip to content

Commit 0b92a4e

Browse files
authored
feat: add sequence-drop passthru CLI flag (#99)
1 parent 128b624 commit 0b92a4e

3 files changed

Lines changed: 8 additions & 5 deletions

File tree

‎README.md‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,17 @@ But the comparison isn't quite as strict, generally leading to a shorter list of
2929
* `--exclude-label`: Exclude any commits from the list that come from a GitHub pull request with the given label. Multiple `--exclude-label` options may be provided, they will also be split by `,`. e.g. `--exclude-label=semver-major,meta`.
3030
* `--require-label`: Only include commits in the list that come from a GitHub pull request with the given label. Multiple `--require-label` options may be provided, they will also be split by `,`. e.g. `--require-label=test,doc`.
3131
* `--patch-only`: An alias for `--exclude-label=semver-major,semver-minor`.
32-
* `--format`: Dictates what formatting the output will have. Possible options are: `simple`, `markdown`, `plaintext`, `messageonly` and `sha`. The default is to print a `simple` output suitable for stdout. An unknown format is an error.
33-
- `simple`: Don't print full markdown output, good for console printing without the additional fluff.
34-
- `sha`: Print only the 10-character truncated commit hashes. Good for piping though additional tooling, such as `xargs git cherry-pick` for applying commits.
32+
* `--format`: Dictates what formatting the output will have. Possible options are:
33+
- `simple` (default): Don't print full markdown output, good for console printing without the additional fluff.
34+
- `sequence`: Hybrid format that can be pasted directly in the sequence editor of a `git rebase --interactive` session, with commit title, author, labels and PR URL as comments compatible with interactive rebase input.
35+
- `sha`: Print only the 10-character truncated commit hashes.
3536
- `plaintext`: A very simple form, without commit details, implies `--group`.
3637
- `markdown`: A Markdown formatted from, with links and proper escaping.
37-
- `messageonly`: Only the commit message, implies `--group`.
38+
- `messageonly`: Displays the commit message only, implies `--group`.
3839
* `--filter-release`: Exclude Node-style release commits from the list. e.g. `Working on v1.0.0` or `2015-10-21 Version 2.0.0`.
3940
* `--reverse`: Reverse the results, this is especially useful when piping output to `xargs`.
4041
* `--commit-url`:A URL template which will be used to generate commit URLs for a repository not hosted in GitHub. `{ref}` is the placeholder that will be replaced with the commit, i.e. `--commit-url=https://gitlab.com/myUser/myRepo/commit/{ref}`. `{ghUser}` and `{ghRepo}` are available if they can be derived from package.json (Gitlab and Bitbucket URLs should be understood in package.json).
42+
* `--sequence-drop=<label1>[,<label2>[,...]]`: When `--format=sequence`, will output the commits belonging to a PR with a label listed here as `drop` instead of `pick`. This can be useful for a human backporter to understand why a specific commit does not apply cleanly, to spot which commit might be creating conflicts.
4143
* `--find-matching-prs`: Use the GitHub API to find the pull requests that match commits that don't have `PR-URL` metadata in their message text.
4244
* `--quiet` or `-q`: Do not print to stdout.
4345
* `--user`: Override the auto-detected GitHub user/org derived from package.json

‎branch-diff.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ async function main () {
136136
repo: { type: 'string' },
137137
'require-label': { type: 'string', multiple: true },
138138
reverse: { type: 'boolean' },
139+
'sequence-drop': { type: 'string' },
139140
user: { type: 'string' },
140141
version: { type: 'boolean', short: 'v' }
141142
}

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
"author": "Rod <rod@vagg.org> (http://r.va.gg/)",
1818
"license": "MIT",
1919
"dependencies": {
20-
"changelog-maker": "^5.0.5",
20+
"changelog-maker": "^5.1.3",
2121
"commit-stream": "^2.0.1",
2222
"gitexec": "^2.0.1",
2323
"pkg-to-id": "^0.0.3",

0 commit comments

Comments
 (0)