forked from locustio/locust
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgenerate_changelog.py
More file actions
executable file
·35 lines (29 loc) · 871 Bytes
/
Copy pathgenerate_changelog.py
File metadata and controls
executable file
·35 lines (29 loc) · 871 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/usr/bin/env python3
import subprocess
import os
import sys
github_api_token = (
os.getenv("CHANGELOG_GITHUB_TOKEN") if os.getenv("CHANGELOG_GITHUB_TOKEN") else input("Enter Github API token: ")
)
if len(sys.argv) < 2:
raise Exception("Provide a version number as parameter (--future-release argument)")
version = sys.argv[1]
cmd = [
"github_changelog_generator",
"-t",
github_api_token,
"-u",
"locustio",
"-p",
"locust",
"--exclude-labels",
"duplicate,question,invalid,wontfix,cantfix,stale",
"--header-label",
"# Changelog\nNote that PRs for the latest version are sometimes missing here, check [github](https://github.com/locustio/locust/releases) for the latest info.",
"--since-tag",
"0.14.6",
"--future-release",
version,
]
print(f"Running command: {' '.join(cmd)}\n")
subprocess.run(cmd)