Skip to content

Add workflow_run api + webhook #33964

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

Open
wants to merge 59 commits into
base: main
Choose a base branch
from

Conversation

ChristopherHX
Copy link
Contributor

@ChristopherHX ChristopherHX commented Mar 21, 2025

Implements

Fixes

  • workflow_job webhook url to no longer contain the runs/<run> part to align with api
  • workflow instance does now use it's name inside the file instead of filename if set

Refactoring

  • Moved a lot of logic from workflows/workflow_job into a shared module used by both webhook and api

TODO

  • Verify Keda Compatibility

Closes #23670
Closes #23796
Closes #24898
Replaces #28047 and is much more complete

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Mar 21, 2025
@github-actions github-actions bot added modifies/translation modifies/api This PR adds API routes or modifies them modifies/go Pull requests that update Go code labels Mar 21, 2025
Copy link
Contributor Author

@ChristopherHX ChristopherHX left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test cases has been added, so moving out of draft after several weeks.

Now e2e usage case verification with external tools like keda are outstanding.

Comment on lines 88 to 90
if opts.OwnerID > 0 {
cond = cond.And(builder.Eq{"owner_id": opts.OwnerID})
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously unused, we need an inner join for this condition

Comment on lines 82 to 84
if opts.OwnerID > 0 {
cond = cond.And(builder.Eq{"owner_id": opts.OwnerID})
}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Previously unused, we need an inner join for this condition

func (opts FindRunOptions) ToOrders() string {
return "`id` DESC"
return "`action_run`.`id` DESC"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

inner join requires mentioning the table name

@ChristopherHX ChristopherHX marked this pull request as ready for review May 5, 2025 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. modifies/api This PR adds API routes or modifies them modifies/go Pull requests that update Go code modifies/templates This PR modifies the template files modifies/translation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

workflow_run for action trigger event Webhook trigger for actions (CI) Implement workflow_* webhook event
3 participants