Skip to content
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

Fix package webhook #27839

Merged
merged 9 commits into from Oct 31, 2023
Merged

Conversation

lunny
Copy link
Member

@lunny lunny commented Oct 30, 2023

Fix #23742

@lunny lunny requested a review from KN4CK3R October 30, 2023 10:24
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Oct 30, 2023
@pull-request-size pull-request-size bot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Oct 30, 2023
@lunny lunny added backport/v1.20 This PR should be backported to Gitea 1.20 backport/v1.21 This PR should be backported to Gitea 1.21 labels Oct 30, 2023
@lunny lunny added this to the 1.22.0 milestone Oct 30, 2023
@github-actions github-actions bot added the modifies/api This PR adds API routes or modifies them label Oct 30, 2023
@GiteaBot 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 Oct 30, 2023
@GiteaBot 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 Oct 31, 2023
@techknowlogick techknowlogick enabled auto-merge (squash) October 31, 2023 03:30
@techknowlogick techknowlogick added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Oct 31, 2023
@techknowlogick techknowlogick merged commit 16d15ce into go-gitea:main Oct 31, 2023
25 checks passed
GiteaBot pushed a commit to GiteaBot/gitea that referenced this pull request Oct 31, 2023
Fix go-gitea#23742

---------

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
GiteaBot pushed a commit to GiteaBot/gitea that referenced this pull request Oct 31, 2023
Fix go-gitea#23742

---------

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Oct 31, 2023
@lunny lunny deleted the lunny/fix_package_webhook branch October 31, 2023 07:19
zjjhot added a commit to zjjhot/gitea that referenced this pull request Oct 31, 2023
* giteaofficial/main:
  Fix package webhook (go-gitea#27839)
  Add user secrets API integration tests (go-gitea#27832)
  Fix wrong relative path on obtain token from command line (go-gitea#27850)
  doc: actions/act-runner: document obtaining a runner registration token from gitea CLI (go-gitea#27845)
  Fix/upload artifact error windows (go-gitea#27802)
  Always use whole user name as link (go-gitea#27815)
  Fix display member unit in the menu bar if there are no hidden members in public org (go-gitea#27795)
  Add Index to pull_auto_merge.doer_id (go-gitea#27811)
  Bump workflows in github actions (go-gitea#27836)
  Allow pull requests Manually Merged option to be used by non-admins (go-gitea#27780)
silverwind pushed a commit that referenced this pull request Oct 31, 2023
Backport #27839 by @lunny

Fix #23742

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
silverwind pushed a commit that referenced this pull request Oct 31, 2023
Backport #27839 by @lunny

Fix #23742

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
@GiteaBot
Copy link
Contributor

I was unable to create a backport for 1.20. @lunny, please send one manually. 🍵

go run ./contrib/backport 27839
...  // fix git conflicts if any
go run ./contrib/backport --continue

@GiteaBot GiteaBot added the backport/manual No power to the bots! Create your backport yourself! label Oct 31, 2023
@GiteaBot
Copy link
Contributor

I was unable to create a backport for 1.21. @lunny, please send one manually. 🍵

go run ./contrib/backport 27839
...  // fix git conflicts if any
go run ./contrib/backport --continue

@lunny lunny added the backport/done All backports for this PR have been created label Oct 31, 2023
@lng2020 lng2020 removed the backport/manual No power to the bots! Create your backport yourself! label Nov 12, 2023
@niklaskorz
Copy link

Unfortunately this PR broke Gitea for us as the call to p.Repository inside func (m *MatrixPayload) Package(p *api.PackagePayload) (api.Payloader, error) (services/webhook/matrix.go:239) results in a nil pointer dereference. Looks like p.Repository is not set when triggered from UploadManifest. Stack trace (Gitea 1.21):

/source/services/webhook/matrix.go:215 (0x23cf774)
/source/services/webhook/payloader.go:58 (0x23dae5d)
/source/services/webhook/matrix.go:239 (0x23cfac4)
/source/services/webhook/webhook.go:198 (0x23dfc6b)
/source/services/webhook/webhook.go:261 (0x23e0435)
/source/services/webhook/notifier.go:882 (0x23da6d0)
/source/services/webhook/notifier.go:863 (0x23da495)
/source/services/notify/notify.go:353 (0x2306326)
/source/routers/api/packages/container/manifest.go:309 (0x23062da)
/source/routers/api/packages/container/manifest.go:184 (0x2305364)
/source/routers/api/packages/container/manifest.go:191 (0x230483c)
/source/routers/api/packages/container/manifest.go:75 (0x2304724)
/source/routers/api/packages/container/container.go:546 (0x2301bec)

@KN4CK3R
Copy link
Member

KN4CK3R commented Nov 16, 2023

Thank you for the info. Same error was in the MS Teams webhook.
#28089

fuxiaohei pushed a commit to fuxiaohei/gitea that referenced this pull request Jan 17, 2024
Fix go-gitea#23742

---------

Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Jan 29, 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.20 This PR should be backported to Gitea 1.20 backport/v1.21 This PR should be backported to Gitea 1.21 lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. modifies/api This PR adds API routes or modifies them size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Empty notice on Matrix
6 participants