Token example does not do what is expected. #32
Labels
No Label
bug
duplicate
enhancement
help wanted
invalid
question
wontfix
No Milestone
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: gitea/terraform-provider-gitea#32
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Describe the bug
The token example shows how to create a token for a user. However, that is not the
result of running the example. The token will created for the user defined in var.gitea_user, not the
user created in the example.
Here is the relevant code in the Gitea SDK. The username from the client (the authenticated user) is used to create the path /users/<username>/tokens.
The username supplied in the token resource is not used for anything, only the name of the token is used with the API.
The current token example:
To Reproduce
Run the example. The token will be created for the account used to access the API. the test user will have no token.
Expected behavior
The token should be created for the test user, not the user accessing the API.
The documentation should be updated, to show who the token will be created for.