... |
... |
@@ -13,6 +13,7 @@ GITLAB = "https://gitlab.torproject.org" |
13
|
13
|
API_URL = f"{GITLAB}/api/v4"
|
14
|
14
|
PROJECT_ID = 473
|
15
|
15
|
AUTH_HEADER = "PRIVATE-TOKEN"
|
|
16
|
+MB_LABEL = "Project 131"
|
16
|
17
|
|
17
|
18
|
|
18
|
19
|
class EntryType(enum.IntFlag):
|
... |
... |
@@ -153,9 +154,9 @@ class ChangelogBuilder: |
153
|
154
|
return
|
154
|
155
|
labels = "Apps::Type::ReleasePreparation"
|
155
|
156
|
if is_mullvad:
|
156
|
|
- labels += ",Sponsor 131"
|
|
157
|
+ labels += f",{MB_LABEL}"
|
157
|
158
|
elif not is_mullvad and is_mullvad is not None:
|
158
|
|
- labels += "¬[labels]=Sponsor 131"
|
|
159
|
+ labels += f"¬[labels]={MB_LABEL}"
|
159
|
160
|
r = requests.get(
|
160
|
161
|
f"{API_URL}/projects/{PROJECT_ID}/issues?labels={labels}&search={issue_or_version}&in=title&state=opened",
|
161
|
162
|
headers=self.headers,
|
... |
... |
@@ -192,13 +193,13 @@ class ChangelogBuilder: |
192
|
193
|
self._set_issue(issues[0], is_mullvad)
|
193
|
194
|
|
194
|
195
|
def _set_issue(self, issue, is_mullvad):
|
195
|
|
- has_s131 = "Sponsor 131" in issue["labels"]
|
196
|
|
- if is_mullvad is not None and is_mullvad != has_s131:
|
|
196
|
+ has_mb = MB_LABEL in issue["labels"]
|
|
197
|
+ if is_mullvad is not None and is_mullvad != has_mb:
|
197
|
198
|
raise ValueError(
|
198
|
199
|
"Inconsistency detected: a browser was explicitly specified, but the issue does not have the correct labels."
|
199
|
200
|
)
|
200
|
201
|
self.relprep_issue = issue["iid"]
|
201
|
|
- self.is_mullvad = has_s131
|
|
202
|
+ self.is_mullvad = has_mb
|
202
|
203
|
|
203
|
204
|
if self.version is None:
|
204
|
205
|
version_match = re.search(r"\b[0-9]+\.[.0-9a]+\b", issue["title"])
|