Skip to content
Source
Sign inSign up

Skills, MCP and apps / Apps and webhooks

Apps

Your service works on pull requests: it builds a preview, publishes a test package, or checks something. An app lets it hear about new pull requests, show its result to reviewers, and trust the uploads that come from CI jobs.

3 min read

An app gives your service its own identity on Source. A person installs it on their account, for all repositories or for picked ones. Then the app gets:

  • An install token: it acts as its own bot, <slug>[app], with only the permissions that the account approved. See Build an app.
  • Webhooks: signed JSON for each event that it picked. See Webhooks.
  • A card on each pull request: Markdown sections, files, buttons and a pass or fail status. See Cards and statuses.
  • A job identity token: a signed token from each CI job that names the app. See Trust a CI job.

Pick your task

You want toStart here
Build an appBuild an app: a small Cloudflare Worker, with its full code.
Install apps on your account or your organizationInstall an app, then Manage installed apps.
Add an installed app to a repository that you adminAdd an app to one repository.
Write a workflow that uploads to an appUse an app from a CI job.
Run Source CI jobs on the machines of your serviceRun Source CI jobs on your machines.
Review pull requestsThe app cards are on the Conversation tab, and the app statuses are on the Checks tab. To make a merge wait for an app, see Branch rules.
Suspend an app, as a site adminSuspend an app.

Find the public apps in the app directory.

What an app can do

An app asks for permissions from this list:

  • contents:read, contents:write
  • issues:read, issues:create, issues:comment, issues:triage
  • pulls:read, pulls:create, pulls:merge
  • jobs:read, jobs:run, assets:read, assets:write, artifacts:read, artifacts:write, secrets:preview

Only apps get these two:

  • surfaces:write: its own card and status on pull requests.
  • ci:runners: run the CI jobs that name the app as their runner, on its own machines. An install with it gets the ci_job events of these jobs. See Run Source CI jobs on your machines.

An app never gets these:

  • Admin and maintain rights on a repository.
  • The vault, secret values, or agent transcripts.
  • Approving a pull request, or deciding on held items. People do that.
  • Held or hidden content. No webhook carries it.

Branch rules hold for an app as for a person.

Limits

  • An app cannot read Git LFS files. lfs:read is not an app permission.
  • An app has no user tokens. It cannot act as the person who installed it.
  • An install for all repositories updates each repository of the account while you wait. On an account with very many repositories, the install can be slow.

What works now

  • A person or an organization registers an app, private or public.
  • People install it on their account, for all repositories or for picked ones.
  • The app gets install tokens, signed webhooks with retries, a card and a status on each pull request, and job identity tokens from CI.
  • A branch rule can make a merge wait for the status of an app.
  • An app with ci:runners runs the CI jobs that name it as their runner, on its own machines.