Skip to content

The server's GitHub App ​

Stamp reaches GitHub through Stamp's shared GitHub App. This page is for the server's owners and admins. If you haven't set one up yet, start with Set up your team.

Let this server use an organization or repository ​

Run stamp app request --repo OWNER/REPO: Stamp messages on Raft the owners and admins of this server it confirms administer OWNER on GitHub (for a personal account, its owner), and they choose "Allow" on the request's page. When it confirms none of them, it messages the owners and admins anyway. If Stamp is installed on OWNER, they send an admin of OWNER on GitHub an approval link from the request page, which that admin, who needs no Raft account, opens to allow it. If Stamp is not installed on OWNER yet, anyone of the server can choose "Allow": GitHub then asks OWNER's owners (see When the organization's owner is not on Raft). Nothing else is needed: if Stamp is not installed on OWNER yet, Allow takes them to GitHub to install it (choose "All repositories" there) and back. If Stamp is installed on OWNER without that repository, Allow takes them to GitHub too: they open that installation ("Configure"), add the repository (or choose "All repositories") and save; back on the request, it completes. Agents are told the same when they hit a repository this server does not serve. On a server with a GitHub App of its own, only the server's owners and admins can click Allow, and the page may first send them to GitHub to install that App or add the repository to it. On a server with no GitHub App yet, there is nothing to Allow: an owner or admin of the server chooses its first App in Settings › GitHub. For a personal account, name its owner with --to @HANDLE.

When the organization's owner is not on Raft ​

While Stamp is not installed on an organization, anyone who starts its install and is not an owner of it on GitHub (a person of this server choosing "Allow" on a request, or an owner or admin installing from the setup page) is offered "Request" on GitHub's page instead: GitHub emails the organization's owners and lists the request in its settings, and the request page or the setup page says the install request was sent, by whom and when. An owner approves it on GitHub alone, with no Raft account; GitHub then sends them to a Stamp page that only says Stamp is installed and nothing more is needed.

When GitHub tells Stamp the install was approved (its installation notice names who asked and who approved), Stamp connects it to this server by itself, only when all of these hold:

  • the person who asked is the GitHub account they connected to Stamp on this server, now as when they asked;
  • they asked from this server for that organization in the 30 days before the owner approved, and the same GitHub account asked from no other server. When it asked from more than one, Stamp connects none by itself: each person who asked sees on this server's setup page (or the request's page) that the approval waits for them, and connecting it there connects this server only. One approval connects one server, whichever is chosen first; the others ask the organization's admin another way. Stamp never shows or changes anything of the other servers here;
  • when they asked from a request's page, that request is still waiting (not closed, declined or decided);
  • Raft still names them an owner or admin of the server (one of its people, when they asked from a request's page);
  • GitHub's installation is still there, on that organization, not suspended.

The server then uses exactly what the owner installed: every repository, or the ones the owner chose (to add one later, the organization's admin adds it on GitHub and lets this server use it). Requests for those repositories complete, and their agents are told. The person who asked gets a message naming the owner who approved and what is connected, the setup page names beside the organization who approved it on GitHub and who asked, and when a plain member asked from a request, the server's owners and admins are told in their inbox. An install the owner made on their own (not on a request), or one approved on someone else's request, is not connected this way: an organization admin in this server binds it as before. Once Stamp has picked the server an approval connects (the one that waited, or the one its requester chose), it stays that server's, even when GitHub then refuses the connection (the installation is suspended or holds no repository; it connects once GitHub allows it): to use the organization on another server, send its admin an approval link. An approval connects a server once: if that connection is later removed, the same approval never connects it again.

GitHub never tells Stamp that an owner declined a request or ignored it: after 30 days the setup page says the request lapsed, and you can ask again. If the approval seems lost, "Check again" on the setup page (an owner or admin, or the person who asked; at most six times an hour per server) looks for it in GitHub's record of the App's notices for an installation made in the last hour, and connects it by the same rules; it says when the installation was not made on this request. Stamp keeps an approval (the organization, and who asked and who approved, by GitHub account) while the connection it made lasts, or 30 days when it connected nothing; once that connection is removed, it keeps only the installation id and times, with no logins or GitHub ids, until 30 days after the installation (Data retention).

For a whole account, its page in Stamp (/github/OWNER) does the same: while this server does not use the account yet, it offers "Allow this server to use this account" to every member of the server. An admin of OWNER on GitHub (for a personal account, its owner) who chooses it binds Stamp's installation there with all repositories, or is taken to GitHub to install it first; anyone else is told why not and whom to send the page to.

Creating a repository (stamp repo create) needs Stamp on the whole account, which a request for one repository does not give. When an agent's creation is refused because this server does not use an installation on OWNER, Stamp files that account's request for it ("install the server's GitHub App on OWNER") and gives the agent its link; its "Allow" is this account page's, and the request completes once this server uses an installation on OWNER. See Requests.

Each server uses only the accounts allowed for it; nothing is shared between servers.

From Settings → GitHub ​

Owners and admins can also do it directly on Settings → GitHub (/settings/github), or the "Install the GitHub App" step after sign-in:

  • "Choose an account or organization to bind" lists the Stamp installations you manage on GitHub that this server has not bound yet. Pick one, choose "All repositories" or "Only selected repositories", then "Bind to this server".
  • Not listed? Choose "Install Stamp on GitHub". Coming back from that install binds the new installation to this server, and you land on that server's page even when you are signed in to several servers. A return Stamp cannot match to your click (GitHub came back without that install's state, or you started the install on GitHub itself) binds nothing and cannot know which server you meant: Stamp shows the installation, naming the account it is on, asks which server to connect it to, and offers to bind it.
  • "Bound to this server" lists bound installations. "Remove" unbinds an installation immediately while keeping stored history.

Seeing installations you manage requires connecting your GitHub account. Only server owners and admins can bind installations, and only in their browser, on Stamp's pages: installing, binding and removing are refused from a stamp login sign-in or any other token.

Your personal GitHub account. An installation on a personal account (not an organization) binds only for the person whose GitHub connection in Stamp is that account, because Stamp treats that connection as the account owner's consent. Install Stamp there yourself:

  • Not connected to GitHub in Stamp yet? The return from GitHub connects you as that account and binds the installation in one step.
  • Connected as another GitHub account? Nothing is bound or switched; the page names both accounts and offers "Connect @account instead". It opens Settings → GitHub: choose "Disconnect GitHub" there, then "Connect GitHub" with the installation's account, and you come back to bind it.
  • Another person in Stamp is connected as that account? Only they can bind it; ask them.

What the App's permissions are for ​

The App requests only the permissions Stamp uses—never secrets, variables, or discussions:

  • Code (write): push branches. Workflows (write) is required when a push modifies .github/workflows.
  • Pull requests (write): open and update pull requests.
  • Checks and statuses (write): report check runs and Stamp's approval status on commits.
  • Actions (write): re-run CI and start workflows.
  • Issues (write): create, comment on, and edit issues.
  • Repository creation (write, recommended): create a repository an agent asked for with stamp repo create, once, as the person who approves it. An organization owner approves this permission on GitHub; without it, the person creates the repository from the request page with their own GitHub access, or with their own GitHub CLI.
  • Branch protection (read): used by the merge queue.
  • Organization members (read).

"GitHub configuration check" in Settings → GitHub App compares the GitHub App against what Stamp needs. For any item marked in red, choose "Fix in Permissions & events on GitHub".

Which repositories Stamp can work on ​

Stamp works only on repositories of the accounts this server is allowed to use. To add one, use the request above. To review or change an installation's repositories:

  1. Open Settings → Merge queues and choose "Open" next to an account: its Merge queue page lists that account's repositories, under Queues and Repositories without a queue.
  2. To change them, an owner or admin of the server chooses "Change what the App covers on GitHub" on the Repositories page and updates the repositories there.

Stamp syncs changes automatically:

  • GitHub usually notifies Stamp immediately when repositories are added (for a server's own GitHub App, Stamp then reads the App's repositories from GitHub at once and again 30 seconds later, and covers a new one once GitHub lists it, within about 30 seconds of GitHub's last notice, however many repositories are added at once; a request for one of them completes then); renamed repositories stay covered under their new name. Items in Needs you and the inbox, the idle pull request digest, and stamp inbox also use the new name. Their links open the pull request under its new name, including items recorded before the rename.
  • Stamp also syncs every 10 minutes, or immediately when you choose "Sync now" in Settings → GitHub App. The App's line there says when it was last checked: a periodic sync that finds nothing changed moves that time at most once an hour, and "Sync now" always moves it.
  • A repository deleted on GitHub leaves the server's repositories as soon as GitHub notifies Stamp. Its page then says "This repository was deleted on GitHub" and when GitHub reported it, and offers no fork (the browser API refuses its reads with REPOSITORY_DELETED instead of REPOSITORY_NOT_IN_SCOPE); the request to use it stays offered, in case a new repository has taken the name. Its pull requests are listed as closed and leave the idle pull request digest. Only people of a server that covered the repository see this. If it is restored on GitHub, or a new repository takes the name and the App covers it, its page works as usual again.

If a sync fails, Settings → GitHub App explains why, naming the account whose installation failed, while keeping previously synced repositories. If syncing fails for over an hour, agent commands are refused until the next successful sync.

Owners and admins also see the approval links they sent from the setup page, the open ones and those that ended, on Settings → GitHub App. There they send a new link, or revoke an open one: sending a new link for the same organization replaces the open one.

If an installation of the App is suspended on GitHub, GitHub gives Stamp no access to it, so Stamp stops listing its repositories and refuses agent work on them as soon as GitHub tells it (or at the next sync). In Settings → GitHub App, the account's row under the shared Stamp App says "Suspended on GitHub since date by who", and the App's sync line names the suspended account. When the installation is unsuspended on GitHub, Stamp syncs it at once and its repositories come back; you don't need to choose "Sync now".

When a member hits a missing App ​

Only owners and admins can configure the App; members and agents can request access.

The server has no App. Until an owner or admin chooses the server's first GitHub App, Stamp refuses pushes, pull requests, and reviews. Signed-in people see "Install the GitHub App for your server" with "Skip for now":

  • Owners and admins see the shared App picker directly.
  • Members see "Owners and admins you can ask:" and "Request a GitHub App".

This step belongs to the server you are on. If you are signed in to several servers, a page that shows another of them (a repository or pull request read through that server) is not held up because the server you are on has no App yet.

A repository isn't covered. Agents are told to run stamp app request --repo OWNER/REPO. Stamp messages the owners and admins of this server who administer OWNER on GitHub (for a personal account, its owner), and that person chooses "Allow" on the page; when Stamp confirms no one here does, it messages the owners and admins anyway, who send an admin of OWNER on GitHub an approval link from the request page (that admin needs no Raft account), or, while Stamp is not installed on OWNER, choose "Allow" so that GitHub asks OWNER's owners.

Handling requests ​

Open requests appear on the Requests page and in your account menu badge ("GitHub App requests"). Open one and choose "Allow"; Stamp completes the request and notifies the requester.

Stopping the use of an account ​

In step 2 of Settings → GitHub ("This server's GitHub App"), choose "Unlink" next to the installation. Stamp stops acting on its repositories immediately (tokens already issued by GitHub expire within an hour) and keeps stored history. To uninstall Stamp from the account or organization itself, do so on GitHub.