forgejo/services/actions
BtbN 9828aca733 feat: github compatability for removing label from issue API (#8831)
On GitHub, `DELETE /repos/{owner}/{repo}/issues/{index}/labels/{id}` takes the label name, not id:

https://docs.github.com/en/rest/issues/labels?apiVersion=2022-11-28#remove-a-label-from-an-issue

This breaks workflows and actions that interact with labels and delete them.
It also makes the API quite difficult to use, always having to query the ID first before deleting a label from an issue, potentially with two API calls, because it could be a repo or org label.

For backwards compatibility, if no label with the given name is found, and the name converts to an int without error, it'll still be looked up by ID.

The API on GitHub also does not return 204, but 200, with the label it just removed from the issue as content. So this is returned when `application/vnd.github+json` is set in the `Accept` request header.

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/8831
Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Co-authored-by: BtbN <btbn@btbn.de>
Co-committed-by: BtbN <btbn@btbn.de>
2025-08-30 03:29:23 +02:00
..
TestServiceActions_startTask fix: a corrupted Forgejo Actions scheduled workflow is disabled (#8942) 2025-08-18 22:45:10 +02:00
auth.go chore(cleanup): replaces unnecessary calls to formatting functions by non-formatting equivalents (#7994) 2025-05-29 17:34:29 +02:00
auth_test.go Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
cleanup.go feat: auto cleanup of offline runners (#7803) 2025-06-08 00:13:37 +02:00
cleanup_test.go Update module github.com/golangci/golangci-lint/cmd/golangci-lint to v2 (forgejo) (#7367) 2025-03-28 22:22:21 +00:00
clear_tasks.go Actions Done Notification (#7491) 2025-04-24 15:15:24 +00:00
commit_status.go chore: github.com/nektos/act is now at code.forgejo.org/forgejo/runner/v9 (#8742) 2025-07-31 13:41:59 +02:00
context.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
context_test.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
init.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
interface.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
job_emitter.go chore: github.com/nektos/act is now at code.forgejo.org/forgejo/runner/v9 (#8742) 2025-07-31 13:41:59 +02:00
job_emitter_test.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
job_parser.go fix: de-duplicate Forgejo Actions job names when needed (#8864) 2025-08-13 06:52:44 +02:00
job_parser_test.go fix: de-duplicate Forgejo Actions job names when needed (#8864) 2025-08-13 06:52:44 +02:00
main_test.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
notifier.go feat: github compatability for removing label from issue API (#8831) 2025-08-30 03:29:23 +02:00
notifier_helper.go fix: Actions workflows triggered by comments or labels to pull requests may access secrets (#9003) 2025-08-25 20:11:45 +02:00
notifier_helper_test.go fix: Actions workflows triggered by comments or labels to pull requests may access secrets (#9003) 2025-08-25 20:11:45 +02:00
rerun.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
rerun_test.go chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
schedule_tasks.go fix: a corrupted Forgejo Actions scheduled workflow is disabled (#8942) 2025-08-18 22:45:10 +02:00
schedule_tasks_test.go fix: a corrupted Forgejo Actions scheduled workflow is disabled (#8942) 2025-08-18 22:45:10 +02:00
task.go chore(cleanup): replaces unnecessary calls to formatting functions by non-formatting equivalents (#7994) 2025-05-29 17:34:29 +02:00
variables.go fix: allow Forgejo Actions environment variables starting with CI (#8850) 2025-08-10 22:56:16 +02:00
variables_test.go fix: allow Forgejo Actions environment variables starting with CI (#8850) 2025-08-10 22:56:16 +02:00
workflows.go fix: de-duplicate Forgejo Actions job names when needed (#8864) 2025-08-13 06:52:44 +02:00