Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tor-browser-build
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
The Tor Project
Applications
tor-browser-build
Commits
ad6a7516
Verified
Commit
ad6a7516
authored
2 years ago
by
Pier Angelo Vendrame
Browse files
Options
Downloads
Patches
Plain Diff
Bug 40796: Improve the UX for the changelogs script when using the issue number
parent
237ce1c4
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!669
Bug 40796: Improve the UX for the changelogs script when using the issue number
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/fetch-changelogs.py
+37
-23
37 additions, 23 deletions
tools/fetch-changelogs.py
with
37 additions
and
23 deletions
tools/fetch-changelogs.py
+
37
−
23
View file @
ad6a7516
...
...
@@ -102,30 +102,44 @@ with token_file.open() as f:
token
=
f
.
read
().
strip
()
headers
=
{
"
PRIVATE-TOKEN
"
:
token
}
if
sys
.
argv
[
1
][
0
]
!=
"
#
"
:
version
=
sys
.
argv
[
1
]
r
=
requests
.
get
(
f
"
{
API_URL
}
/projects/
{
PROJECT_ID
}
/issues?labels=Release Prep
"
,
headers
=
headers
,
)
issue
=
None
for
i
in
r
.
json
():
if
i
[
"
title
"
].
find
(
sys
.
argv
[
1
])
!=
-
1
:
if
issue
is
None
:
issue
=
i
else
:
print
(
"
More than one matching issue found!
"
)
print
(
"
Please use the issue id.
"
)
sys
.
exit
(
3
)
if
not
issue
:
print
(
"
Release preparation issue not found. Please make sure it has ~Release Prep.
"
version
=
sys
.
argv
[
1
]
r
=
requests
.
get
(
f
"
{
API_URL
}
/projects/
{
PROJECT_ID
}
/issues?labels=Release Prep
"
,
headers
=
headers
,
)
if
r
.
status_code
==
401
:
print
(
"
Unauthorized! Has your token expired?
"
)
sys
.
exit
(
3
)
issue
=
None
for
i
in
r
.
json
():
if
i
[
"
title
"
].
find
(
sys
.
argv
[
1
])
!=
-
1
:
if
issue
is
None
:
issue
=
i
else
:
print
(
"
More than one matching issue found!
"
)
print
(
"
Please use the issue id.
"
)
sys
.
exit
(
4
)
if
not
issue
:
iid
=
version
version
=
None
if
iid
[
0
]
==
"
#
"
:
iid
=
iid
[
1
:]
try
:
int
(
iid
)
r
=
requests
.
get
(
f
"
{
API_URL
}
/projects/
{
PROJECT_ID
}
/issues?iids=
{
iid
}
"
,
headers
=
headers
,
)
sys
.
exit
(
4
)
iid
=
issue
[
"
iid
"
]
else
:
version
=
"
????
"
iid
=
sys
.
argv
[
1
][
1
:]
if
r
.
ok
and
r
.
json
():
issue
=
r
.
json
()[
0
]
except
ValueError
:
pass
if
not
issue
:
print
(
"
Release preparation issue not found. Please make sure it has ~Release Prep.
"
)
sys
.
exit
(
5
)
iid
=
issue
[
"
iid
"
]
linked
=
{}
linked_build
=
{}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment