Skip to content

Act as your human, and other calls ​

When the App cannot do it for you, or no command covers it.

Everything you can ask a person for: stamp request ​

Every permission you can ask a person for is a subcommand of stamp request, and stamp request --help lists them all, one line each:

CommandWhat you ask forWho decides
stamp request act-as --repo OWNER/REPO --as @HUMANAct as that person on a repository (push, pull requests) under their GitHub account (below)That person
stamp request app-install --repo OWNER/REPO [--to @HUMAN]This server allowed to use a repository (the same as stamp app request)An admin of the account on GitHub, or the personal account's owner; on a server with a GitHub App of its own, only the server's owners and admins can Allow. Stamp messages them on Raft when the request is filed (below)
stamp request workflow --repo OWNER/REPOA workflow grant of the whole repository: any workflow, on any branch or tag, and any rerun of its runs, 30 days by default. A refused stamp workflow run prepares a narrower draft instead: that exact run, once by default. The approver chooses how far and how long. You need one only for a workflow that requires approval, on a server kept on the old rule, or for a run through an act-as grant on a repository your server's App does not cover (below)The server's owners and admins, people or agents; for one run's request also the approvers the workflow's rule names (below)
stamp request admin-ops --plan PLAN.yamlA batch of administration steps (admin-ops)A repository admin
stamp repo rename, repo edit, repo archive, repo unarchive, repo deleteA change of the repository itself, as gh repo names it (below): one admin-ops request eachA repository admin
stamp request workflow-change --repo OWNER/REPO --ref REF --sha SHA [--reason TEXT]Push, once, a commit that changes .github/workflows/ or .github/actions/The server's owners and admins with admin or maintain on GitHub
stamp request release-ref --repo OWNER/REPO --ref REF --sha SHA [--reason TEXT]Push, once, an update of a protected release refThe same
stamp request submit ID --reason TEXTSend a request a refused push or stamp workflow run prepared to the server's owners and admins
stamp request list [--state open|pending|draft|approved|all], get ID, close ID --reason TEXTYour own requests: list them, read one, withdraw one
stamp request approve ID --reason TEXT [--reach run|workflow|repository] [--duration once|DAYS|revoked], decline ID --reason TEXTNot an ask: your decision of another agent's workflow request that waits on you (below)You

workflow-change and release-ref prepare nothing themselves: Stamp prepares a one-time request from the push, because only the pushed commit says which guarded files it changes, and only when the workflow guard or a protected release ref refuses that push. These commands find that request by repository, ref and commit and, with --reason, submit it (as stamp request submit does). With none prepared, they first read the repository's rule as this server sees it (as stamp repo guard list -R OWNER/REPO does; when that lists no rule, the repository's settings must say it is off, as stamp settings -R OWNER/REPO reads them) and say what a push would meet. When the rule would refuse the push, they say to push, as the refusal prepares the request. When the rule is off, is in evaluate mode (it only records), exempts you, or, for a release ref, has no pattern the ref matches, it does not hold the push: unless another rule refuses it (a Stamp ruleset, the other of these two rules, GitHub's own rules), the push is accepted at once with nobody's approval and GitHub runs the workflows it starts with the repository's secrets. They say so instead of telling you to push, and if a person should review the change first, ask them before you push. A short --ref may name either the branch or the tag of that name (heads/NAME or tags/NAME names one, as git reads a push's destination): when the rule treats the two differently, they name what a push of each would meet and ask for --ref refs/heads/NAME or --ref refs/tags/NAME, never saying to push. When the rule cannot be read, this server cannot see the repository, or Stamp cannot read who you are while the rule exempts someone, they say to push as before and add what they could not read. Submit only when a person must allow it now. A workflow request approves the content of the workflow files, so it also lets the agent merge a pull request with that content; a refused merge prepares one too, named in its refusal and in stamp pr view (MERGE_APPROVAL_REQUIRED). One approved request must cover the whole workflow change, file for file, and approvals do not add up across pushes either: a push is checked with everything its branch changed in .github/workflows/ and .github/actions/ since it left the default branch, a merge with its pull request's change. Every other file of that request must have its approved content where the change takes effect: in the pushed commit, whatever the default branch has (a branch behind it rebases first), or on the base branch at a merge. So part of an approved change does not pass on its own, and the refusal names the request and the files that are missing. Contents from two approved requests are refused together, and the refusal prepares a request for the whole set; rebasing a fully approved branch needs nothing new.

Run and rerun workflows without approval ​

On a repository your server's GitHub App covers, you run and rerun its workflows as a GitHub user with write access can: stamp workflow run and stamp run rerun need no workflow grant, unless the workflow's rule requires approval (approval: required, shown by stamp workflow refs list -R OWNER/REPO). Such a workflow is refused as before (WORKFLOW_DISPATCH_NOT_ALLOWED, RUN_RERUN_NOT_ALLOWED, the refusal naming the approval) and stamp workflow run prepares a draft you submit with stamp request submit ID --reason TEXT, unless you are on the rule's exempt list. While it is pending, stamp request get ID says whom it waits on, in Stamp's words: an owner or admin of your server, or an approver the workflow's rule names (it lists them); once someone decided it, who approved, declined or closed it. A rerun is judged by its run's workflow; a run of an open pull request or of the merge queue reruns freely. stamp workflow list -R OWNER/REPO says, for each workflow, whether the open mode lets your runs of it through with no workflow grant or its rule requires approval (agentRun in --json: open or approval); its ref allowlist and your run budget still apply (below).

Through an act-as grant: stamp workflow run, and stamp run rerun of a run no pull request or merge queue started, go as your human only through a grant that names workflow runs (workflow_dispatch, below), otherwise as the App where it covers the repository. On a repository the App covers and lets you use, such a run follows the open mode exactly as the App's does: no workflow grant on an open server, the approval rule and its exempt list as for the App, and GitHub checks your human's own permission. On a repository the App does not cover, or whose agent access leaves you out, it still needs a workflow grant (stamp request workflow, or the draft a refused run prepares). A rerun of an open pull request's or the merge queue's run follows the pull request's identity, as any pull request write does (below).

Whatever a server allows: a workflow's ref allowlist still holds (WORKFLOW_REF_NOT_ALLOWED; a rerun only at an allowed ref's current tip); you start or rerun at most 30 runs an hour in one repository (429 WORKFLOW_RUN_BUDGET, with retry_at and Retry-After; nothing was sent to GitHub, so run it again then, and fix a run that keeps failing instead of rerunning it); and GitHub's own protection applies on top: a deploy kept behind a GitHub Environment with required reviewers waits for them.

An owner or admin may keep a server on the old rule, where every such run needs a workflow grant (grant; stamp workflow open-review and stamp settings's workflow_dispatch_default show which applies). Only a person sets a server's mode, a workflow's approval, its exempt list or its approvers: you cannot, and asking is stamp people admins and a message.

Workflow requests you approve ​

You approve another agent's workflow request exactly as a person does: with the same choices, and only when one of these holds at that moment:

  • Raft gives you the owner or admin role on the request's server at that moment: a role Raft takes away counts at once, and if Raft does not answer, you are told to try again (503 REQUEST_APPROVER_ROLE_UNREAD) and nothing is decided. A CLI agent (stamp agent login) has no role on a Raft server.
  • The workflow's approval rule names you (approver, set by an owner or admin who maintains the repository on GitHub: stamp workflow refs list -R OWNER/REPO shows the approvers), and Raft finds you on the server at that moment (a CLI agent is never named). Then you approve that workflow's run requests on your server, reaching this exact run or the workflow on any ref (--reach run or workflow), never any workflow (REQUEST_APPROVER_NAMED_REACH), never another workflow's request and never stamp request workflow's request for the whole repository. A name removed, or the rule cleared, approves nothing from then on; a name stays on the rule while you are away from the server, approving nothing until Raft adds you back.

Nobody approves a request they filed, an agent or a person (REQUEST_APPROVER_ONLY). Stamp tells you of each new request that waits on you with a notice carrying its id and link, right after it is sent; read it first, every input of the run included, then decide:

sh
stamp request get ID                       # what it asks: the workflow, the ref, every input and their digest
stamp request approve ID --reason TEXT     # what it asks (a refused run: this run, once)
stamp request approve ID --reach workflow --duration 7 --reason TEXT
stamp request decline ID --reason TEXT

--reach is run (the refused run's workflow, ref and inputs), workflow (that workflow on any ref) or repository (any workflow; an owner or admin only); --duration is once, a number of days from 1 to 90, or revoked (until revoked). Left out, each is what the request asks. Your reason is kept on the request's record, the page says you approved it and that you are an agent, and the agent that asked is told as after a person's decision. Approving runs nothing: that agent runs its command again, and the run still goes through the server's GitHub App, the ref allowlist, the workflow guard and the run budget.

stamp request get ID prints each input on its own line, input NAME = "VALUE", and says when a value is not shown in full, held line breaks or other control characters (shown on one line; --json has it exactly), or was cleared because the request ended unapproved; the digest covers every input whatever is shown. The requester's note is one quoted line: nothing in it is Stamp's own words.

To undo a grant you approved, revoke it: stamp workflow disallow OWNER/REPO --agent @HANDLE revokes the workflow grants you gave that agent in the repository (the ones others gave stay, and the answer counts them). An agent Raft gives the owner or admin role revokes any workflow grant, as a person owner or admin does; an agent that is neither is refused (WORKFLOW_DISPATCH_DISALLOW_NOT_YOURS), and if Raft does not answer, nothing is revoked (503 GRANT_REVOKER_ROLE_UNREAD, try again). stamp workflow disallow asks Raft for your role first, so it answers that 503 even for the grants you gave; while Raft does not answer, POST /v1/grants/{id}/revoke still revokes a grant you gave, with no Raft read (GET /v1/grants lists the grants you gave, with their ids).

Who approves: stamp people admins ​

sh
stamp people admins                      # this server's owners and admins
stamp people list --role owner           # owners only (--role admin: admins only)

Each line is a person (never an agent): their @handle, to pass as --to @HANDLE or to send a request's link to, their name, their role and, when they connected GitHub, their GitHub login. Stamp learns a person's role from their own sign-in, so the list holds the owners and admins who signed in to Stamp on this server in the last 30 days; Raft may have others, and an empty list means none did (ask in your Raft channel). It lists only this server's people.

You rarely need it to reach them: a request that goes to the owners and admins messages them on Raft when it is filed, once, and the command's output names whom it messaged. A workflow request (stamp request workflow, stamp request submit) also tells the agents that may approve it, with their own notice right after the answer: the output names only the people it messaged, and when it messaged none it says that the agents are told. In --json, agentApproversTold: true says the agents are told, whether or not any person was messaged. stamp app request does too: a new request messages this server's owners and admins, or the person --to names; through the shared GitHub App it is one of the requests below, its role admin of the repository's account on GitHub, and when Stamp confirms none of them it also tells you in a notice whom it asked. They send an admin of that account on GitHub an approval link from the request page, which that admin, who needs no Raft account, opens to allow it; while Stamp is not installed on the account, they choose Allow there instead, and GitHub asks the account's owners to install it. So does a request that only someone with a role on GitHub can approve: Stamp messages only the owners and admins it confirms have that role (read with their own GitHub connection right after the filing), or every one of them when it finds none. These are a workflow change or release ref you submit with stamp request submit (the admin or maintain role on the repository), a merge queue request (stamp queue save ... --confirm --request and the other --request actions) and stamp request admin-ops (admin of the repository; admin or maintain for a batch of Stamp ref policy steps alone; a batch of merge hold steps alone messages them all), and stamp repo create in an organization (its active members). Their output names no one (notified is empty, a submission's notifiedCount is 0; in --json the answer carries routed: true) and prints Stamp's next step instead (suggestedNextAction, the merge queue's next), which says that Stamp is messaging those who can approve, so you send the link only if they ask. An older stamp CLI prints that Stamp could not message anyone in its place; trust suggestedNextAction in --json. Send the link yourself only when the output says no one was messaged or tells you to, or when Stamp's notice says nobody was messaged: if the routing after the filing messages no one (no owner or admin it can message), you get one notice with the request's link and whom to hand it to.

Working as your human: act-as ​

To work under your human's GitHub account on a repository, for example one your server's GitHub App cannot serve (not covered or not installed), or when your human wants your work attributed to them, request an act-as grant from your human up front (reading a public repository needs none: Reading a public repository your server does not cover):

sh
stamp request act-as --repo OWNER/REPO --as @HUMAN

Send them the link it prints. Once approved, Stamp uses their GitHub account for you on that repository (push, clone, fetch, open pull requests, comment, edit, label, request reviews, stamp issue, and workflow runs the grant names), attributed as them on GitHub and labeled "via act-as @HUMAN" in Stamp.

Your human must have signed in to Stamp on your server once. If nobody of your server has signed in with that handle, the request is refused with REQUEST_APPROVER_UNKNOWN and nothing is filed. Its next step ends with your server's sign-in link (https://stamp.build/setup?server=SERVER): send them that link. It opens Stamp's setup page for your server, which offers to sign in to it whether they are signed out or signed in to another server they belong to. Then file the request again. A contribution grant asked for with stamp repo fork --as @HUMAN is answered the same way.

  • An act-as grant never approves or merges as your human, whatever it allows (all and pr_write included): your approval must never count as their review. stamp pr approve, stamp pr unapprove, stamp pr merge, stamp pr merge --auto and the merge queue run as they would without a grant: on a repository your server's App covers, your own Stamp approval and the App's merge. On a repository the App does not cover, they are refused with ACT_AS_NOT_FOR_APPROVE_OR_MERGE: ask a person with write access to review and merge it on GitHub, or have the App cover the repository (stamp app request --repo OWNER/REPO).
  • A live grant is preferred even where the server's App covers the repository: while it allows the action, Stamp works as your human. Once a grant that reaches the repository no longer stands in (revoked, expired or its one use spent in the last 7 days, approved for other actions only, your human's GitHub connection or access gone, GitHub not answering), a write (push, stamp pr create, every other stamp pr and stamp issue write, a workflow run) is refused with the grant's code (GRANT_REVOKED, GRANT_EXPIRED, GRANT_ACTION_NOT_ALLOWED, GRANTOR_TOKEN_UNAVAILABLE, GRANTOR_ACCESS_LOST, GITHUB_READ_FAILED, ...) and is never made as the App instead. The error says how to renew the grant, and that stamp identity use app --repo OWNER/REPO makes your writes there go through the App, by your choice. A read (clone, fetch, stamp pr view) still goes through the App, and a clone or fetch says why. A grant for starting a workflow run is only one that names workflow_dispatch: a grant without it never refuses stamp workflow run with its own code, and where the App covers the repository the run goes as the App. stamp run rerun is a pull request write first, whatever the run: a grant that does not allow pull request writes refuses it like any other (GRANT_ACTION_NOT_ALLOWED); then a rerun of an open pull request's or the merge queue's run goes as your human, and a rerun of any other run goes as your human only when the grant also names workflow_dispatch, else as the App where it covers the repository (where it does not, such a rerun is refused). On a repository the App covers, a run through a grant that names workflow_dispatch is decided by the server's workflow dispatch mode as the App's is: on an open server it needs no workflow grant (above). With no grant that reaches the repository, or only grants that ended more than 7 days ago, the App works as before; in the second case the write tells you so (remote: GRANT: You have an ended act_as grant for OWNER/REPO (grant grt_…, ended …); this write was made as this server's GitHub App. on a push, the same line as a warning from stamp pr and stamp issue writes, sent in the Stamp-Warning answer header). stamp api always uses the App. A push still being published through the grant, or a pull request creation retried with the same idempotency key, does not switch: it fails with the grant's error.
  • A grant is yours alone: another agent who should work as the same person requests its own. --scope widens the repositories a grant covers, not the agents.
  • The approver chooses allowed actions, how far the grant reaches and how long it lasts on the request page; --scope only preselects one option. Filing again with another --scope while the request is pending returns the same request unchanged, so do not re-file to change the reach or length: tell your human what you need, and they pick it on the page. Every use is logged, and they can revoke it at any time in Settings › Access grants (/settings/access).
  • --as @HUMAN@SERVER can also target a person signed in to Stamp on another server in your federation (a bare --as @HUMAN nobody of your server has is refused with REQUEST_APPROVER_UNKNOWN, listing the servers to name with this form, whoever has the handle elsewhere; a name there that cannot approve, for any reason, is refused with REQUEST_APPROVER_PEER_UNAVAILABLE): they approve on their server, the grant covers that single repository only (--scope org|server refuses with REQUEST_SCOPE_SAME_SERVER_ONLY), and if the servers leave the federation the grant ends (GRANT_FEDERATION_ENDED) and pending requests close (FEDERATION_LEFT). Their GitHub login is their server's connection, so you are not shown it while the request is pending: stamp request get prints will act as: the GitHub account of @HUMAN, and willActAs.githubLogin is null in --json. Once they approve, the approval notice names the GitHub account you will act as.

Repositories where your delegations decide ​

On some repositories (Stamp turns this on one repository at a time; a repository's old name after a rename counts as the repository for a write that carries the repository's GitHub id, such as stamp pr create from a push receipt or a push being published, or when one of your grants is chosen under the old name and your human's token reads it as that repository; a write that names only the old name otherwise keeps the old name's answer), Stamp decides every write (a push, stamp pr create, every other stamp pr and stamp issue write, a workflow run) by your delegations instead of the rule above. Each act-as grant you hold is one delegation of what its actions allow, never more: push allows pushes; pr_create allows opening a pull request; pr_write allows every other pull request write (edit, close, comment, labels, review requests) and issues; all allows pushes, pull requests and issues; workflow_dispatch allows workflow runs. A delegation never allows reviews or merges. Reads (clone, fetch, stamp pr view) are decided as above.

  • Your human's identity is used when a delegation of yours stands for the write: not revoked and not ended, allowing the write, reaching the repository, its person still a member of this server with the same GitHub account connected, and you still an agent of this server (a CLI agent not revoked). Stamp then reads the repository with their token as before (it must still be the repository the grant was approved for, and they must be able to push); if that fails, the write is refused with that code (GRANTOR_ACCESS_LOST, GRANTOR_TOKEN_UNAVAILABLE, GITHUB_READ_FAILED, ...), never made as the App.

  • The server's GitHub App is used only where it may act for you (it covers the repository and the repository lets you use it), and only when no delegation of yours stands and none fails: every one that reaches the repository was revoked, its person left the server, its federation ended, it ended more than 7 days ago, or it does not allow this write (its actions, as above). The answer says which grant was passed over and why, as a remote: GRANT: line on a push and a warning from stamp pr and stamp issue (the Stamp-Warning answer header), for example:

    text
    remote: GRANT: Your act-as delegation does not apply to this write on acme/web: grant grt_… from @alice was revoked; this write was made as this server's GitHub App. A revoke only stops this agent acting as you; on repositories where the server's GitHub App is allowed, the agent can still write as the App. To stop that too, change the App's permissions.

    For a write its grant does not allow, it says "This write used the App's identity because the delegation does not include this capability." stamp pr create's opened as: line names the same grant in the same words, for example opened as: stamp-build[bot] (this server's GitHub App; grant grt_… from @alice does not include pull_requests). Where the App may not act for you, the write gets the server's own refusal, as without a grant.

  • A delegation that concerns the write and fails is refused, never the App. The error keeps the code the rule above uses and adds two fields to the error body, delegation_code and next (extend, request, retry, reconnect, resume or sign_in); a push's refusal line ends with (delegation_code: …, next: …). Unlike the rule above, it does not suggest stamp identity use app.

Codedelegation_codenextWhat to do
GRANT_EXPIREDDELEGATION_EXPIREDextend (request for a once grant)It expired in the last 7 days: an act-as grant cannot be extended in place, so file a new request (stamp request act-as --repo OWNER/REPO --as @HUMAN) and send its link to your human.
GRANT_EXPIREDDELEGATION_SPENTrequestIts one use was made in the last 7 days: file a new request.
GRANT_REPOSITORY_MISMATCHDELEGATION_OUT_OF_SCOPErequestIt does not reach this repository now: file a new request for the repository as GitHub names it.
GRANTOR_SIGN_IN_REQUIREDDELEGATION_PERSON_SIGN_IN_REQUIREDsign_inThe grant has expired: Raft no longer counts your human's account sign-in for Stamp (below). Ask them to sign in to Stamp again, which renews it, then run the same command again. Nothing was written.
GRANTOR_TOKEN_UNAVAILABLEDELEGATION_GITHUB_ACCOUNT_CHANGEDreconnectYour human's Stamp GitHub connection is not the account that approved it (another account, or none): ask them to connect that account in Stamp (Settings), then run the same command again.
GRANT_NOT_HELDDELEGATION_GITHUB_ACCOUNT_NOT_FROZENrequestIt was approved before Stamp recorded which GitHub account approved it: file a new request.
GRANT_NOT_HELDDELEGATION_AGENT_GONErequestStamp no longer counts you as an agent of this server (a Raft agent no longer its member, or a CLI agent revoked): if you still are one, sign in again (stamp agent login, or Login with Raft); otherwise ask this server's owners.
GRANT_NOT_HELDDELEGATION_PREFERRED_PERSON_NONErequestYour default identity names a person with no delegation that stands here: ask them (stamp request act-as --repo OWNER/REPO --as @THEM), or go back to stamp identity use auto --repo OWNER/REPO.
GRANT_LOOKUP_FAILEDDELEGATION_LOOKUP_FAILED, DELEGATION_STANDING_UNKNOWN, DELEGATION_COVERAGE_UNKNOWNretryStamp could not read your delegations, their standing or the App's coverage, or a grant of yours has no delegation yet; nothing was written: run the same command again shortly.
GITHUB_READ_FAILED, GRANTOR_TOKEN_UNAVAILABLE, SUSPENSION_STATE_UNAVAILABLEDELEGATION_LOOKUP_FAILEDretryGitHub did not answer the read of the repository with your human's token, Stamp could not get their GitHub sign-in just now, or it could not read whether you or they are suspended; nothing was written: run the same command again shortly.
GRANT_NOT_HELDDELEGATION_NONErequestNo delegation of yours stands for this write, and the App may not make it on this repository either: ask your human for a grant that allows it.
GRANT_REVOKED, GRANT_FEDERATION_ENDED, GRANT_EXPIRED, GRANT_ACTION_NOT_ALLOWEDDELEGATION_REVOKED, DELEGATION_PERSON_GONE, DELEGATION_FEDERATION_ENDED, DELEGATION_EXPIRED, DELEGATION_SPENT, DELEGATION_CAPABILITY_MISSINGrequestOnly for a push being published or a pull request creation retried with the same idempotency key: the delegation it started through no longer stands, and it never goes on through another one or the App. Ask for a new grant, then push again (or open the pull request again).

Your default identity (below) still applies there the same way: it only narrows. app makes your writes go through the App where it may act for you, with no delegation tried; a person leaves only that person's delegations. One you set under a repository's old name still applies after a rename (one set under the new name comes first).

When your human counts as gone from the server ​

When your human leaves the server, Stamp revokes the act-as grants they gave from it, for good (GRANT_REVOKED: "@alice is no longer a member of this server, so their grant … was revoked"; rejoining does not restore it, so ask them for a new grant if they rejoin), a delegation of theirs stops standing (DELEGATION_PERSON_GONE), and their contribution grants there end. Stamp counts a person as gone once Raft tells it they were removed from the server; Raft reports a demotion to guest as a removal too. Where people sign in to Stamp with their Raft account, Stamp also asks Raft about them: at once when Raft reports a role change, and otherwise about once an hour for everyone with a live act-as grant, contribution grant or other delegation to an agent. If Raft's answer no longer lists them on the server (while Stamp is installed and active there), or lists them as a guest, that counts as the same removal. The hourly check makes at most three such removals an hour (one person on one server is one removal); past that, further removals wait until they are confirmed with Raft. They count again once they sign in to Stamp on that server again; a contribution grant that ended stays ended, so ask for a new one.

When Stamp is removed from your human's server ​

If your human gave you an act-as grant from another server (a grant across servers) and Stamp is then removed from that server, the grant ends for good: with Stamp gone from it, Stamp can no longer tell whether your human is still there. A use of it is refused GRANT_REVOKED ("Stamp was removed from server …, where @alice gave grant …, so the grant ended"). Stamp coming back there does not restore it: ask them for a new grant once Stamp is back on their server. Only grants given from that server to agents elsewhere end this way: grants given on the server you work on are not affected.

When your human must sign in again ​

Where people sign in to Stamp with their Raft account, your human's delegations and contribution grants work only while Raft counts that sign-in for Stamp. When Raft answers that it no longer does (they revoked Stamp in Raft, never signed in with their account since the switch, their account is gone, or a sign-in rule like SSO no longer holds), every use of their grants is refused until Raft counts it again: when they sign in to Stamp once, at once, or at Stamp's next check with Raft that counts it (about once an hour). Nothing is deleted or revoked, and they don't have to grant again. An act-as write is refused with GRANTOR_SIGN_IN_REQUIRED (HTTP 409 where Stamp answers the write itself, the code on a push's refusal line; delegation_code DELEGATION_PERSON_SIGN_IN_REQUIRED, next sign_in where your delegations decide). A contribution grant use is refused with CONTRIBUTION_GRANT_PERSON_SIGN_IN_REQUIRED (409). Both answers say the grant has expired and name the person: ask them to sign in to Stamp again, which renews it (they don't grant again), then run the same command again. A grant of another person that stands still works meanwhile. A push already queued through such a grant is not published (its receipt fails with that code); push again once they have signed in. The same holds for the person who approved an admin ops batch of yours, once Stamp has found that Raft no longer counts their sign-in: a restore with the access they gave is refused with ADMIN_OPS_RESTORE_APPROVER_SIGN_IN_REQUIRED, which says that access has expired, until they sign in again (Restore). The hourly check covers them while the access they gave for the restore is live.

How long a grant lasts ​

Every approval page offers the same four lengths; the approver picks one, whatever your request asked for:

LengthWhat it means
OnceOne write, then the grant is spent: one push (its publication is part of it), or one pull request or workflow operation. Every later write is refused GRANT_EXPIRED, saying the grant was for one use. Reads through it (clone, fetch, reading pull requests) keep working until it expires, 30 days after the approval, used or not.
7 daysEvery use for 7 days, then it expires.
30 daysThe same for 30 days. The page selects this one unless the approver picks another.
Until revokedNo expiry: it lasts until its grantor, or an owner or admin of the server, revokes it. The page warns about this before approving.

A once grant is spent by the write it is chosen for, even if GitHub then refuses that write: ask again for another. The one exception is a push whose publication failed: stamp receipt retry ID publishes that same push again as the same use (it never landed), as long as the grant is neither revoked nor expired; see When a push FAILED. Two writes racing for the same once grant cannot both use it; the one that loses is refused. Opening a pull request after pushing through a once grant is a second write: it needs another grant, or, where the App covers the repository, stamp identity use app --repo OWNER/REPO to open it as the App. A clone, fetch or pull request read never spends it. A push, rerun, run cancel and stamp workflow run take it only once every check Stamp makes has passed, right before the write: one Stamp refuses before that (a run still in progress, a ref policy) leaves it unused, so you can fix the cause and try again. The other writes (a comment, review request, pull request edit, close or creation, and issue writes) take it as soon as Stamp chooses the grant for them, so one of them refused afterwards for another reason has still used it; the GRANT_EXPIRED error on the next try says so. A pull request creation that opens as the App because the grant's person owns a path it changes (below) leaves it unused. Once is one write, not one command's every check: everything one command does on one repository is one use (rerunning a run, the owner review Stamp asks for after stamp pr create), but a second write in the same request, of another kind or on another repository, needs its own use and is refused once the grant is spent. Workflow write (stamp request workflow) has no length yet: it lasts until revoked, and approving it once or for 7 or 30 days is refused.

When a grant of yours ends, you are told ​

When a grant you hold ends, Stamp sends you one agent event at that moment, so you do not first learn of it from a refused push or run. It covers act-as grants, workflow grants, the grant that lets you use a repository whose agents are limited (stamp app request), and contribution grants (stamp repo fork). The event says which grant ended, for which repository, how (revoked by a person, named; ended by Stamp, with the reason, such as the grantor's server leaving the federation, the grantor leaving the server, or the person disconnecting GitHub; or expired), and the command that asks for it again, for example:

text
Stamp: alice revoked your act-as grant grt_… for acme/web. Stamp no longer pushes, opens pull requests or acts there as its grantor's GitHub account for you. Ask again: `stamp request act-as --repo acme/web --as @alice`.

An expiry is told once, within about 10 minutes of the grant's end. You are not told when you ended the grant yourself (stamp repo fork revoke), when a once grant you already spent is revoked or expires, or when you already hold a newer live grant of the same kind for that repository (for a contribution grant: from the same person, for the same upstream). In stamp inbox the event is an item of kind request.

Settings › Access grants marks a once grant "One use", then "Used" once it is spent. Over the API, POST /v1/requests/{id}/approve takes {"duration": "once"|"7"|"30"|"revoked"}; the older {"days": N} (1 to 90) and {"untilRevoked": true} still work, and a grant's singleUse says it was approved once.

Your default identity ​

Where Stamp has a choice of credential for you, you say which GitHub identity it uses: the server's GitHub App, one person whose act-as grant you hold, or auto. This is your GitHub identity, who GitHub shows as the pusher, the pull request's author or the commenter. It is not your commit identity (stamp identity bind --email), which is who commits your changes.

sh
stamp identity use app                       # the server's GitHub App
stamp identity use @alice                    # act as @alice where her grant stands in
stamp identity use auto                      # no preference (the default)
stamp identity use @bob --repo OWNER/REPO    # one repository, over your default
stamp identity use auto --repo OWNER/REPO    # remove that repository's setting
stamp identity show [--repo OWNER/REPO] [--json]

It applies to push, clone and fetch, and to the stamp pr and stamp issue commands (and runs and workflows) through Stamp's /v1 routes. stamp api (/api/v3) never uses an act-as grant: it always runs as the server's GitHub App. The same default applies to a program on another runtime that calls Stamp's /v1 routes for you (for example antiproton's sdk:stamp in run_js): nothing in the program's output shows which identity it runs as, so before relying on who GitHub will name, have the program read GET /v1/me/identity (an ordinary read; changing it with PUT is a write that waits for a person on such a runtime's default policy), or run stamp identity show.

RepositoryYour choiceWhat Stamp uses
The server's App covers itautoYour newest live grant that reaches it; the App if you hold none that reaches it (a grant that ended more than 7 days ago counts as none). If one reaches it but does not stand in, a write is refused with its reason (a read uses the App)
The server's App covers itappThe App. No grant is tried, and no request is made with a person's token
The server's App covers it@aliceOnly @alice's grants, never another person's. If none stands in, a write is refused (a read uses the App)
The server's App does not cover itanyA grant is the only way in: @alice's first, then your others, newest first. With app the grant is still used, and Stamp says why
  • On a repository the App does not cover, @alice's grants are tried first. If one of hers is live but GitHub refuses it at use (for example GRANTOR_ACCESS_LOST, she can no longer push there), that refusal is the answer, and your other grants are not tried. Your other grants are used only when none of hers is live for the repository (revoked, expired, or none reaching it).
  • If two people whose grants you hold share a handle, stamp identity use @HANDLE is refused (IDENTITY_HUMAN_AMBIGUOUS) and lists their ids. Name one of them with stamp identity use @ID.
  • You can set a repository's identity for at most 200 repositories (IDENTITY_REPOSITORY_LIMIT). Remove one with stamp identity use auto --repo OWNER/REPO.
  • stamp identity use @alice needs a live act-as grant from @alice to you. With --repo, that grant must reach the repository. Otherwise Stamp refuses it (IDENTITY_HUMAN_UNKNOWN, IDENTITY_GRANT_REQUIRED) and names the stamp request act-as command to run. Switching to app or auto is always allowed.
  • A repository's setting overrides your default. A renamed repository loses its setting, and your default applies again.
  • If @alice's grant is revoked or expires, your setting stays, and stamp identity show marks it stale. On a covered repository your writes are then refused until you renew the grant or choose app or auto (with auto, a grant that ended more than 7 days ago no longer refuses anything). The exception is a repository's setting @alice made for herself as a grantor (setBy type grantor): once her grant no longer reaches the repository, your default applies there instead.
  • A person can also set it from Settings › My agents (Default identity): your owner (for a CLI agent) and the server's owners and admins to anything above, and a person who granted you act-as only to themselves, for a repository their grant reaches that has no setting yet (or one they set). Choosing a person still needs that person's live grant to you. You are told with a Raft agent event (its inbox item has kind identity_preference_changed), and stamp identity show --json names who set it (setBy).
  • Once a push is received, its publication uses the credential recorded at the push, and a retried stamp pr create with the same idempotency key keeps the credential it recorded first. Changing your identity affects the next push or pull request, never one in progress. Auto-merge resolves again when it merges.
  • A pull request that changes a path your human owns opens as the App. When stamp pr create would open a new pull request through the act-as grant of a person whom .stamp/CODEOWNERS (read at the base commit) names as an owner of a path it changes, and your identity is auto, it opens it as the server's GitHub App instead, because GitHub never counts a pull request's author's own approval. The grant is not used, so a once grant is not spent. With your identity set to that person (@HANDLE), it opens as them, as you asked, with a warning; with app it opens as the App anyway, and pushes are not affected. Where the App does not cover the repository the grant is the only way, so it opens as them with a warning naming the path and the next step (another owner of that path approves it); if Stamp cannot read the file or the change, it opens as them with a warning saying so. Being opened as someone never counts as their approval.

Every push tells you who it publishes as:

text
remote: GRANT: this push publishes as GitHub user alice through grant grt_… from @alice (until revoked); default identity: @alice
remote: IDENTITY: this push publishes as the server's GitHub App (your default identity is app; grant grt_… is not used (`stamp identity use auto` to use it))

stamp pr create prints opened as: LOGIN (why), stamp receipt get prints published as: / publishes as:, and stamp whoami prints your default and how many live act-as grants you hold. A pull request that opens as the App for a code owner says so:

text
opened as: stamp-build[bot] (this server's GitHub App, because @alice is an owner of ".stamp/CODEOWNERS" (line 2 of .stamp/CODEOWNERS) and GitHub will not count @alice's approval on a pull request opened under their account (act-as grant grt_… is not used))

stamp pr view --json names the account a pull request was opened with in openedAs: {"kind": "app"}, or {"kind": "person", "person", "grantHref"} for one opened through a person's grant. person is a principal like every other: kind person with their handle, name and the account as githubLogin when Stamp knows them on your server, else kind github_user with the account as githubLogin. grantHref, the grant's page, is there only for you when you used the grant and for the person who gave it. It is absent when Stamp has no record that it opened the pull request.

Credit your human as co-author ​

Credit the people behind this change: whoever asked for it, reported the problem, or worked it out with you; one line each, people before agents. Use GitHub's co-author trailer; Stamp prints the line, with each person's GitHub noreply address (never their email). Stamp already credits you (the agent) when it merges; this line is for the people, not for you.

sh
stamp identity coauthor --for @alice    # anyone of your server, by Raft handle (or @ID)
stamp identity coauthor                 # without --for: the person whose act-as grant you hold

It prints Co-authored-by: alice <[email protected]> on stdout; add it as the last line of your commit message, after a blank line. No act-as grant is needed: --for names any person of your server who has signed in to Stamp, has connected GitHub and has not turned on "Don't credit me as co-author" (Settings › Access). Otherwise it refuses and says why: COAUTHOR_UNKNOWN (nobody with that handle has signed in to Stamp on your server: they sign in and connect GitHub), COAUTHOR_GITHUB_NOT_CONNECTED (they connect GitHub in Settings › GitHub), COAUTHOR_OPTED_OUT (commit without their line), COAUTHOR_AMBIGUOUS (two people share the handle: name one by --for @ID). People of other servers are never looked up.

Without --for, it prints the person who gave you a live act-as grant and can be credited; when several did, it lists them and exits 1 (choose with --for); when none did, it asks you to name the person with --for. An accepted push that adds commits to a branch, none of which has a Co-authored-by: line for a person (a line naming only you, or a model, does not count), reminds you with a remote: COAUTHOR: line. Nothing enforces it at push.

When Stamp squash-merges through GitHub (stamp pr merge with the squash method, and auto-merge), it keeps model and AI attribution off the base branch: lines such as Co-Authored-By: Claude <[email protected]> or Cursor's, aider's, Amp's and Gemini Code Assist's, and the credit GitHub would give a model that authored a commit (such as Copilot's coding agent). It also drops the Co-authored-by: line that names, by their GitHub noreply address, anyone who turned on "Don't credit me as co-author" (a line with their own email is kept). When it has one of these to drop, Stamp writes the squash message itself: it credits every author of the branch's commits with a Co-authored-by: line (once per email, the merging account, models and anyone who opted out left out) and keeps everyone else's Co-authored-by: lines. A Stamp agent's address, a GitHub user's and a person's at a model vendor ([email protected]) are never dropped as a model's. Where your repository's squash message is the pull request's description, Stamp also writes the message itself whenever the description carries Stamp's byline or its invisible markers, so they stay out of the commit (see Attribution on GitHub); a merge commit whose message is the description gets the description without them. With nothing to drop, Stamp leaves the message to GitHub and your repository's squash setting; GitHub's default already credits the branch's other authors. If GitHub's quota keeps Stamp from reading the branch's commits right now (or the pull request's title and description, where your repository's squash setting uses them), Stamp does not merge yet: stamp pr merge answers GITHUB_RATE_LIMITED with the time to retry, nothing is merged, and an auto-merge waits until then.

Full GitHub permissions (rolling out) ​

A person can authorize Stamp's own GitHub OAuth App with their own GitHub account, on their Settings › GitHub page (see Full GitHub permissions). Agents do not request these permissions, are not told whether a person has them, and can never use them: they are used only for an action that person takes in their own browser, never for an agent. When a call needs more than the server's GitHub App may do, ask through a request instead (stamp request admin-ops for an administration change): the person can approve it there with their own GitHub access.

Single-call admin-api (removed) ​

stamp request admin-api (one repository administration call, a read or a write, run once by an admin) is removed from Stamp (November 2026). Ask for a change to rulesets, branch protection, environments or the repository's settings with admin-ops, even when it is one step; it needs Stamp CLI 0.24.0 or later: update with npm install -g @botiverse/stamp-cli@latest (or the command your install's update notice names). stamp request admin-api is refused on your machine by this CLI, and filing "kind": "admin_api" is refused by the server with ADMIN_API_REQUEST_RETIRED (HTTP 410), naming admin-ops; stamp request answer is gone too. There is no replacement for a read stamp api refuses (secrets and variables, webhooks, deploy keys, Actions permissions): ask a person with admin rights on the repository to look it up on GitHub. Requests filed before the removal stay readable with stamp request get ID.

Batches of administration steps: admin-ops (rolling out) ​

When a change needs one or several administration steps on one repository (an environment's reviewers, a ruleset, branch protection, the repository's settings, a secret, a variable, a Stamp ref policy, a Stamp merge hold), write them in one plan file and ask once. This is also how a single change is asked for: single-call admin-api requests are removed (see above).

yaml
repository: OWNER/REPO
reason: add a reviewer to production and rotate the Cloudflare token
steps:
  - github: {method: PUT, path: environments/production, body: {reviewers: [{type: User, id: 1234}]}}
  - secret: {name: CLOUDFLARE_API_TOKEN, environment: production, from: env:CF_API_TOKEN}
  - secret: {name: DEPLOY_KEY, from: approver}   # the approver types the value
  - secret: {name: OLD_TOKEN, delete: true}
  - variable: {name: REGION, value: eu-west-1}
  - policy: {kind: dispatch_refs, workflowPath: .github/workflows/dispatch-production.yml, addPatterns: [refs/tags/v*]}
  - merge_hold: {branch: main, workflows: [Test], label: fix-red}   # or {branch: main, off: true}
stamp request admin-ops --plan plan.yaml [--to @HUMAN] [--dry-run]
  • A plan has at most 30 steps on one repository; a github step's body is at most 64 KiB. A github path not under repos/ is the plan's repository's (environments/production is repos/OWNER/REPO/environments/production). variable and policy steps take the fields POST /v1/requests takes (policy is the shape of stamp repo guard / workflow refs: kind, workflowPath, patterns, addPatterns, ...). The plan may be YAML or JSON.
  • A policy step's exempt agents are your server's alone: it never names another server's entries (exemptAgents replaces your server's entries only), and an entry that names another server (its id or slug, a server Stamp does not know) or a plain id or handle that is not an agent of your server (a typo, or an agent that has not signed in to Stamp yet) is refused at filing with REF_POLICY_EXEMPT_SERVER_NOT_HELD, the same words whatever it names (@handle with no such agent on your server is WORKFLOW_DISPATCH_AGENT_UNKNOWN). Its patterns and clear are the rule's, though, for every server covering the repository: every server's row is a copy of the rule, so its patterns and mode reach them all, and a clear deletes every row and ends every exemption from the rule. An exempt agent covers the patterns it was granted: a pattern a step adds holds it too, unless the step names it in addExemptAgents, which grants it again at the rule's patterns. On a rule whose servers' rows differ in mode (none in production today), a step that leaves the rule enforcing also empties the evaluating server's list and ends its agents' exemptions with no ref pattern. The request page and GET /v1/requests/ID (stamp request get ID --json) show your server's entries, and of the other servers only how many hold a row of the rule (otherServers in BEFORE, AFTER and the step's result), and the reasons of the step's effect about them as a count, elsewhere (the step still counts as a loosening when one of them loosens).
  • A policy step of kind: release_refs or workflow_paths may add exemptFor: "2h" (from 10m to 30d; 90m, 7d) to exempt the agents its addExemptAgents names, of your server, for that long only, for example policy: {kind: release_refs, addExemptAgents: ["@release-bot"], exemptFor: "2h"} for one release: the agent is not added to the rule's exempt list, the approval page shows the exemption with the moment it ends, and after that your next push to a protected ref is refused like any agent's that is not exempt (nothing to clean up). An agent already on the list stays exempt until revoked; to make it temporary, also name it in removeExemptAgents in the same step.
  • A variable step with a value sets the variable whether or not it already exists: when the batch runs, Stamp creates it or updates it, whichever GitHub's state asks for, so changing an existing variable is one step and one approval (update: true, once needed for that, is still accepted and changes nothing). delete: true deletes it. The approval page shows the approver whether the step creates or updates, with the current value, and the approval holds only for what they saw: a variable someone created, changed or deleted in between is not overwritten, the approver reads the page again (you file nothing again).
  • A variable can be set at three levels, and a job reads the environment's value first, then the repository's, then the organization's. So a repository-level variable has no effect in a job that uses an environment holding a variable of the same name. --dry-run does not read variables (it marks each variable step "not read"; read them yourself with stamp api .../actions/variables once the App holds Variables: read); the approval page reads it with the approver's GitHub access and shows it beside the step: for a repository-level step, the environments that hold the same name (the first 10 environments are checked; "more environments not read" beyond that), and for an environment-level step, whether the repository and the organization hold it ("not read" when the approver's access cannot read it). This is information for the approver, never a refusal. When the value a deploy uses matters, set the variable at the level the job reads, or say in the plan's reason which environment you mean.
  • A secret names where its value is on your machine: from: env:VAR, from: file:PATH (relative to the plan file) or from: stdin; or from: approver when you do not have the value and the person who approves does (below). A plan that writes the value itself (value:) is refused. One trailing newline (\n or \r\n) is dropped from a file or stdin value, so echo "$TOKEN" > token.txt stores the token without it; an env: value is taken as it is.
  • Your CLI reads each secret's value on your machine, and its plain value never leaves your machine. The batch arrives ready to approve when the server's GitHub App holds Secrets: read (Environments: read for an environment's secret), when an approver on your server has already opened such a request for the repository (or environment), or, where Stamp offers it, when you file with a current stamp CLI as a Raft agent (with a working raft CLI). Otherwise it is filed with the secrets' names only until an approver opens the request (below).
  • --dry-run prints the steps as the approval page lists them (secrets by name) and files nothing. It first asks Stamp whether admin-ops is enabled on this deployment; when it is not, the dry run says so at the top: submitting would be refused with ADMIN_OPS_NOT_ENABLED, so ask a person with admin rights on the repository to make the change on GitHub, or the deployment's operators to turn admin-ops on (single-call admin-api requests are removed, so they are no way around it).
  • A merge_hold step asks for what stamp repo settings --merge-hold BRANCH --workflows A,B [--label L] (or --off) changes, which you may never change yourself: hold direct merges into the branch while one of the workflows' latest run on it is red. workflows is a list, or one "A,B" string; label is optional (fix-red). Only a person with the owner or admin role of your server approves it (no GitHub role is needed for it; anyone else gets ADMIN_OPS_MERGE_HOLD_ADMIN_REQUIRED), so --to someone else is refused at approval. --dry-run reads the repository's holds and prints, under each merge_hold step, the branch's hold now and the one you ask for. When it runs, Stamp creates the fix label on the repository if it is missing, as the command does. A step may also name the hold's cap (max_hold, as --max-hold), its on-call (on_call, as --on-call) and its probe (probe_workflow and probe_job together, as --probe-workflow and --probe-job; probe_job is one job or several comma-separated, quoted inside {...}: probe_job: "unit-server,commit-policy"; probe_off: true clears it); a field left out keeps the branch's own.
  • The person who approves must have admin rights on the repository on GitHub (for a batch of merge_hold steps only: the owner or admin role of your server instead). Stamp runs the steps once, in order, as them, and stops at the first failure (earlier steps stay done). stamp request get ID shows each step's result and what was read back.
  • When the batch was filed with the secrets' names only, run stamp request admin-ops seal ID --plan plan.yaml once the approver has opened the request (it reads your plan's from: sources again). Nothing runs before every secret's value is in.
  • If GitHub changes the repository's secrets setup before approval, a batch may end refused with nothing run: file it again. If a batch fails while it runs, or is declined, closed or expires, file a new batch, with the secrets' values again, for anything still needed.
  • from: approver (or stamp request admin-ops secret NAME -R OWNER/REPO --value-from approver --reason TEXT) files the secret with no value at all: the approval page asks the approver to type it, and it is written to GitHub when the batch runs. Neither you nor Stamp ever sees the value, and seal never touches that step. Use it for a credential only a person holds (a deploy key, a third-party token, a signing certificate). The approver's field keeps several lines as typed (a PEM key) and can load a file: a text file as it is, any other file (a .p12) as base64, so name such a secret for what the workflow decodes (MACOS_CERT_P12_BASE64).
  • A secret of an environment that does not exist yet can be in the same batch as the step that creates it when you filed it as a Raft agent with a current CLI (above), so Stamp holds the value until the environment exists: at approval time Stamp creates the environment first, then writes the secret into it. Otherwise (your CLI could not, or for a from: approver step), such a batch can never be approved, because its value must be ready for GitHub before approval and GitHub allows that only once the environment exists, so nobody is asked to decline it: ADMIN_OPS_SECRET_ENVIRONMENT_NOT_CREATED. Filing refuses it with nothing filed: stamp request admin-ops and its --dry-run list the repository's environments (as stamp api repos/OWNER/REPO/environments does) and refuse the plan before anything is sent, and the server answers HTTP 409 when the listing of its GitHub App shows the environment missing. When Stamp cannot tell at filing (the listing could not be read), the request is filed; as soon as an approver opens it (or approves it), Stamp reads GitHub's 404 for the environment's key and ends the request itself (a secret filed by name first gets two minutes after filing, for your CLI to provide its value): closed by Stamp with reason ADMIN_OPS_SECRET_ENVIRONMENT_NOT_CREATED, nothing run, its secret values deleted, and your notice and stamp request get ID say how to split the batch. Split it this way: file it again without those secret steps first (with the step that creates the environment, PUT environments/NAME, and its deployment branch policies), and once that request has run, file the secrets as a second request (stamp request admin-ops secret NAME -R OWNER/REPO --environment NAME --value-from ... for one). A batch that updates an environment that already exists is not concerned.
  • A workflow job's environment: that does not exist in the repository is created by GitHub on the first run that names it, with no protection (no required reviewers, any branch may deploy), so a cloud OIDC trust pinned to that environment's name then trusts every branch that can run the workflow. Ask for the environment before that first run (a workflow that runs on push or pull_request may run as soon as your push is published), restricted to the default branch: {method: PUT, path: environments/NAME, body: {deployment_branch_policy: {protected_branches: false, custom_branch_policies: true}}} then {method: POST, path: environments/NAME/deployment-branch-policies, body: {name: "main", type: branch}} (no required reviewers; add reviewers to the PUT's body when the environment needs them). If a workflow already ran, the environment exists unprotected: the same steps update it. When a push of yours changes a file in .github/workflows/ whose jobs name an environment the repository does not have, Stamp accepts the push and its answer prints a WARNING naming each missing environment and its workflow, with this plan (for your repository's default branch) ready to save and file with stamp request admin-ops --plan env.yaml. It is a warning, never a refusal; it is not shown when Stamp could not list the repository's environments (an expression such as ${{ inputs.env }} is not checked).
  • A variable step can be set back by you, the filing agent, if users are harmed and the approver allowed it when they approved: stamp request restore ID --evidence TEXT. See Restore a variable your admin-ops batch changed.
  • One secret without a plan file: stamp request admin-ops secret NAME -R OWNER/REPO [--environment ENV] (--value-from-stdin | --value-from env:VAR|file:PATH|approver) --reason TEXT [--to @HUMAN] [--dry-run] files the one-step plan these flags name; printf %s "$TOKEN" | stamp request admin-ops secret CF_TOKEN -R OWNER/REPO --value-from-stdin --reason "rotate". The value is never a flag. If it is filed by name only (first time), seal it with stamp request admin-ops seal ID --name NAME [--environment ENV] --value-from-stdin (or --value-from the same source).

Rename, edit, archive or delete a repository: stamp repo ​

The repository commands of gh repo, with gh's flags and argument order. REPO is OWNER/REPO and defaults to the repository of the checkout you run the command in (its origin remote), except for delete, which always names it (the origin may be a fork, or not the one you mean).

stamp repo view [OWNER/REPO] [--json]
stamp repo rename NEW_NAME [-R OWNER/REPO]
stamp repo edit [OWNER/REPO] [--description TEXT] [--homepage URL] [--add-topic T]... [--remove-topic T]...
                [--default-branch BRANCH] [--visibility public|private|internal --accept-visibility-change-consequences]
                [--enable-issues[=false]] [--enable-wiki[=false]] [--enable-projects[=false]] [--enable-discussions[=false]]
                [--enable-merge-commit[=false]] [--enable-squash-merge[=false]] [--enable-rebase-merge[=false]]
                [--enable-auto-merge[=false]] [--delete-branch-on-merge[=false]] [--allow-update-branch[=false]]
                [--allow-forking[=false]] [--template[=false]]
stamp repo archive [OWNER/REPO]
stamp repo unarchive [OWNER/REPO]
stamp repo delete OWNER/REPO
  • view only reads, through Stamp like stamp api (the server's GitHub App), wherever you can already read the repository: full name, description, homepage, visibility, default branch, topics, archived, the repository it is a fork of, stars, forks, open issues and pull requests, license, and the README as text. --json prints the same fields and readme.
  • rename, edit, archive, unarchive and delete need admin rights on GitHub, which you do not have: each files one admin-ops request and prints its link, exactly as stamp request admin-ops would for the same steps (PATCH repos/OWNER/REPO, PUT repos/OWNER/REPO/topics, or DELETE repos/OWNER/REPO alone). --reason TEXT tells the person why (a line naming the change is sent otherwise), --to @HUMAN asks one person instead of the server's owners and admins, --dry-run prints the request and files nothing. -y/--yes is accepted as gh takes it and changes nothing: the person confirms.
  • Before filing, the command reads the repository: a field already as you ask is left out, and a command that would change nothing (an archived repository archived again, an unchanged edit) files nothing and says so. --add-topic/--remove-topic take a topic each or a comma-separated list; Stamp sends the whole new list (GitHub replaces every topic), at most 20. Writing topics yourself through stamp api (PUT repos/OWNER/REPO/topics, GraphQL updateTopics) is refused (rule repo.topics), as the repository's other settings are.
  • The person approves on the requests page, which shows each field old → new (raft-ui-lib → pika; a visibility change on a line of its own) and reads it again with their GitHub access when they approve: if anything moved since they read it, nothing runs and they read it again (ADMIN_OPS_STATE_CHANGED; you file nothing again). Stamp then makes the change once, as them, and tells you the outcome like any admin-ops request (stamp request get ID).
  • A rename is the last step of a batch (ADMIN_OPS_REPO_RENAME_LAST): steps after it would still name the old name. The new name must be a GitHub repository name (1 to 100 letters, digits, ., - or _, not starting with -, not . or ..); Stamp refuses anything else when the batch is filed (ADMIN_OPS_STEP_INVALID), whether it comes from stamp repo rename or a plan for stamp request admin-ops. Once it ran, the notice that tells you the outcome names both names (renamed OWNER/OLD → OWNER/NEW), and a push, fetch, stamp pr create, stamp repo view, stamp api call or other repository command under the old name is refused REPOSITORY_RENAMED, naming the new name: point your checkout at it (git remote set-url origin with the old name replaced by the new, or stamp repo use) and run the command again with the new name; a pull request from a branch pushed before the rename opens from a push to the new name.
  • A deletion is its batch's only step (ADMIN_OPS_REPO_DELETE_ALONE). GitHub deletes the repository with its issues, pull requests, wiki and releases, and nobody can restore it, Stamp included. The person approves it in the Stamp app in three steps, as on GitHub: "I want to delete this repository", "I have read and understand these effects" (the page lists them with live counts: open issues and pull requests, stars, forks and whether GitHub deletes them, releases, the wiki, Actions secrets and variables), then they type the full OWNER/REPO. Stamp checks the typed name again when they approve (ADMIN_OPS_REPO_DELETE_UNCONFIRMED), so no other page or client can skip it. GitHub may still refuse: an organization can let only its owners delete repositories, and full GitHub access needs the delete_repo scope; the request then ends failed with GitHub's words, and nothing was deleted. Say why with --reason.

Anything else: stamp api ​

Send a GitHub REST or GraphQL call not covered by dedicated stamp commands (like gh api), authenticated through your Stamp session without holding a GitHub token:

sh
stamp api repos/OWNER/REPO/issues -X GET -f state=open -F per_page=50 --paginate
stamp api repos/OWNER/REPO/issues/12/labels -f 'labels[]=bug'
stamp api repos/OWNER/REPO/issues/12/comments -F [email protected]
stamp api graphql -f query='query($o:String!,$n:String!){ repository(owner:$o,name:$n){ id } }' -f o=OWNER -f n=REPO

Fields (-f string, -F typed: true/false/null/numbers/@FILE/@-) go into the JSON body (or query string with -X GET; omitting -X with fields defaults to POST). Pass -H 'Accept: application/vnd.github.diff' for diffs.

A public repository your server's GitHub App does not cover is readable too: Stamp forwards your GET calls under repos/OWNER/REPO/ with read-only access to what GitHub shows anyone of a public repository, only while GitHub says it is public (one made private is refused from the next call on), and through every rule a covered repository's reads go through (its git blobs and trees come from GitHub, not Stamp's copy). A redirect GitHub answers there (a renamed repository, a moved issue) is not followed: the call is refused. A write there (POST, PATCH, PUT, DELETE) is refused as before, its next step saying that if the repository is public, stamp repo fork OWNER/REPO --as @HANDLE asks a person to let you contribute as them, and stamp api graphql reads only covered repositories (Reading a public repository your server does not cover).

Git blobs and trees come from Stamp's own copy of the repository (the one your clones and fetches are served from) when it holds them: GET repos/OWNER/REPO/git/blobs/SHA and GET repos/OWNER/REPO/git/trees/SHA (with or without ?recursive=1) with a full 40-character SHA are answered in GitHub's JSON shape, their url fields pointing at this Stamp's /api/v3/, with the header X-Stamp-Source: mirror. They spend almost none of the GitHub quota your server shares: one check a minute per repository that its name still names the repository (they still count toward Stamp's own request limit, API_RATE_LIMITED). The same access rules apply as for any stamp api read. Anything else goes to GitHub as before: an object Stamp's copy does not have yet, a blob over 10 MiB, a tree over 100,000 entries, a branch, tag or commit in place of a tree's SHA, a short SHA, or -H 'Accept: application/vnd.github.raw'. To read most of a repository, clone or fetch it through Stamp instead.

Lists page the way GitHub's do. page and per_page go to GitHub as you send them (GitHub's default is 30 items, at most 100), and GitHub's Link header comes back with every URL pointing at this Stamp's own /api/v3/, with the same path and query: follow its rel="next" URL, with your Stamp session, until there is none. --paginate does this for you. A link to any other host is left out, so following the header never leaves Stamp. An answer larger than Stamp holds (32 MiB for REST, 2 MiB for GraphQL) is refused with RESPONSE_TOO_LARGE (HTTP 413 for a read, 502 for a write, whose outcome is then unknown), never cut short: ask for a smaller per_page and follow Link (for GraphQL, a smaller first: and after: $endCursor).

Scope and restrictions:

  • Allowed scope: repos/OWNER/REPO/... on repositories covered by your server's GitHub App (plus rate_limit).
  • Read before you ask: repository administration reads that the App's permissions allow go through stamp api directly, with no request: collaborators (repos/OWNER/REPO/collaborators), rulesets (.../rulesets, .../rulesets/ID, .../rules/branches/BRANCH), environments with their protection rules and deployment branch policies (.../environments, .../environments/NAME, .../environments/NAME/deployment-branch-policies), Actions runs and jobs (.../actions/runs, .../actions/runs/ID/jobs) and classic branch protection (.../branches/BRANCH/protection; a 404 "Branch not protected" means the branch is protected by rulesets only, if at all). Try the read first. Actions variables and the names of Actions secrets are reads too, once the server's GitHub App holds Variables (read) and Secrets (read): stamp api repos/OWNER/REPO/actions/variables, .../actions/variables/NAME, .../environments/ENV/variables[/NAME], and the secret name lists .../actions/secrets and .../environments/ENV/secrets (names and dates; GitHub never returns a secret's value). Variable values are readable by every agent of a server whose App covers the repository, so never keep anything sensitive in a GitHub variable: put it in a secret. Without that permission GitHub's 403 comes back: ask a person with admin rights on the repository. Only the reads listed under denied routes below (one secret's metadata, Dependabot, Codespaces and organization secrets and variables; Actions OIDC settings; webhooks; deploy keys; Actions permissions) are refused, and Stamp has no request for them (the single-call admin-api is removed): ask a person with admin rights on the repository to look them up on GitHub.
  • Denied routes (API_ROUTE_DENIED): actions handled by dedicated stamp commands or reserved for people—merging (stamp pr merge), approving (stamp pr approve), pushing or deleting refs, commits and contents (git push; git push origin --delete NAME deletes a branch or tag), statuses/checks, rerunning/cancelling CI (stamp run rerun, stamp run cancel), starting workflow_dispatch (stamp workflow run), deleting workflow runs (stamp run delete), and repository administration: changing settings, branch protection, rulesets and collaborators (reads of those go through stamp api, see above); hooks, deploy keys, secrets and variables, Actions OIDC settings and Actions permissions (reads too). Deploy keys, Actions OIDC settings and Actions permissions are not readable through Stamp: a person looks them up on GitHub. Actions variables and secret name lists are (see Read before you ask). One exception: GET repos/OWNER/REPO/actions/secrets/public-key and GET repos/OWNER/REPO/environments/ENV/secrets/public-key (exactly these paths) are ordinary reads, audited like any other, so you can fetch the key a secret is sealed to before filing an admin-ops request. GitHub answers only when the server's GitHub App already has Secrets (read) for the repository's key or Environments (read) for an environment's; otherwise its 403 comes back and the key reaches you as before, when an approver opens the request. Listing secrets, reading one secret, and every secret write stay refused.
  • Releases, labels, locks and workflow state are ordinary writes: creating, editing and deleting releases (and deleting or renaming their assets; uploading one is stamp release upload), label definitions, locking and pinning conversations, re-enabling a workflow GitHub disabled for inactivity, and deleting Actions caches go through stamp api like a comment does (or gh's commands: stamp release, stamp label, stamp issue lock|pin, stamp workflow enable, stamp cache delete). A release's tag, new or current, stays under the repository's protected release refs (RELEASE_REF_RESTRICTED), and its notes carry your attribution. Disabling a workflow, and enabling one a person disabled (WORKFLOW_DISABLED_BY_PERSON), stay a person's on GitHub.
  • A write's parameters go in its JSON body (API_QUERY_NOT_ALLOWED_ON_WRITE): on POST, PUT, PATCH and DELETE, Stamp reads what you ask for from the JSON body, and that is where its rules look. A write whose URL carries a query parameter (repos/OWNER/REPO/pulls/5/reviews?event=COMMENT), or a ; path parameter, is refused with HTTP 400 before GitHub is called, naming the parameter: send it in the body (-f name=value; with --input FILE, put it in the file, since --input together with -f sends the fields in the URL). The one write that keeps query parameters is DELETE repos/OWNER/REPO/actions/caches (key, ref), as GitHub documents it. A graphql call takes no query string at all. Reads (-X GET) keep theirs.
  • A pull request you open here is yours: POST repos/OWNER/REPO/pulls and GraphQL createPullRequest record you as the pull request's opener, as stamp pr create does. Stamp saw no push with it, so it counts as opened from an existing branch: your own stamp pr approve on it is refused (SELF_APPROVAL_OPENED_FROM_EXISTING_BRANCH) unless you pushed its head through this server, and another agent or a person approves it. Prefer stamp pr create --receipt, which ties the pull request to your push. With GraphQL, select the number: createPullRequest(input: {...}) { pullRequest { number } } (or its url); Stamp records exactly the pull request GitHub's answer names, and nothing when GitHub refused the mutation (an errors entry for it, the field null). Without the number, Stamp records one only when exactly one pull request it has no record of anywhere was opened by its App in the last 2 minutes on the head repository, head branch and base branch you sent (never for a head named by headRepositoryId); otherwise none, and the pull request has no opener on record.
  • Foreign content rules: you may edit titles/bodies only on issues or pull requests opened by an agent of your server (content.edit-foreign), close/reopen only pull requests you opened (pr.close-foreign), edit/hide only comments and reviews written by an agent of your server, and request changes only on pull requests opened by an agent of your server (pr.request-changes-foreign; post a comment instead). Applying labels, assignees, and milestones is open.
  • Node ids in a GraphQL write (GRAPHQL_NODE_ID_UNREADABLE): Stamp decides a mutation by the one node its ids name, so it reads every id of it: write each id (pullRequestId, subjectId, id, ...) as a plain "string" or send it as a variable's string value. A block string ("""..."""), a value that is not a string, or a variable left to its default value is refused with HTTP 400 before GitHub is called, and so is an updatePullRequest that changes the base of a pull request other than the one the mutation is bound to: change one pull request's base per mutation.
  • A base change and a merge of one pull request never cross: a PATCH repos/OWNER/REPO/pulls/N that sets base, and a GraphQL updatePullRequest that sets baseRefName, are refused at once with PR_CHANGE_IN_PROGRESS (HTTP 409, nothing sent) while a merge or queue join of that pull request is on its way through Stamp: run it again.

Who did it: one way to name a person ​

Every command output formats actors consistently in a single tab-free column whose first token never contains spaces:

sh
@builder (agent)                       an agent of your server
@builder (agent, acme)                 an agent of another server
@builder (agent, acme · federation)    an agent of a server in your federation
@alice (person)                        a person (other servers: as for agents)
raft:agt_123 (agent)                   Stamp knows no handle for it
github:octocat                         a person's GitHub account (reviews, comments, reruns)
github:octocat · outside Stamp         known to have acted on GitHub (opened the PR there)
app:stamp-build                        a GitHub App's bot
@builder (agent) via act-as @alice     through an act-as grant of @alice
unknown                                nobody can be named without guessing

In --json, each actor's principal (or named field such as openedBy, approvedBy, authorPrincipal, actorPrincipal) carries {kind, id, handle, name, server: {id, name, relation: this|other|federation}, githubLogin, app, via: stamp|github, actAs, display}.