Skip to content

Commit 0c3f492

Browse files
committed
bugs: fix summary is too long
When there are a lot of atoms in same bug, the summary gets too long and server responds with Bad Request. For such long titles, shorten it into one atom and suffix " and friends" (great text from sam) Resolves: #141 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
1 parent 18132b0 commit 0c3f492

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/pkgdev/scripts/pkgdev_bugs.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,13 +214,17 @@ def file_bug(
214214
keywords = []
215215
maintainers = tuple(maintainers) or ("maintainer-needed@gentoo.org",)
216216

217+
summary = f"{', '.join(pkg.versioned_atom.cpvstr for pkg, _ in self.pkgs)}: stablereq"
218+
if len(summary) > 60:
219+
summary = f"{self.pkgs[0][0].versioned_atom.cpvstr} and friends: stablereq"
220+
217221
request_data = dict(
218222
Bugzilla_api_key=api_key,
219223
product="Gentoo Linux",
220224
component="Stabilization",
221225
severity="enhancement",
222226
version="unspecified",
223-
summary=f"{', '.join(pkg.versioned_atom.cpvstr for pkg, _ in self.pkgs)}: stablereq",
227+
summary=summary,
224228
description="Please stabilize",
225229
keywords=keywords,
226230
cf_stabilisation_atoms="\n".join(self.lines()),

0 commit comments

Comments
 (0)