diff options
author | Arthur Zamarin <arthurzam@gentoo.org> | 2023-06-09 17:18:56 +0300 |
---|---|---|
committer | Arthur Zamarin <arthurzam@gentoo.org> | 2023-06-09 17:21:28 +0300 |
commit | 0c3f492054694f241a3d4a4c99b77151620560d3 (patch) | |
tree | 2dc602c078adf5aeca2c1e81dee75228e29718aa | |
parent | tests/bugs: fix tests after addition of blocks_bug (diff) | |
download | pkgdev-0c3f492054694f241a3d4a4c99b77151620560d3.tar.gz pkgdev-0c3f492054694f241a3d4a4c99b77151620560d3.tar.bz2 pkgdev-0c3f492054694f241a3d4a4c99b77151620560d3.zip |
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: https://github.com/pkgcore/pkgdev/issues/141
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
-rw-r--r-- | src/pkgdev/scripts/pkgdev_bugs.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/pkgdev/scripts/pkgdev_bugs.py b/src/pkgdev/scripts/pkgdev_bugs.py index 25608d6..daf4828 100644 --- a/src/pkgdev/scripts/pkgdev_bugs.py +++ b/src/pkgdev/scripts/pkgdev_bugs.py @@ -214,13 +214,17 @@ class GraphNode: keywords = [] maintainers = tuple(maintainers) or ("maintainer-needed@gentoo.org",) + summary = f"{', '.join(pkg.versioned_atom.cpvstr for pkg, _ in self.pkgs)}: stablereq" + if len(summary) > 60: + summary = f"{self.pkgs[0][0].versioned_atom.cpvstr} and friends: stablereq" + request_data = dict( Bugzilla_api_key=api_key, product="Gentoo Linux", component="Stabilization", severity="enhancement", version="unspecified", - summary=f"{', '.join(pkg.versioned_atom.cpvstr for pkg, _ in self.pkgs)}: stablereq", + summary=summary, description="Please stabilize", keywords=keywords, cf_stabilisation_atoms="\n".join(self.lines()), |