gitea notification token syntax #14

Open
opened 2021-01-27 11:56:38 +08:00 by sb10q · 2 comments
Owner

With the current code, the working syntax for the token is:

token ${(import /etc/nixos/secret/gitea_tokens.nix).artiq-zynq}

and not

authorization = token ${(import /etc/nixos/secret/gitea_tokens.nix).artiq-zynq}

The latter is consistent with the GitHub status plugin.

With the current code, the working syntax for the token is: ``` token ${(import /etc/nixos/secret/gitea_tokens.nix).artiq-zynq} ``` and not ``` authorization = token ${(import /etc/nixos/secret/gitea_tokens.nix).artiq-zynq} ``` The latter is consistent with the GitHub status plugin.
astro was assigned by sb10q 2021-01-27 11:57:10 +08:00
Contributor

Keeping it authorization was my oversight in #13. I am sorry for delivering broken code.

In the GithubStatus plugin the authorization key's value is copied as-is into the HTTP header Authorization. The token prefix will not be split away.

For the new GiteaStatus plugin the value is appended to the URI in the query parameter ?token=. Therefore I argue that token doesn't change terminology in the context of Gitea. Of course the final decision is up to you.

Keeping it `authorization` was my oversight in #13. I am sorry for delivering broken code. In the **GithubStatus** plugin the `authorization` key's value is copied as-is into the HTTP header `Authorization`. The `token ` prefix will not be split away. For the new **GiteaStatus** plugin the value is appended to the URI in the query parameter `?token=`. Therefore I argue that `token` doesn't change terminology in the context of Gitea. Of course the final decision is up to you.
Contributor

Another GiteaStatus plugin got merged: https://github.com/NixOS/hydra/pull/904

Another GiteaStatus plugin got merged: https://github.com/NixOS/hydra/pull/904
Sign in to join this conversation.
No Label
No Milestone
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: M-Labs/it-infra#14
No description provided.