feat: change github context parsing

This commit is contained in:
Louis Seubert 2024-11-01 23:38:54 +01:00
commit 6a3a41374e
Signed by: louis9902
GPG key ID: 4B9DB28F826553BD
3 changed files with 44 additions and 60 deletions

View file

@ -8,8 +8,9 @@ import (
func (a *Action) Client() *Client {
c := &Client{Client: &http.Client{}}
c.base = a.env("GITHUB_API_URL")
c.token = fmt.Sprintf("Bearer %s", a.env("GITHUB_TOKEN"))
context := a.Context()
c.base = context.APIURL
c.token = fmt.Sprintf("Bearer %s", context.Token)
return c
}