gitea/services/issue
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
..
assignee.go Fix issue label deletion with Actions tokens (#37013) 2026-03-29 09:21:14 +00:00
assignee_test.go Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
comments.go Creating push comments before invoke pull request checking (#35647) 2025-10-14 19:19:27 +00:00
commit.go Fix issue label deletion with Actions tokens (#37013) 2026-03-29 09:21:14 +00:00
commit_test.go Don't create self-references in merged PRs (#36490) 2026-01-30 20:12:24 +00:00
content.go
issue.go Enable `nilnil` linter for new code (#36591) 2026-02-16 09:57:18 +00:00
issue_test.go Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
label.go Fix issue label deletion with Actions tokens (#37013) 2026-03-29 09:21:14 +00:00
label_test.go Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
main_test.go
milestone.go Use db.WithTx/WithTx2 instead of TxContext when possible (#35130) 2025-07-22 10:02:01 -07:00
milestone_test.go Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
pull.go Fix various trivial problems (#36921) 2026-03-19 07:13:55 +08:00
reaction.go
reaction_test.go Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
status.go Use db.WithTx/WithTx2 instead of TxContext when possible (#35130) 2025-07-22 10:02:01 -07:00
suggestion.go Rework suggestion backend (#33538) 2025-02-10 16:24:05 +00:00
suggestion_test.go Remove incorrect "db.DefaultContext" usages (#35366) 2025-08-28 03:52:43 +00:00
template.go Limit reading bytes instead of ReadAll (#35928) 2025-11-12 19:44:49 +08:00