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

Enhance routers for the Actions variable operations #33547

Merged
merged 9 commits into from
Feb 10, 2025

Conversation

wolfogre
Copy link
Member

  • Find the variable before updating or deleting
  • Move the main logic from routers/web/repo/setting/variables.go to routers/web/shared/actions/variables.go.

@wolfogre wolfogre added type/bug topic/security Something leaks user information or is otherwise vulnerable. Should be fixed! topic/gitea-actions related to the actions of Gitea backport/v1.23 This PR should be backported to Gitea 1.23 labels Feb 10, 2025
@wolfogre wolfogre added this to the 1.23.4 milestone Feb 10, 2025
@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Feb 10, 2025
@pull-request-size pull-request-size bot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Feb 10, 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 Feb 10, 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.

I think we can refactor and add some tests later.

@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 Feb 10, 2025
@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 Feb 10, 2025
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Feb 10, 2025
@wxiaoguang wxiaoguang marked this pull request as draft February 10, 2025 18:33
@wxiaoguang wxiaoguang force-pushed the bugfix/variable_router branch from 4c56071 to ca111b7 Compare February 10, 2025 19:30
@pull-request-size pull-request-size bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Feb 10, 2025
@wxiaoguang wxiaoguang force-pushed the bugfix/variable_router branch from ca111b7 to a624b88 Compare February 10, 2025 19:32
@wxiaoguang wxiaoguang force-pushed the bugfix/variable_router branch from a624b88 to 5f756dd Compare February 10, 2025 19:33
@wxiaoguang wxiaoguang marked this pull request as ready for review February 10, 2025 20:12
@wxiaoguang wxiaoguang merged commit c422f17 into go-gitea:main Feb 10, 2025
26 checks passed
@GiteaBot
Copy link
Collaborator

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

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

@GiteaBot GiteaBot added backport/manual No power to the bots! Create your backport yourself! and removed reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. labels Feb 10, 2025
zjjhot added a commit to zjjhot/gitea that referenced this pull request Feb 11, 2025
* giteaofficial/main:
  Enhance routers for the Actions runner operations (go-gitea#33549)
  [skip ci] Updated translations via Crowdin
  Run yamllint with strict mode, fix issue (go-gitea#33551)
  Enhance routers for the Actions variable operations (go-gitea#33547)
  enhancement: add additional command hints for PowerShell & CMD (go-gitea#33548)
  Feature: Support workflow event dispatch via API (go-gitea#33545)
  Optimize the dashboard (go-gitea#32990)
  Rework suggestion backend (go-gitea#33538)
  Revert "Feature: Support workflow event dispatch via API (go-gitea#32059)" (go-gitea#33541)
lunny pushed a commit to lunny/gitea that referenced this pull request Feb 11, 2025
- Find the variable before updating or deleting
- Move the main logic from `routers/web/repo/setting/variables.go` to
`routers/web/shared/actions/variables.go`.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
@lunny lunny added the backport/done All backports for this PR have been created label Feb 11, 2025
wxiaoguang added a commit that referenced this pull request Feb 11, 2025
Backport #33547

Co-authored-by: Jason Song <i@wolfogre.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport/done All backports for this PR have been created backport/manual No power to the bots! Create your backport yourself! backport/v1.23 This PR should be backported to Gitea 1.23 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 size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. topic/gitea-actions related to the actions of Gitea topic/security Something leaks user information or is otherwise vulnerable. Should be fixed! type/bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants