Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ func turnCachePath(urlPath string, updatedAt time.Time) string {

// Simple hash for filename
h := sha256.Sum256([]byte(urlPath + updatedAt.Format(time.RFC3339)))
return filepath.Join(dir, "github-pr-notifier", "turn-cache", hex.EncodeToString(h[:8])+".json")
return filepath.Join(dir, "prs", "turn-cache", hex.EncodeToString(h[:8])+".json")
}

func loadTurnCache(path string) (*turn.CheckResponse, bool) {
Expand Down Expand Up @@ -200,7 +200,7 @@ func main() {
// Set up logger
var logger *log.Logger
if *verbose {
logger = log.New(os.Stderr, "[github-pr-notifier] ", log.Ltime)
logger = log.New(os.Stderr, "[prs] ", log.Ltime)
} else {
logger = log.New(io.Discard, "", 0)
}
Expand Down Expand Up @@ -369,7 +369,7 @@ func currentUser(ctx context.Context, token string, logger *log.Logger, httpClie

req.Header.Set("Authorization", "token "+token)
req.Header.Set("Accept", "application/vnd.github.v3+json")
req.Header.Set("User-Agent", "github-pr-notifier-cli")
req.Header.Set("User-Agent", "prs-cli")

resp, err := httpClient.Do(req)
if err != nil {
Expand Down Expand Up @@ -512,7 +512,7 @@ func makeGitHubSearchRequest(ctx context.Context, query, token string, httpClien

req.Header.Set("Authorization", "token "+token)
req.Header.Set("Accept", "application/vnd.github.v3+json")
req.Header.Set("User-Agent", "github-pr-notifier-cli")
req.Header.Set("User-Agent", "prs-cli")
req.Header.Set("X-Github-Api-Version", "2022-11-28")

start := time.Now()
Expand Down
Loading