Suggest this machine's hostname as the token label #20
No reviewers
Labels
No labels
⏳in-progress
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Grey.ooo/someones.computer_agent!20
Loading…
Reference in a new issue
No description provided.
Delete branch "feature/api-token-suggested-label"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
sc loginlinked to a blank create-token form, so the label — the one field thatanswers "which box is this?" when someone comes to revoke a token — was left for
the user to invent.
The link now carries
?label=<short hostname> (sc):The platform prefills its label field from that parameter — the other half of
this change, in the platform repo, which also carries the docs and the
screenshot. This PR has to land first; the pin bump there follows.
suggestion: the field is editable and nothing is minted until the form is
submitted.
laptop, notlaptop.lan.example.com) — it saysnothing about which machine this is.
localhost, or no hostname at all, suggests nothing rather than proposing aname every box would share.
Verified
GOWORK=off go test ./...— all packages pass, including two new cases ininternal/cli: the URL the page is opened at, andlabelForHostover thehostname shapes above.
thing, and the form it opens arrives filled in.
Note for whoever runs this in the platform checkout:
go vet ./internal/upload/fails there under
go.workonundefined: client.APIErrorFrom, because theplatform repo pins
scclientone commit behindmain. That predates thisbranch and is a pin bump in the platform repo, not a change here —
GOWORK=off(the vendored
scclient) builds and tests clean.WIP: Suggest this machine's hostname as the token labelto Suggest this machine's hostname as the token label