Skip to content

Fix the response format for actions/workflows. #35009

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

Merged
merged 1 commit into from
Jul 9, 2025

Conversation

ScionOfDesign
Copy link
Contributor

This PR fixes the response format for the OpenAPI Spec of ActionsListRepositoryWorkflows.
It was specified in the OpenAPI spec as returning a []*ActionWorkflow, but it actually should return a api.ActionWorkflowResponse.

The test already expects an api.ActionWorkflowResponse like expected.

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

@wxiaoguang wxiaoguang left a comment

Choose a reason for hiding this comment

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

@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 Jul 9, 2025
Copy link
Contributor

@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.

Thanks, I missed this in the original PR

I think adding a Backport label for 1.24 makes sense to fix the openapi there as well

@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 Jul 9, 2025
@ChristopherHX ChristopherHX added the backport/v1.24 This PR should be backported to Gitea 1.24 label Jul 9, 2025
@wxiaoguang wxiaoguang merged commit bb0c84e into go-gitea:main Jul 9, 2025
26 checks passed
@GiteaBot GiteaBot added this to the 1.25.0 milestone Jul 9, 2025
@GiteaBot
Copy link
Collaborator

GiteaBot commented Jul 9, 2025

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

go run ./contrib/backport 35009
...  // 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 Jul 9, 2025
@wxiaoguang
Copy link
Contributor

Hmm, swagger conflict makes it impossible to backport automatically.

If you'd like to try to backport, you can checkout 1.24 branch and apply the change to it again (manually 🤣 ) and submit a new PR targeting 1.24 branch.

If there is any difficulty, other maintainers and I could also help.

ChristopherHX pushed a commit to ChristopherHX/gitea that referenced this pull request Jul 9, 2025
Backport go-gitea#35009

This PR fixes the response format for the OpenAPI Spec of
`ActionsListRepositoryWorkflows`.
It was specified in the OpenAPI spec as returning a `[]*ActionWorkflow`,
but it actually should return a `api.ActionWorkflowResponse`.

The test already expects an `api.ActionWorkflowResponse` like expected.
@ChristopherHX
Copy link
Contributor

ChristopherHX commented Jul 9, 2025

We could improve the backport program here, e.g. if the only conflict is swagger delte the generated file, regenerate.

I am doing this now manually

silverwind pushed a commit that referenced this pull request Jul 9, 2025
Backport #35009

This PR fixes the response format for the OpenAPI Spec of
`ActionsListRepositoryWorkflows`.
It was specified in the OpenAPI spec as returning a `[]*ActionWorkflow`,
but it actually should return a `api.ActionWorkflowResponse`.

The test already expects an `api.ActionWorkflowResponse` like expected.

Co-authored-by: Scion <Filiecs2@gmail.com>
@ScionOfDesign ScionOfDesign deleted the fix-list-repo-response branch July 9, 2025 16:47
zjjhot added a commit to zjjhot/gitea that referenced this pull request Jul 10, 2025
* giteaofficial/main:
  [skip ci] Updated translations via Crowdin
  Docs/fix typo and grammar in CONTRIBUTING.md (go-gitea#35024)
  fix: improve english grammar and readability in locale_en-US.ini (go-gitea#35017)
  Add labeler config for `topic/code-linting` (go-gitea#35020)
  Fix various problems (go-gitea#35012)
  Fix the response format for `actions/workflows`. (go-gitea#35009)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/manual No power to the bots! Create your backport yourself! backport/v1.24 This PR should be backported to Gitea 1.24 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 modifies/go Pull requests that update Go code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants