-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid user does not exist error when detecting schedule actions when the commit author is an external user #30357
Merged
wolfogre
merged 4 commits into
go-gitea:main
from
yp05327:fix-external-user-scheduled-action
Apr 11, 2024
Merged
Avoid user does not exist error when detecting schedule actions when the commit author is an external user #30357
wolfogre
merged 4 commits into
go-gitea:main
from
yp05327:fix-external-user-scheduled-action
Apr 11, 2024
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GiteaBot
added
the
lgtm/need 2
This PR needs two approvals by maintainers to be considered for merging.
label
Apr 9, 2024
pull-request-size
bot
added
the
size/XS
Denotes a PR that changes 0-9 lines, ignoring generated files.
label
Apr 9, 2024
lunny
reviewed
Apr 9, 2024
pull-request-size
bot
added
size/S
Denotes a PR that changes 10-29 lines, ignoring generated files.
and removed
size/XS
Denotes a PR that changes 0-9 lines, ignoring generated files.
labels
Apr 10, 2024
Thanks for the suggestion from @wolfogre |
lunny
reviewed
Apr 10, 2024
lunny
approved these changes
Apr 10, 2024
GiteaBot
added
lgtm/need 1
This PR needs approval from one additional maintainer to be merged.
and removed
lgtm/need 2
This PR needs two approvals by maintainers to be considered for merging.
labels
Apr 10, 2024
wolfogre
approved these changes
Apr 11, 2024
GiteaBot
added
lgtm/done
This PR has enough approvals to get merged. There are no important open reservations anymore.
and removed
lgtm/need 1
This PR needs approval from one additional maintainer to be merged.
labels
Apr 11, 2024
wolfogre
added
backport/v1.21
This PR should be backported to Gitea 1.21
backport/v1.22
This PR should be backported to Gitea 1.22
reviewed/wait-merge
This pull request is part of the merge queue. It will be merged soon.
labels
Apr 11, 2024
GiteaBot
pushed a commit
to GiteaBot/gitea
that referenced
this pull request
Apr 11, 2024
…the commit author is an external user (go-gitea#30357) ![image](https://github.com/go-gitea/gitea/assets/18380374/ddf6ee84-2242-49b9-b066-bd8429ba4d76) When repo is a mirror, and commit author is an external user, then `GetUserByEmail` will return error. reproduce/test: - mirror Gitea to your instance - disable action and enable it again, this will trigger `DetectAndHandleSchedules` ps: also follow go-gitea#24706, it only fixed normal runs, not scheduled runs.
GiteaBot
pushed a commit
to GiteaBot/gitea
that referenced
this pull request
Apr 11, 2024
…the commit author is an external user (go-gitea#30357) ![image](https://github.com/go-gitea/gitea/assets/18380374/ddf6ee84-2242-49b9-b066-bd8429ba4d76) When repo is a mirror, and commit author is an external user, then `GetUserByEmail` will return error. reproduce/test: - mirror Gitea to your instance - disable action and enable it again, this will trigger `DetectAndHandleSchedules` ps: also follow go-gitea#24706, it only fixed normal runs, not scheduled runs.
GiteaBot
removed
the
reviewed/wait-merge
This pull request is part of the merge queue. It will be merged soon.
label
Apr 11, 2024
lunny
pushed a commit
that referenced
this pull request
Apr 11, 2024
…the commit author is an external user (#30357) (#30408) Backport #30357 by @yp05327 ![image](https://github.com/go-gitea/gitea/assets/18380374/ddf6ee84-2242-49b9-b066-bd8429ba4d76) When repo is a mirror, and commit author is an external user, then `GetUserByEmail` will return error. reproduce/test: - mirror Gitea to your instance - disable action and enable it again, this will trigger `DetectAndHandleSchedules` ps: also follow #24706, it only fixed normal runs, not scheduled runs. Co-authored-by: yp05327 <[email protected]>
lunny
pushed a commit
that referenced
this pull request
Apr 11, 2024
…the commit author is an external user (#30357) (#30409) Backport #30357 by @yp05327 ![image](https://github.com/go-gitea/gitea/assets/18380374/ddf6ee84-2242-49b9-b066-bd8429ba4d76) When repo is a mirror, and commit author is an external user, then `GetUserByEmail` will return error. reproduce/test: - mirror Gitea to your instance - disable action and enable it again, this will trigger `DetectAndHandleSchedules` ps: also follow #24706, it only fixed normal runs, not scheduled runs. Co-authored-by: yp05327 <[email protected]>
@wolfogre |
zjjhot
added a commit
to zjjhot/gitea
that referenced
this pull request
Apr 12, 2024
* giteaofficial/main: Change the default maxPerPage for gitbucket (go-gitea#30392) Fix the spacing issue in the Project view (go-gitea#30415) Add commit status summary table to reduce query from commit status table (go-gitea#30223) Split `issue edit` code from `repo-legacy.js` into its own file (go-gitea#30419) Check the token's owner and repository when registering a runner (go-gitea#30406) Avoid user does not exist error when detecting schedule actions when the commit author is an external user (go-gitea#30357) Update actions variables documents (go-gitea#30394) Fix author name alignment in commits table (go-gitea#30396)
No, the permission when running the job is not decided by the trigger user. |
silverwind
pushed a commit
that referenced
this pull request
Apr 20, 2024
Follow #30357 When user push to default branch, the schedule trigger user will be the user. When disable then enable action units in settings, the schedule trigger user will be action user. When repo is a mirror, the schedule trigger user will be action user. ( before it will return error, fixed by #30357) As scheduled job is a cron, the trigger user should be action user from Gitea, not a real user. --------- Co-authored-by: Giteabot <[email protected]>
GiteaBot
added a commit
to GiteaBot/gitea
that referenced
this pull request
Apr 20, 2024
Follow go-gitea#30357 When user push to default branch, the schedule trigger user will be the user. When disable then enable action units in settings, the schedule trigger user will be action user. When repo is a mirror, the schedule trigger user will be action user. ( before it will return error, fixed by go-gitea#30357) As scheduled job is a cron, the trigger user should be action user from Gitea, not a real user. --------- Co-authored-by: Giteabot <[email protected]>
GiteaBot
added a commit
to GiteaBot/gitea
that referenced
this pull request
Apr 20, 2024
Follow go-gitea#30357 When user push to default branch, the schedule trigger user will be the user. When disable then enable action units in settings, the schedule trigger user will be action user. When repo is a mirror, the schedule trigger user will be action user. ( before it will return error, fixed by go-gitea#30357) As scheduled job is a cron, the trigger user should be action user from Gitea, not a real user. --------- Co-authored-by: Giteabot <[email protected]>
lunny
pushed a commit
that referenced
this pull request
Apr 20, 2024
Backport #30581 by @yp05327 Follow #30357 When user push to default branch, the schedule trigger user will be the user. When disable then enable action units in settings, the schedule trigger user will be action user. When repo is a mirror, the schedule trigger user will be action user. ( before it will return error, fixed by #30357) As scheduled job is a cron, the trigger user should be action user from Gitea, not a real user. Co-authored-by: yp05327 <[email protected]>
lunny
pushed a commit
that referenced
this pull request
Apr 20, 2024
Backport #30581 by @yp05327 Follow #30357 When user push to default branch, the schedule trigger user will be the user. When disable then enable action units in settings, the schedule trigger user will be action user. When repo is a mirror, the schedule trigger user will be action user. ( before it will return error, fixed by #30357) As scheduled job is a cron, the trigger user should be action user from Gitea, not a real user. Co-authored-by: yp05327 <[email protected]>
DennisRasey
pushed a commit
to DennisRasey/forgejo
that referenced
this pull request
Apr 22, 2024
Follow go-gitea/gitea#30357 When user push to default branch, the schedule trigger user will be the user. When disable then enable action units in settings, the schedule trigger user will be action user. When repo is a mirror, the schedule trigger user will be action user. ( before it will return error, fixed by #30357) As scheduled job is a cron, the trigger user should be action user from Gitea, not a real user. --------- Co-authored-by: Giteabot <[email protected]> (cherry picked from commit cb6814adad4dc81a683b50826a211ce7bce731d7) Conflicts: - services/actions/notifier_helper.go Conflict resolved by keeping Forgejo's version of the line. (cherry picked from commit 829c3c6)
DennisRasey
pushed a commit
to DennisRasey/forgejo
that referenced
this pull request
Apr 22, 2024
Follow go-gitea/gitea#30357 When user push to default branch, the schedule trigger user will be the user. When disable then enable action units in settings, the schedule trigger user will be action user. When repo is a mirror, the schedule trigger user will be action user. ( before it will return error, fixed by #30357) As scheduled job is a cron, the trigger user should be action user from Gitea, not a real user. --------- Co-authored-by: Giteabot <[email protected]> (cherry picked from commit cb6814adad4dc81a683b50826a211ce7bce731d7) Conflicts: - services/actions/notifier_helper.go Conflict resolved by keeping Forgejo's version of the line.
uli-heller
pushed a commit
to uli-heller/forgejo
that referenced
this pull request
Apr 24, 2024
Follow go-gitea/gitea#30357 When user push to default branch, the schedule trigger user will be the user. When disable then enable action units in settings, the schedule trigger user will be action user. When repo is a mirror, the schedule trigger user will be action user. ( before it will return error, fixed by #30357) As scheduled job is a cron, the trigger user should be action user from Gitea, not a real user. --------- Co-authored-by: Giteabot <[email protected]> (cherry picked from commit cb6814adad4dc81a683b50826a211ce7bce731d7) Conflicts: - services/actions/notifier_helper.go Conflict resolved by keeping Forgejo's version of the line. (cherry picked from commit 829c3c6)
wxiaoguang
added
the
skip-changelog
This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features.
label
Apr 27, 2024
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
backport/done
All backports for this PR have been created
backport/v1.21
This PR should be backported to Gitea 1.21
backport/v1.22
This PR should be backported to Gitea 1.22
lgtm/done
This PR has enough approvals to get merged. There are no important open reservations anymore.
modifies/go
Pull requests that update Go code
size/S
Denotes a PR that changes 10-29 lines, ignoring generated files.
skip-changelog
This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features.
type/bug
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When repo is a mirror, and commit author is an external user, then
GetUserByEmail
will return error.reproduce/test:
DetectAndHandleSchedules
ps: also follow #24706, it only fixed normal runs, not scheduled runs.