This is a follow-up to #3154, which added Forgejo events as unchecked events to AllowlistChecker (previously just Allowlist), which is sufficient for downstream support, but not upstream. In order to add Forgejo support for upstream CI, these events need to be authorized (similarly as it is done for GitHub and GitLab).
Remove Forgejo events from this Union:
|
UncheckedEvent = Union[ |
|
anitya.NewHotness, |
|
copr.CoprBuild, |
|
forgejo.push.Commit, |
|
forgejo.pr.Action, |
|
forgejo.pr.Comment, |
|
forgejo.issue.Comment, |
|
forgejo.action_run.Push, |
|
forgejo.action_run.PullRequest, |
|
github.check.Rerun, |
|
github.installation.Installation, |
|
koji.result.Task, |
|
koji.result.Build, |
|
pagure.pr.Comment, |
|
pagure.pr.Action, |
|
pagure.push.Commit, |
|
testing_farm.Result, |
|
] |
Forgejo events need to be removed here as well. The logic in AllowlistChecker.check_and_report() needs to be refined to distinguish between upstream and downstream events, and not let upstream events bypass authorization:
|
( # events that are not checked against allowlist |
|
# [XXX] dist-git Forgejo events are unchecked |
|
# upstream Forgejo events would require authorization checking |
|
forgejo.push.Commit, |
|
forgejo.pr.Action, |
|
forgejo.pr.Comment, |
|
forgejo.issue.Comment, |
|
forgejo.action_run.Push, |
|
forgejo.action_run.PullRequest, |
|
pagure.push.Commit, |
|
pagure.pr.Action, |
|
pagure.pr.Comment, |
|
copr.CoprBuild, |
|
testing_farm.Result, |
|
github.installation.Installation, |
|
koji.result.Task, |
|
koji.result.Build, |
|
koji.tag.Build, |
|
github.check.Rerun, |
|
anitya.NewHotness, |
|
openscanhub.task.Started, |
|
openscanhub.task.Finished, |
|
): self._check_unchecked_event, |
This is a follow-up to #3154, which added Forgejo events as unchecked events to
AllowlistChecker(previously justAllowlist), which is sufficient for downstream support, but not upstream. In order to add Forgejo support for upstream CI, these events need to be authorized (similarly as it is done for GitHub and GitLab).Remove Forgejo events from this Union:
packit-service/packit_service/worker/allowlist_checker.py
Lines 39 to 56 in cc8356c
Forgejo events need to be removed here as well. The logic in
AllowlistChecker.check_and_report()needs to be refined to distinguish between upstream and downstream events, and not let upstream events bypass authorization:packit-service/packit_service/worker/allowlist_checker.py
Lines 289 to 311 in cc8356c