Skip to content
Connect an agent

Connectors

GitHub

The GitHub connector links the Plotwork GitHub App to your organisation. Once linked, the Drift tab lists your repositories to enable, and the trusted publisher form lists your repositories, their workflow files and their deployment environments, so nothing has to be typed.

TL;DR

QuestionAnswer
What does it do?Links the App's installations. Drift then enables repositories with one pull request, and the GitHub Actions trusted publisher form picks the repository, workflow and environment from lists.
Which plan?Pro and Enterprise, the plans with the drift dashboard and trusted publishers. Unlinking works on any plan.
Who connects it?The owner and the admins, signed in, under Connectors, GitHub.
What does the App read?Repository names, ids and default branches, file paths of the default branch, and deployment environment names.
What does Plotwork keep?The installations' and repositories' ids and names, each repository's default branch, the formats a scan found, and its status. No token, no path and no file.
Is it needed?No. Without it, the trusted publisher form takes a typed repository and workflow file as before.
Is it recorded?Yes. Linking and unlinking are in the organisation's audit log, never with a token.

1. Connect

  1. Open the organisation in the portal, choose Connectors, and open GitHub.
  2. Choose Connect GitHub. GitHub asks you to authorise Plotwork and sends you back with the installations of the App your GitHub account can reach.
  3. Choose the installation and choose Link.

When your GitHub account can reach no installation yet, choose Install on another account. GitHub asks which account to install the App on and which repositories it may reach, then sends you back to link it. The GitHub App guide covers every message the linking page can show.

2. Manage the installations

The GitHub page lists each linked installation:

ShownMeaning
The accountThe GitHub organisation or person the App is installed on.
RepositoriesHow many of its repositories Plotwork holds.
All repositories or Chosen repositoriesWhat the installation may reach, set on GitHub.
SuspendedIts owner paused the App on GitHub. Nothing can be enabled until it is resumed.
Settings on GitHubWhere to change its repositories, suspend it or uninstall it.

Refresh repositories reads the installation's repositories again, 100 at a time. Unlink asks first, then forgets the installation and its repositories. The App stays installed on GitHub until you remove it there, and trusted publishers it made stay on Keys & CI.

The Drift tab shows the connection in one line, GitHub connected with the number of repositories, and Manage opens this page.

3. Add a trusted publisher from lists

  1. Choose Add a trusted publisher on the GitHub page, or open Keys & CI, CI/CD, and choose Add trusted publisher.
  2. Choose GitHub Actions.
  3. Open Repository and type part of its name. Repositories are grouped by account, with a lock on a private one and the default branch under each name.
  4. Workflow lists the repository's files under .github/workflows. Choose one, or type another file name.
  5. Environment suggests the repository's deployment environments. Choose one, type another, or leave it blank.
  6. Choose what its runs can do, and save.

Type the repository instead switches to the typed fields at any time. Editing an entry keeps its own repository, even when no installation reaches it. With more than 100 repositories, the list asks Plotwork to search as you type, 50 at a time.

4. What the App reads and writes

ItemReadKept
Repositories of an installationNames, ids, default branches and whether each is private, on link and refreshThe same
File paths of the default branchWhen a repository is scanned, or the form lists its workflow filesOnly the format names a scan found
Deployment environmentsTheir names, when the form lists themNo
FilesOnly when Enable opens its pull requestNo
TokensNone. Each call gets a token for one repository that lives an hour, in memory.

The App writes only the branch plotwork/setup (or plotwork/fix-config) and the pull request Enable opens. Nothing reaches your default branch until you merge it. When GitHub does not let the App read a repository's environments, the form offers none and the field stays free text.

5. Troubleshooting

What the page or form saysWhat to do
The GitHub App is not set up on this serverThis Plotwork server has no GitHub App. Type the repository and workflow.
No workflow file on the default branchThe repository has none yet. Type the file name the workflow will have.
The list may miss a workflowThe repository is too large to read whole. Type the file name if it is not listed.
The workflow files could not be readGitHub did not answer. Type the file name, or try again later.
An installation is suspended on GitHubResume it in its settings on GitHub.

Audit events

ActionWhenDetails
orgs.github.linkAn installation is linkedThe account it is on
orgs.github.unlinkAn installation is unlinkedThe account it is on

See also

PageWhy
The Plotwork GitHub AppLinking, scanning and Enable in full
Trusted publishersWhat a trusted publisher is and what is checked
Drift dashboardWhat enabled repositories report
ConnectorsEvery connector