Skip to content

Commit

Permalink
adds scope to gitea access token request
Browse files Browse the repository at this point in the history
Signed-off-by: Pankaj Walke <[email protected]>
  • Loading branch information
punkwalker committed Feb 12, 2025
1 parent 113041b commit 1060d73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/e2e/e2e.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ func GetGiteaSessionToken(ctx context.Context, auth BasicAuth, baseUrl string) (
httpClient := GetHttpClient()
sessionEP := fmt.Sprintf("%s%s", baseUrl, fmt.Sprintf(GiteaSessionEndpoint, auth.Username))

sb := []byte(fmt.Sprintf(`{"name":"%d"}`, time.Now().Unix()))
sb := []byte(fmt.Sprintf(`{"name":"%d", "scopes":["%s"]}`, time.Now().Unix(), gitea.AccessTokenScopeAll))
sessionReq, err := http.NewRequestWithContext(ctx, http.MethodPost, sessionEP, bytes.NewBuffer(sb))
if err != nil {
return "", fmt.Errorf("reating new request for session: %w", err)
Expand Down

0 comments on commit 1060d73

Please sign in to comment.