summaryrefslogtreecommitdiff
Commit message (Expand)AuthorAgeFilesLines
* codebergapi: add timeouts to all requests•••Set a default timeout of 5 seconds for all requests except fetching PRs on /pulls. Codeberg has set a timeout of 60 seconds so we (almost) match that. The requests docs state that timeouts should be set to a value slightly higher than a multiple of three. Signed-off-by: Thomas Bracht Laumann Jespersen <laumann@gentoo.org> Part-of: https://github.com/gentoo/assign-pull-requests/pull/21 Closes: https://github.com/gentoo/assign-pull-requests/pull/21 Signed-off-by: Michał Górny <mgorny@gentoo.org> HEADmasterThomas Bracht Laumann Jespersen3 days1-4/+15
* codeberg: Assign teams and users to eclass changes•••Parse out the list of emails under @MAINTAINERS: in affected eclasses, and figure out teams or users to assign and request reviews from. The eclass metadata is not as structured as package metadata.xml and does not indicate whether a listed maintainer is an individual or a project. We try first mapping the email to an individual, then a project team. For unmappable emails, the presentation no longer indicates if the email was a project. Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz> Part-of: https://github.com/gentoo/assign-pull-requests/pull/18 Closes: https://github.com/gentoo/assign-pull-requests/pull/18 Signed-off-by: Michał Górny <mgorny@gentoo.org> Thomas Bracht Laumann Jespersen2026-04-251-69/+89
* codeberg: replace os.path with pathlib•••Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz> Part-of: https://github.com/gentoo/assign-pull-requests/pull/18 Signed-off-by: Michał Górny <mgorny@gentoo.org> Thomas Bracht Laumann Jespersen2026-04-251-3/+4
* codeberg: Actually, let's not make codeberg the reviewer in antispam•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2026-04-251-1/+1
* codeberg: format with ruff•••Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz> Part-of: https://github.com/gentoo/assign-pull-requests/pull/20 Closes: https://github.com/gentoo/assign-pull-requests/pull/20 Signed-off-by: Michał Górny <mgorny@gentoo.org> Thomas Bracht Laumann Jespersen2026-04-251-1/+1
* codeberg: assign only codeberg team when assignee limit exceeded•••Instead of *also* adding codeberg team when the assignee limit is exceeded, make it just the codeberg team. In the case where there are no packages (so no-one is assigned), ping just the codeberg team but don't request review from them. Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz> Part-of: https://github.com/gentoo/assign-pull-requests/pull/20 Signed-off-by: Michał Górny <mgorny@gentoo.org> Thomas Bracht Laumann Jespersen2026-04-251-5/+6
* codeberg: avoid crashing when metadata.xml isn't available•••For example, a pkgmove makes metadata.xml unavailable under the old name causing the web fetch to fail. Just ignore such errors as the same file should be available under a new path and is also inspected. Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz> Part-of: https://github.com/gentoo/assign-pull-requests/pull/19 Closes: https://github.com/gentoo/assign-pull-requests/pull/19 Signed-off-by: Michał Górny <mgorny@gentoo.org> Thomas Bracht Laumann Jespersen2026-04-071-4/+5
* codeberg: cleanup, consolidate some functions•••We can get away with mapping emails to users/projects just once to produce @-mentions and adding users/teams as reviewers. Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz> Part-of: https://github.com/gentoo/assign-pull-requests/pull/17 Closes: https://github.com/gentoo/assign-pull-requests/pull/17 Signed-off-by: Michał Górny <mgorny@gentoo.org> Thomas Bracht Laumann Jespersen2026-03-271-17/+10
* Use f-strings consistently•••The codeberg PR assignment script was changed to use f-strings instead of %s for string interpolation, but I had missed a couple of instances from the github version. Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz> Part-of: https://github.com/gentoo/assign-pull-requests/pull/17 Signed-off-by: Michał Górny <mgorny@gentoo.org> Thomas Bracht Laumann Jespersen2026-03-271-2/+2
* codeberg: handle empty user names•••The dev_mapping dict may contain entries that map to "". This comes from devs.json that contains entries for all developers and have empty strings for developers that do not have (registered) Codeberg accounts. Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz> Part-of: https://github.com/gentoo/assign-pull-requests/pull/16 Closes: https://github.com/gentoo/assign-pull-requests/pull/16 Signed-off-by: Michał Górny <mgorny@gentoo.org> Thomas Bracht Laumann Jespersen2026-03-161-2/+2
* Fix UnboundLocalError•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2026-03-151-1/+2
* codeberg: request reviews from individual maintainers•••It appears that it's not possible to request reviews from the PR submitter, so we take care to filter out that user (for self-maintained packages). Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz> Closes: https://github.com/gentoo/assign-pull-requests/pull/14 Signed-off-by: Michał Górny <mgorny@gentoo.org> Thomas Bracht Laumann Jespersen2026-03-141-3/+9
* codeberg: fix undefined variable 'proj'•••Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz> Part-of: https://github.com/gentoo/assign-pull-requests/pull/13 Closes: https://github.com/gentoo/assign-pull-requests/pull/13 Signed-off-by: Michał Górny <mgorny@gentoo.org> Thomas Bracht Laumann Jespersen2026-03-141-1/+1
* codeberg: Request project team reviews•••Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz> Part-of: https://github.com/gentoo/assign-pull-requests/pull/12 Closes: https://github.com/gentoo/assign-pull-requests/pull/12 Signed-off-by: Michał Górny <mgorny@gentoo.org> Thomas Bracht Laumann Jespersen2026-03-141-0/+15
* codebergapi: add request_review()•••On Codeberg, reviews can be requested of teams, not just single users. The teams must be specified with just their names, the organization is implied by the organization that owns the repository. Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz> Part-of: https://github.com/gentoo/assign-pull-requests/pull/12 Signed-off-by: Michał Górny <mgorny@gentoo.org> Thomas Bracht Laumann Jespersen2026-03-141-0/+9
* codeberg: add new package notice only when relevant•••Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz> Part-of: https://github.com/gentoo/assign-pull-requests/pull/11 Closes: https://github.com/gentoo/assign-pull-requests/pull/11 Signed-off-by: Michał Górny <mgorny@gentoo.org> Thomas Bracht Laumann Jespersen2026-03-111-1/+1
* codeberg: fix unbound variable real_bugs with many linked bugs•••Initially, I thought the idea was to query bugzilla only when the number of references was below a certain threshold, but that is not correct. This leads to an unbound variable because the "real_bugs" variable only gets defined when bugzilla is queried with the referenced IDs. We should query bugzilla for all the referenced bugs regardless of their number, and just disable crosslinking from bugzilla -> codeberg if the number of bugs is above a certain threshold. Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz> Part-of: https://github.com/gentoo/assign-pull-requests/pull/10 Closes: https://github.com/gentoo/assign-pull-requests/pull/10 Signed-off-by: Michał Górny <mgorny@gentoo.org> Thomas Bracht Laumann Jespersen2026-03-111-31/+26
* codebergapi: remove extra argument in commits()•••Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz> Part-of: https://github.com/gentoo/assign-pull-requests/pull/9 Closes: https://github.com/gentoo/assign-pull-requests/pull/9 Signed-off-by: Michał Górny <mgorny@gentoo.org> Thomas Bracht Laumann Jespersen2026-03-071-1/+1
* Properly support paginated GET endpoints•••Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz> Part-of: https://github.com/gentoo/assign-pull-requests/pull/8 Closes: https://github.com/gentoo/assign-pull-requests/pull/8 Signed-off-by: Michał Górny <mgorny@gentoo.org> Thomas Bracht Laumann Jespersen2026-03-072-15/+12
* codeberg: suggest non-AGit users to switch•••The pr["flow"] entry in the JSON payload for a PR tells us whether the PR was opened using AGit (1) or the "normal" way (0). If not using AGit, add a section to the comment suggesting the user to use AGit. Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz> Part-of: https://github.com/gentoo/assign-pull-requests/pull/7 Closes: https://github.com/gentoo/assign-pull-requests/pull/7 Signed-off-by: Michał Górny <mgorny@gentoo.org> Thomas Bracht Laumann Jespersen2026-02-171-0/+3
* Post assignments as comments, not reviews•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2026-02-142-16/+18
* Sync codebergapi•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2026-02-141-8/+127
* Fix mypy finding, add "-> None" return type hints•••Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz> Part-of: https://github.com/projg2/assign-pull-requests/pull/6 Closes: https://github.com/projg2/assign-pull-requests/pull/6 Signed-off-by: Sam James <sam@gentoo.org> Thomas Bracht Laumann Jespersen2026-01-181-6/+9
* Enable setting "See Also" URLs on bugzilla•••The "See Also" field on bugs.gentoo.org now accepts codeberg.or (plus others). Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz> Part-of: https://github.com/projg2/assign-pull-requests/pull/6 Signed-off-by: Sam James <sam@gentoo.org> Thomas Bracht Laumann Jespersen2026-01-181-10/+9
* Add type hints plus other cleanup•••Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz> Part-of: https://github.com/projg2/assign-pull-requests/pull/6 Signed-off-by: Sam James <sam@gentoo.org> Thomas Bracht Laumann Jespersen2026-01-182-45/+40
* Add codeberg version for PR assignment•••This is more or less a 1-1 porting, replacing the github API calls with equivalent Codeberg ones. The differences are mostly: * Labels are assigned by their IDs, so we need to map the label names to the IDs prior to assignment * The PR JSON objects pulled from the Codeberg API already contain all the label information necessary (including names), so there's no need to use the issues API * This version attempts to report which bug numbers are invalid (if any), and only link valid ones. * A couple of TODOs from the github version are left in * PRs are not yet linked to Bugzilla, because "See Also" does not allow "codeberg.org" links. See bug 964700. Signed-off-by: Thomas Bracht Laumann Jespersen <t@laumann.xyz> Part-of: https://github.com/projg2/assign-pull-requests/pull/6 Signed-off-by: Sam James <sam@gentoo.org> Thomas Bracht Laumann Jespersen2026-01-182-0/+553
* Revert "Verify sign-off email address against committer email field"•••This reverts commit 7c507e80e0021f2250c502f35f8c7fb1b89c2cc5. ``` AttributeError: 'NoneType' object has no attribute 'lower' Traceback (most recent call last): File "/opt/prassign/assign-pull-requests.py", line 421, in <module> sys.exit(main(*sys.argv[1:])) ^^^^^^^^^^^^^^^^^^^ File "/opt/prassign/assign-pull-requests.py", line 124, in main assign_one(pr_getter, issue, dev_mapping, proj_mapping, categories, File "/opt/prassign/assign-pull-requests.py", line 372, in assign_one missing_signoff = not all(commit_contains_correct_signoff(c) for c in pr.get_commits()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/prassign/assign-pull-requests.py", line 372, in <genexpr> missing_signoff = not all(commit_contains_correct_signoff(c) for c in pr.get_commits()) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/opt/prassign/assign-pull-requests.py", line 142, in commit_contains_correct_signoff committer_email = commit.committer.email.lower() # case insensitive ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'NoneType' object has no attribute 'lower' ``` Bug: https://github.com/projg2/assign-pull-requests/issues/5 Signed-off-by: Sam James <sam@gentoo.org> Sam James2026-01-181-27/+5
* Verify sign-off email address against committer email field•••Fixes: https://bugs.gentoo.org/703684 Signed-off-by: Robin H. Johnson <robbat2@gentoo.org> Refactor the code as per review requests (use email module instead of regular expressions) and PEP8 format the code. Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org> Closes: https://github.com/projg2/assign-pull-requests/pull/1 Signed-off-by: Michał Górny <mgorny@gentoo.org> Robin H. Johnson2023-11-301-5/+27
* Also add a verbose note about invalid bug•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2022-08-071-0/+1
* Handle invalid bug IDs gracefully•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2022-08-071-2/+11
* Fix typo•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2021-01-101-1/+1
* Add security label to PRs that link security bugs•••Signed-off-by: John Helmert III <jchelmert3@posteo.net> Closes: https://github.com/mgorny/assign-pull-requests/pull/2 Signed-off-by: Michał Górny <mgorny@gentoo.org> John Helmert III2021-01-101-0/+7
* Mention GURU for new packages•••Patch originally by Andrew Ammerlaan. Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2020-03-161-1/+8
* Stop reminding people about copyright policy change•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2019-09-231-5/+1
* Fix respecting 'no assignee limit' when reassigningMichał Górny2019-06-201-3/+5
* Support 'no assignee limit' labelMichał Górny2019-03-211-4/+10
* Include submitter in assignment report for convenienceMichał Górny2018-12-271-1/+3
* Use new 'PullRequest' keyword•••Signed-off-by: Michał Górny <mgorny@gentoo.org> Michał Górny2018-09-301-1/+3
* Add more whitespace, it matters in mailsMichał Górny2018-09-161-2/+2
* Detect and inform about missing GCO sign-offMichał Górny2018-09-161-1/+10
* Append doc links to assignment messagesMichał Górny2018-09-161-1/+1
* Improve reassignment suggestions on errorsMichał Górny2018-09-161-3/+4
* assign-pull-requests: Split bug linking into sep sectionMichał Górny2018-09-161-2/+3
* assign-pull-requests: Add heading above missing Bugzilla address reportMichał Górny2018-09-161-9/+9
* Add warning about copyright policy changeMichał Górny2018-09-161-1/+5
* Add a proper heading to assignment commentMichał Górny2018-09-161-1/+1
* Allow linking up to 5 bugsMichał Górny2018-07-231-2/+5
* Support [noci] in titleMichał Górny2018-06-031-0/+2
* Python 3 love: urllib -> urllib.requestMichał Górny2018-05-231-1/+4
* Split proxied maints into separate fileMichał Górny2018-05-221-1/+4