Add --revision parameter to allow to control the commits used to generate the changelog
This commit is contained in:
parent
e71611f17a
commit
5c5481ea57
1 changed files with 12 additions and 1 deletions
13
gitdch
13
gitdch
|
@ -148,6 +148,17 @@ parser.add_argument(
|
|||
help='Specify an optional Markdown release notes output path'
|
||||
)
|
||||
|
||||
parser.add_argument(
|
||||
'--revision',
|
||||
type=str,
|
||||
dest='revision',
|
||||
help=(
|
||||
'Specify the revision to use to generate the changelog (see '
|
||||
'git-rev-parse for viable options, optional, default: generate the '
|
||||
'changelog with all commits of the current branch) '
|
||||
),
|
||||
default=None
|
||||
)
|
||||
|
||||
options = parser.parse_args()
|
||||
|
||||
|
@ -225,7 +236,7 @@ version = (
|
|||
)
|
||||
)
|
||||
messages = []
|
||||
for commit in repo.iter_commits():
|
||||
for commit in repo.iter_commits(rev=options.revision):
|
||||
if version_commit is None:
|
||||
version_commit = commit
|
||||
log.debug('Commit %s', commit)
|
||||
|
|
Loading…
Reference in a new issue