Skip to content
This repository has been archived by the owner on Aug 6, 2023. It is now read-only.

Commit

Permalink
Add note comment for the API
Browse files Browse the repository at this point in the history
  • Loading branch information
kachick committed Jun 19, 2023
1 parent 17c9668 commit d2cca04
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions nix-headbump.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,10 @@ func getLastVersion() (string, error) {
Commit commit `json:"commit"`
}

// https://docs.github.com/en/rest/branches/branches?apiVersion=2022-11-28#get-a-branch
req, _ := http.NewRequest("GET", "https://api.github.com/repos/NixOS/nixpkgs/branches/master", nil)
// May be necessary to set "Authorization" header if frequent requests are needed.
// -H "Authorization: Bearer <YOUR-TOKEN>"\
req.Header.Set("Accept", "application/vnd.github+json")
req.Header.Set("X-GitHub-Api-Version", "2022-11-28")
client := new(http.Client)
Expand Down

0 comments on commit d2cca04

Please sign in to comment.