gitea/services/pull
Nicolas db7eb4d51b
Fix issue label deletion with Actions tokens (#37013)
Use shared repo permission resolution for Actions task users in issue
label remove and clear paths, and add a regression test for deleting
issue labels with a Gitea Actions token.

This fixes issue label deletion when the request is authenticated with a
Gitea Actions token.
Fixes #37011 

The bug was that the delete path re-resolved repository permissions
using the normal user permission helper, which does not handle Actions
task users. As a result, `DELETE
/api/v1/repos/{owner}/{repo}/issues/{index}/labels/{id}` could return
`500` for Actions tokens even though label listing and label addition
worked.

---------

Co-authored-by: Codex <codex@openai.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
2026-03-29 09:21:14 +00:00
..
check.go Pull Request Pusher should be the author of the merge (#36581) 2026-03-02 20:05:58 +00:00
check_test.go Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
comment.go Fix force push time-line commit comments of pull request (#36653) 2026-02-22 21:30:31 +00:00
comment_test.go Fix force push time-line commit comments of pull request (#36653) 2026-02-22 21:30:31 +00:00
commit_status.go Add ability to download subpath archive (#36371) 2026-01-16 09:31:12 +00:00
commit_status_test.go Fix required contexts and commit status matching bug (#34815) 2025-06-22 23:31:46 +00:00
edits.go Fix issue label deletion with Actions tokens (#37013) 2026-03-29 09:21:14 +00:00
lfs.go Refactor git command stdio pipe (#36422) 2026-01-22 06:04:26 +00:00
main_test.go make writing main test easier (#27270) 2023-09-28 01:38:53 +00:00
merge.go Use merge tree to detect conflicts when possible (#36400) 2026-01-27 11:57:20 -08:00
merge_ff_only.go Use merge tree to detect conflicts when possible (#36400) 2026-01-27 11:57:20 -08:00
merge_merge.go Use merge tree to detect conflicts when possible (#36400) 2026-01-27 11:57:20 -08:00
merge_prepare.go Use merge tree to detect conflicts when possible (#36400) 2026-01-27 11:57:20 -08:00
merge_rebase.go Use merge tree to detect conflicts when possible (#36400) 2026-01-27 11:57:20 -08:00
merge_squash.go Use merge tree to detect conflicts when possible (#36400) 2026-01-27 11:57:20 -08:00
merge_test.go Always use an empty line to separate the commit message and trailer (#34512) 2025-06-02 06:29:16 +00:00
merge_tree.go Use merge tree to detect conflicts when possible (#36400) 2026-01-27 11:57:20 -08:00
merge_tree_test.go Use merge tree to detect conflicts when possible (#36400) 2026-01-27 11:57:20 -08:00
patch.go Fix various trivial problems (#36953) 2026-03-23 18:23:42 +00:00
patch_unmerged.go Use merge tree to detect conflicts when possible (#36400) 2026-01-27 11:57:20 -08:00
protected_branch.go Use git model to detect whether branch exist instead of gitrepo method (#35459) 2025-10-25 10:08:25 -07:00
pull.go Fix issue label deletion with Actions tokens (#37013) 2026-03-29 09:21:14 +00:00
pull_test.go Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
review.go Enable `nilnil` linter for new code (#36591) 2026-02-16 09:57:18 +00:00
review_test.go Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
reviewer.go Fix team permissions (#34827) 2025-06-24 21:24:09 +08:00
reviewer_test.go Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
temp_repo.go Use merge tree to detect conflicts when possible (#36400) 2026-01-27 11:57:20 -08:00
update.go Fix issue label deletion with Actions tokens (#37013) 2026-03-29 09:21:14 +00:00
update_rebase.go Use merge tree to detect conflicts when possible (#36400) 2026-01-27 11:57:20 -08:00
update_test.go feat: Add configurable permissions for Actions automatic tokens (#36173) 2026-03-21 15:39:47 -07:00