forgejo/services
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
..
actions feat: github compatability for removing label from issue API (#8831) 2025-08-30 03:29:23 +02:00
agit fix: correctly mark reviews as stale for AGit PRs (#8450) 2025-07-09 07:38:00 +02:00
asymkey feat: consider WebAuthn & SSH for instance signing (#7693) 2025-04-29 10:34:07 +00:00
attachment fix: allow instance API URLs in release assets (#7644) 2025-06-09 10:01:59 +02:00
auth feat: add option to allow non-local users to change usernames (#8714) 2025-08-06 20:25:13 +02:00
automerge fix: check PR reference on base repository (#8431) 2025-07-06 14:23:47 +02:00
context feat: Global 2FA enforcement (#8753) 2025-08-15 10:56:45 +02:00
contexttest Replace the 'relative-time' element scripting with custom, translatable rewrite (#6154) 2025-05-03 14:11:01 +00:00
convert Add support for migrating from Pagure (#8513) 2025-08-11 16:56:26 +02:00
cron feat: add configurable timeout for automatically removing resolved reports (#7940) 2025-07-28 14:52:13 +02:00
doctor chore(cleanup): replaces unnecessary calls to formatting functions by non-formatting equivalents (#7994) 2025-05-29 17:34:29 +02:00
externalaccount chore(cleanup): replaces unnecessary calls to formatting functions by non-formatting equivalents (#7994) 2025-05-29 17:34:29 +02:00
f3 Update module code.forgejo.org/f3/gof3/v3 to v3.11.0 (forgejo) (#8056) 2025-06-03 14:24:57 +02:00
federation Sent user activities to distant federated server (#8792) 2025-08-06 16:16:13 +02:00
feed fix: comment starting with a mermaid block displays error in activity feed (#8896) 2025-08-15 11:31:23 +02:00
forgejo chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
forms feat: add option to allow non-local users to change usernames (#8714) 2025-08-06 20:25:13 +02:00
gitdiff feat(build): improve lint-locale-usage further (#8736) 2025-08-27 23:47:34 +02:00
indexer chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
issue feat: search in the docs directory for issue and pull request templates (#8863) 2025-08-26 22:08:10 +02:00
lfs chore(cleanup): replaces unnecessary calls to formatting functions by non-formatting equivalents (#7994) 2025-05-29 17:34:29 +02:00
mailer feat(build): improve lint-locale-usage further (#8736) 2025-08-27 23:47:34 +02:00
markup chore(cleanup): replaces unnecessary calls to formatting functions by non-formatting equivalents (#7994) 2025-05-29 17:34:29 +02:00
migrations fix: use mocked HTTP server for authorized migration 2025-08-26 21:57:25 +02:00
mirror feat: add configuration to only push mirror selected branches (#7823) 2025-07-12 00:39:35 +02:00
moderation feat: add configurable timeout for automatically removing resolved reports (#7940) 2025-07-28 14:52:13 +02:00
notify better comments and variable names for ActionRunNowDone (#7697) 2025-04-28 06:37:08 +00:00
org chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
packages several fixes of ALT Package registry (#8475) 2025-07-10 17:12:07 +02:00
pull fix: prevent pull requests from being merged multiple times 2025-08-11 12:55:25 +02:00
release chore(cleanup): replaces unnecessary calls to formatting functions by non-formatting equivalents (#7994) 2025-05-29 17:34:29 +02:00
remote chore: tune down remote user promotion debug message shown as error (#7687) 2025-04-27 20:50:48 +00:00
repository git/commit: re-implement submodules file reader (#8438) 2025-07-15 00:20:00 +02:00
secrets feat: migrate action secrets to keying to store them more securely (#8692) 2025-07-29 01:03:36 +02:00
shared/automerge fix: do not ignore automerge while a PR is checking for conflicts (#8189) 2025-06-17 10:58:07 +02:00
task chore(cleanup): replaces unnecessary calls to formatting functions by non-formatting equivalents (#7994) 2025-05-29 17:34:29 +02:00
uinotification chore: branding import path (#7337) 2025-03-27 19:40:14 +00:00
user feat: add option to allow non-local users to change usernames (#8714) 2025-08-06 20:25:13 +02:00
webhook chore: replace gopkg.in/yaml.v3 with go.yaml.in/yaml/v3 (#8956) 2025-08-20 15:31:12 +02:00
wiki chore(cleanup): replaces unnecessary calls to formatting functions by non-formatting equivalents (#7994) 2025-05-29 17:34:29 +02:00