Expand description
GitHub, built in: its REST and GraphQL APIs, over TLS, as the
person — a token from the environment or the one speccoder auth login
kept in the credential store. No gh needed. Reading is free (issues, a
branch’s pull request); writing is pr, which a person confirms.
github.com and Enterprise hosts alike: the host is the remote’s.
Modules§
- auth
- Who speccoder is on GitHub: a token from the environment (CI:
GH_TOKEN,GITHUB_TOKEN; an Enterprise host:GH_ENTERPRISE_TOKEN), else the onespeccoder auth loginkept in the operating system’s credential store (servicespeccoder, accountgithub:<host>). Never a file; never printed. - http
- GitHub’s documented REST and GraphQL APIs, over rustls, within a time limit, every failure said in words with what to do. Blocking for the caller (the runtime’s commands are); one small runtime per call.
Structs§
- Ctx
- How speccoder reaches GitHub: where its API answers and whose token it
uses. Commands take it from the environment (
Ctx::from_env); tests point it at a stand-in (Ctx::fixed). - Issue
- One issue, read in full.
- Pull
- A branch’s pull request.
- Repo
- A repository on a GitHub host, as a git remote names it.
- Repo
Entry - A repository of the person’s, for the welcome’s Clone.
- Status
- What GitHub is to this repository.
Enums§
Functions§
- announce
- Comments on issue
numberthatfeatureis being specified from it (once per feature), and assigns it to the person whenassign. - announcement
- The comment that tells an issue a feature is being specified from it; the hidden marker keeps it said once per feature.
- auth_
status speccoder auth status: who speccoder is onhost(default: the repository’s, else github.com).- clone
- Clones the person’s repository
slugfrom github.com intotargetwith git, as the person (their credentials, never a token of speccoder’s in the command). The interface has confirmed that this reaches github.com.SPECCODER_GIT_BASEpoints at another place to clone from (tests). - comment
speccoder issue comment N [--assign]: tells issuereferencethat the current feature (orfeature) is being specified from it.- description
- What a feature started from
issueis asked to specify: its title, its text, and its address — which the spec keeps, soprcan close it. - issue
- One issue by number,
#nor address. - issue_
number - The issue number in
reference(42,#42, its address). - issue_
urls - GitHub issue addresses in
text(a spec), in order, once each. - issues
- The repository’s open issues (pull requests aside), assigned to the
person first, then the most recently updated;
featuresmaps an issue URL to the feature whose spec names it. - list
speccoder issue: the open issues.- login_
with_ token speccoder auth login --with-token: checkstokenagainsthost, then keeps it in the credential store.- logout
speccoder auth logout: forgetshost’s token.- open_
draft - Opens a draft pull request from
headintobase: its number and address. - pr_for
- The pull request whose head is
branch, if there is one. - pr_in
pr_forinr(the repository a given remote names).- pull_
diff - A pull request’s diff against its merge base and its head commit,
fetched read-only (no checkout of the contributor’s branch, no CI
token): what
speccoder bug --candidate pr:Njudges. - reach
- Whether the signed-in account can see the repository at
root— after a sign-in through the app, whether the app is installed there.None: it can; else what to do. - refused
- A GitHub failure as a result: its code and fix.
- repo
- The repository
remote(defaultorigin, else the first) names. - repositories
- The repositories the person signed in as can reach on github.com, the most recently updated first (read-only); and who they are.
- slug_of
- The repository’s
owner/repo, if it has a GitHub remote. - started
- The issue URLs each feature’s spec names: issue URL → feature.
- status
- Whether speccoder can reach this repository on GitHub, and as whom.
- update
- Brings pull request
number’s title and description up to date. - valid_
slug - Whether
slugnames a repository (owner/name, GitHub’s characters).