-
-
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
Add new event commit status creation and webhook implementation #27151
Conversation
Looks like a nice idea to have a webhook event for this. However the original idea behind the issue was rather to get an internal notification (shown when clicking on the bell in the UI) for failed PR status reports. So a CI like gitea actions would send a PR status update and if that is a failed one it would create a new notification entry in the list. |
The UI notification could be another PR because it will need more work, maybe it can be based on #27058 |
@lunny Could you please explain this change? I don't understand which action is triggered by this method in the end...... |
This event is triggered by a new commit status submitted to Gitea. Currently only webhook notfier implement it so then when a commit status has been submitted, a webhook will be triggered. |
@lunny I don't manage to trigger a webhook. Do I misunderstand you? I run a workflow on a repo, which succeeds or fails. I have a Telegram webhook which triggers on commit, but not on workflow success/failure |
There is no CI/CD success/failure message directly. But we can use commit status success/failure with context and commitid to know whether/which the task success/failure. |
Yes, but do I have to activate it separately somewhere to also get commit status over webhook? |
Ping :) Would really like to be able to review this before 1.22. Do I misunderstand something, or does it currently not fully work? |
@lunny I still am not able to trigger a webhook notification. What do I need to do to be able to test it? |
Sorry, I think it's not finished when you tested it. I think it's ready now. |
@lunny Still no success. If the feature is working as intended for you, could you please provide some instructions how to test it properly? |
* giteaofficial/main: Refactor sidebar label selector (go-gitea#32460) Fix mermaid diagram height when initially hidden (go-gitea#32457) Add reviewers selection to new pull request (go-gitea#32403) Fix issue sidebar (go-gitea#32455) Refactor language menu and dom utils (go-gitea#32450) Fix broken releases when re-pushing tags (go-gitea#32435) Refactor issue page info (go-gitea#32445) Split issue sidebar into small templates (go-gitea#32444) Only provide the commit summary for Discord webhook push events (go-gitea#32432) Add new event commit status creation and webhook implementation (go-gitea#27151) Support quote selected comments to reply (go-gitea#32431) Move AddCollabrator and CreateRepositoryByExample to service layer (go-gitea#32419) # Conflicts: # templates/repo/issue/view_content/context_menu.tmpl
This PR introduces a new event which is similar as Github's. When a new commit status submitted, the event will be trigged. That means, now we can receive all feedback from CI/CD system in webhooks or other notify systems.
ref: https://docs.github.com/en/webhooks/webhook-events-and-payloads#status
Fix #20749