mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-03-26 19:43:05 -04:00
- UpdateTrustedWithPullRequest - cancels or approves runs and keep track of posters that are to always be trusted - GetPullRequestUserIsTrustedWithActions - logic to determine if a user is to be implicitly trusted (e.g. the admin of the instance), explicitly trusted (i.e. it is in the ActionUser table) or not at all. - PullRequestCancel & PullRequestApprove will either cancel or approve all runs of a given pull request. - RevokeTrust is almost the same as PullRequestCancel except it operates as if revoking all pull requests of a given poster, cancelling ongoing jobs. This is expected to be used when blocking a user. - AlwaysTrust is almost the same as PullRequestApprove except it operates as if allways approving all pull requests of a given poster, switching their jobs to waiting. - SetRunTrustForPullRequest helper to set the fields of ActionRun - CleanupActionUser - get rid of unused trust records
84 lines
1.4 KiB
YAML
84 lines
1.4 KiB
YAML
-
|
|
id: 81000
|
|
repo_id: 10
|
|
index: 1000
|
|
poster_id: 4 # regular user
|
|
original_author_id: 0
|
|
name: pr1000
|
|
content: pull request
|
|
milestone_id: 0
|
|
priority: 0
|
|
is_closed: false
|
|
is_pull: true
|
|
num_comments: 0
|
|
created_unix: 946684820
|
|
updated_unix: 978307180
|
|
is_locked: false
|
|
|
|
-
|
|
id: 82000
|
|
repo_id: 11
|
|
index: 2000
|
|
poster_id: 2 # regular user
|
|
original_author_id: 0
|
|
name: pr2000
|
|
content: pull request
|
|
milestone_id: 0
|
|
priority: 0
|
|
is_closed: false
|
|
is_pull: true
|
|
num_comments: 0
|
|
created_unix: 946684820
|
|
updated_unix: 978307180
|
|
is_locked: false
|
|
|
|
-
|
|
id: 83000
|
|
repo_id: 10
|
|
index: 3000
|
|
poster_id: 1 # admin
|
|
original_author_id: 0
|
|
name: pr3000
|
|
content: pull request
|
|
milestone_id: 0
|
|
priority: 0
|
|
is_closed: false
|
|
is_pull: true
|
|
num_comments: 0
|
|
created_unix: 946684820
|
|
updated_unix: 978307180
|
|
is_locked: false
|
|
|
|
-
|
|
id: 84000
|
|
repo_id: 10
|
|
index: 4000
|
|
poster_id: 5 # regular user
|
|
original_author_id: 0
|
|
name: pr4000
|
|
content: pull request
|
|
milestone_id: 0
|
|
priority: 0
|
|
is_closed: false
|
|
is_pull: true
|
|
num_comments: 0
|
|
created_unix: 946684820
|
|
updated_unix: 978307180
|
|
is_locked: false
|
|
|
|
-
|
|
id: 85000
|
|
repo_id: 10
|
|
index: 5000
|
|
poster_id: 29 # restricted user
|
|
original_author_id: 0
|
|
name: pr5000
|
|
content: pull request
|
|
milestone_id: 0
|
|
priority: 0
|
|
is_closed: false
|
|
is_pull: true
|
|
num_comments: 0
|
|
created_unix: 946684820
|
|
updated_unix: 978307180
|
|
is_locked: false
|