Commit Graph

49 Commits

Author SHA256 Message Date
01e4f5f59e pr: fix error reporting for timeline PrjGit parse 2025-12-11 18:45:56 +01:00
19d9fc5f1e pr: request staging only when staging.config is there
If the project git does not have a staging.config, then there is
no reason to request reviews by the staging bot.
2025-12-11 17:01:15 +01:00
56c492ccdf PR: do not remove maintainer if also a reviewer
Maintainer review is only required if the PR is created by non-maintainer
or ProjetGit PR is created by non-bot. If maintainer review is not required,
but the maintainer is also listed as a Reviewer, then we cannot remove
this review request from the PR.
2025-12-08 18:03:00 +01:00
3a6009a5a3 pr: review requests cannot be stale
Yes, gitea marks these as stale too, but we should just ignore this
flag in case of requests. Stale requests are still pending.
2025-12-05 10:15:02 +01:00
2c4d25a5eb pr: remove maintainers if submitter is maintainer
If we have case where reviews are already there, for whatever reason
(eg. upgrade from older bot), remove the pending reviews if they
are not needed
2025-12-05 09:36:38 +01:00
71fd32a707 pr: fix debug statements 2025-12-04 18:04:51 +01:00
581131bdc8 pr: request and unrequest reviewers
Move the function to request and unrequest reviewers to a different
function. This will allow later simplification of the function
that determines if all reviews are complete.

Unrequesting of reviews is only possible in case of bot issued
review requests. The rest are left as-is.
2025-12-03 18:55:10 +01:00
495ed349ea common: refactor: FetchPRSet also fetches Reviews 2025-12-03 18:55:10 +01:00
350a255d6e pr: allow to fetch reviews in PRSet loader 2025-12-03 18:55:10 +01:00
e3087e46c2 PR: skip maintainer review if not needed
If project or package maintainer already reviewed the PR, as
appropriate, they are no longer re-added to the PR. We also need
to remove reviewers, but only if they were previously requested
by the bot and not something else.
2025-12-03 18:55:10 +01:00
f3a37f1158 pr: case fold 2025-11-19 19:32:55 +01:00
4293181b4e pr: improve logging of review errors
when user is missing, log only the missing user
2025-11-12 21:39:26 +01:00
1b9ee2d46a PR: ref requries PR fetch, and not in timeline 2025-10-02 15:13:43 +02:00
b7bbafacf8 PR: limit search to bot account for ProjectGit PRs 2025-10-02 13:45:31 +02:00
1390225614 PR: list missing PRs in the logs 2025-09-29 14:58:43 +02:00
8af7e58534 common: handle group data in PR reviews 2025-09-16 18:13:35 +02:00
72b979b587 PR: remove closed package PRs from a PRset
This used to happen as a side-effect of a different code path
that was removed in b96b784b38
2025-08-27 14:57:43 +02:00
6864e95404 PR: merge correct branches
Add sanity check that we merge correct branches too
2025-08-26 19:43:51 +02:00
7b87c4fd73 PR: fix parsing of project prs in timeline
Fixes: 933ca9a3db
2025-08-26 17:56:38 +02:00
Jan Zerebecki
933ca9a3db Fix PR link
to use ! instead of # . The later is for issues and only works due to
a redirect, which currently fails in gitea if a repo has its issue
tracker disabled.
2025-08-19 16:27:39 +02:00
76aec3aabb PR: PrjGit description generation in one place
This allows for easier editing and for guidance of what will
happen next
2025-07-18 16:26:35 +02:00
c5db1c83a7 PR: detect and rebase project git commits
When project is advanced, and we have other package changes
to same project, the project git changes need to be rebased. The
simplest way of doing this is to skip all the submodule conflicts
and re-create them. This allows the submodules changes to be
mergeable again.
2025-07-15 19:08:05 +02:00
9f0909621b PR: fix timeline fetches
only fetch latest reviews from a user, not all
2025-07-15 11:06:17 +02:00
7a0394e51b PR: use "open" not "opened" as state 2025-07-10 16:54:28 +02:00
51873eb048 PR: log prjgit PrjGit creator 2025-07-09 20:06:13 +02:00
0b4b1a4e21 common: Add basic OBS request APIs 2025-06-17 19:24:13 +02:00
6438a8625a Replace PrjGit creation logic 2025-06-16 14:22:21 +02:00
c8d65a3ae5 PR: refactor
Move AssociatedPR fetching
2025-06-11 16:28:02 +02:00
b849a72f31 PR: request optional reviews
Ignore these reviews in approval, for otherwise they can be used
to fetch optional review information
2025-06-10 18:48:42 +02:00
30c8b2fe57 PR: require PRs to be in opened state
PR's that are not opened (eg. closed, or merged) cannot be part of
a consistent PRset. Either everything is merged, or everything should
be opened.
2025-06-10 16:31:44 +02:00
69b0f9a5ed PR: fix error logging 2025-06-10 15:59:07 +02:00
af898a6b8d pr: manual project only merge ok is manual merge ok 2025-06-07 21:42:11 +02:00
b89cdb7664 PR: fix parsing comments from timeline 2025-06-05 19:15:53 +02:00
d37bfaa9d3 common: workaround case when user do not have gitea accounts and cannot get reviews assigned 2025-06-04 14:59:46 +02:00
7c229500c1 common: debug logging 2025-06-03 23:46:53 +02:00
b8cc0357a7 PR: limit manual merge to Projects
Add "ManualMergeProject" to require "merge ok" sign-offs on
project level only
2025-06-03 00:07:34 +02:00
aed0ac3ee9 PR: allow maintainers to approve merges by default 2025-06-02 23:54:05 +02:00
cca3575596 PR: add "merge ok" manual merge option 2025-06-02 16:22:50 +02:00
69dcebcf74 common: use Timeline for reviews
Gitea doesn't keep track of Stale reviews well. We should parse
Timeline of a PR *always* and apply our own logic to this instead
2025-05-30 16:51:30 +02:00
3bef967023 wip 2025-05-16 17:57:02 +02:00
9c3658b33e pr: remove pending requests
Remove all pending review requests when we merge
2025-05-13 18:34:56 +02:00
1498438fee pr: fix fetching for merging 2025-05-10 16:48:06 +02:00
4653904ded pr: merge - preliminary fixes 2025-05-09 17:28:35 +02:00
da1df24666 wip 2025-05-06 18:06:04 +02:00
9b5013ee45 git clone lock fixes 2025-04-15 18:15:35 +02:00
2d044d5664 git: one generator per app, multiple instances
this allows locking for access for each org
2025-04-14 18:33:18 +02:00
ba7686189e add GitClone for persistent git clones 2025-04-09 00:03:22 +02:00
06aef50047 start refactoring PR bot 2025-04-07 19:03:02 +02:00
Jan Zerebecki
4604aaeeba Rename bots-common to common
to make it match the name it is imported as
2025-04-03 22:38:28 +02:00