Expand description
Pure helpers for the GitHub sticky-comment protocol.
This module does not perform network IO — it produces the URLs, headers, and method/body pairs the CLI feeds to its HTTP client. Keeping the protocol pure makes it trivial to unit-test (no mocked HTTP) and easy to swap clients later.
The CLI binary wires this up to [ureq] (or anything else) in
crates/aatxe/src/github_http.rs.
Structs§
- Detected
Context - Resolve PR number and repo slug from common GH Actions / generic CI env
vars. Returns
Nonefor fields not present so the caller can decide what to do (e.g. fall back to CLI flags). - Github
Context - PR context required to find / create / update the sticky comment.
Functions§
- create_
comment_ url - URL for creating a new issue comment on a PR.
- default_
headers - Header pairs to send on every GH REST call. The token is revealed from
its
Secretwrapper only when the header value is constructed; the returnedAuthorizationstring is the only place the cleartext lives, and it is consumed by the HTTP client immediately. - detect_
context - Read GH Actions / generic CI env to populate as much of
GithubContextas possible. The caller mixes in CLI overrides. - list_
comments_ url - URL for listing comments on a PR (paged, 100 per page).
- patch_
comment_ url - URL for updating an issue comment by id.
- validate_
sticky - Validate that a rendered comment body carries the sticky marker. Returns
an
Errwithout the marker so a caller can refuse to post a body that would create a new comment instead of updating the existing one.