Commit Graph

5 Commits

Author SHA1 Message Date
Tim Rogers
df63442c3c Include meaningful User-Agent header in requests to the GitHub UI
This adds a custom `User-Agent` header to requests from the
GitHub server to the GitHub API, identifying the application,
the version and key information about the environment.

This aligns with the [recommendations][1] in the GitHub Docs.

As part of this change, I have also moved the current version of
the server into a constant, and fix the initialization of `Server`
to use that version, taking from `package.json`.

[1]: https://docs.github.com/en/rest/using-the-rest-api/getting-started-with-the-rest-api?apiVersion=2022-11-28#user-agent
2025-02-02 15:04:59 +00:00
Peter M. Elias
339a7b6708 fix: restore original environment variable name for GitHub token 2025-01-13 11:53:22 -08:00
Peter M. Elias
3e1b3caaec fix: resolve typescript errors and add buildUrl utility
- Fix headers type assertion issue
- Add buildUrl utility function for URL parameter handling
2025-01-13 11:53:22 -08:00
Peter M. Elias
ff2f2c5347 feat: enhance GitHub request utilities with error handling 2025-01-13 11:53:22 -08:00
Peter M. Elias
ca2c6f9324 Add common utilities for GitHub API requests 2025-01-13 11:53:22 -08:00