Skip to content
This repository has been archived by the owner on Nov 3, 2024. It is now read-only.

Commit

Permalink
chore
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshihiro-shu committed Apr 26, 2024
1 parent 117eb2e commit 0903fda
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/internal/github_api/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ func (c *client) GetRepositoryContent(path string) ([]byte, error) {
// YOUR_TOKENには実際のアクセストークンを設定してください
bearerToken := fmt.Sprintf("Bearer %s", c.token)
req.Header.Add("Authorization", bearerToken)
fmt.Println("Authorization: ", bearerToken)

// https://docs.github.com/ja/rest/repos/contents?apiVersion=2022-11-28#get-repository-content
req.Header.Add("Accept", "application/vnd.github.raw+json")
Expand All @@ -48,7 +47,8 @@ func (c *client) GetRepositoryContent(path string) ([]byte, error) {
if err != nil {
return nil, err
}
fmt.Println("Status: ", resp.Status)
fmt.Println("Body: ", resp.Body)
defer resp.Body.Close()

return io.ReadAll(resp.Body)
}

0 comments on commit 0903fda

Please sign in to comment.