# GitHub

> Get a push when a GitHub Actions run finishes, a deploy succeeds or fails, an issue or pull request comes in, a release is published, or a repo hits a star milestone.

Connect a repository, or a whole organization, with a GitHub webhook. Opush pushes Actions results, deploys, new issues and pull requests, merges, releases and star milestones. It works with private repositories too, because GitHub sends the events to Opush.

## Set it up [#set-it-up]

<Steps>
<Step>

### Create the integration in Opush [#create-the-integration-in-opush]

In the app or the web console, add a service integration and pick **GitHub**. You can name it after the repo (`owner/repo`). If you leave the name empty, Opush uses the repo name from GitHub's first ping.

Copy the **Payload URL** and the **Secret**.

</Step>
<Step>

### Add the webhook in GitHub [#add-the-webhook-in-github]

In the repository (or organization) settings, open **Webhooks** and click **Add webhook**.

- **Payload URL**: the payload URL from Opush.
- **Content type**: either one works.
- **Secret**: the secret from Opush.

</Step>
<Step>

### Choose the events [#choose-the-events]

Choose **Let me select individual events**, then check what you want:

- **Workflow runs**
- **Deployment statuses**
- **Issues**
- **Pull requests**
- **Releases**
- **Stars**
- **Workflow jobs**, only if you want job-by-job progress in live progress cards

</Step>
<Step>

### Save [#save]

GitHub sends a ping right away, and you get a "Webhook connected" push. If you don't, check **Recent Deliveries** on the webhook in GitHub.

</Step>
</Steps>

An organization webhook covers every repository in it. Opush adds the repo name to each push so you can tell them apart.

## What gets pushed [#what-gets-pushed]

| GitHub event | When Opush pushes | Subtitle | Message |
|---|---|---|---|
| Workflow runs | A run completes | `CI · Failed` | `Fix login bug · main #128` |
| Deployment statuses | A deploy succeeds, fails or errors | `Deployed`, `Deploy failed`, `Deploy error` | `Production · main` |
| Issues | An issue is opened or reopened | `New issue`, `Issue reopened` | `Crash on launch · #42 octocat` |
| Pull requests | A pull request is opened, or merged | `New pull request`, `Pull request merged` | `Add dark mode · #12 hubot` |
| Stars | The repo reaches a star milestone | `⭐ 100 stars` | `acme/rocket · fan` |
| Releases | A release is published | `New release`, `New pre-release` | `v2.0.0 · acme/rocket` |

The push title is the integration's name. When the repo name is different from the integration's name (for example with an organization webhook), the repo is added at the end of the message.

Tapping the push opens the run, the deploy's URL, the issue, the pull request or the release on GitHub.

### Workflow runs [#workflow-runs]

The subtitle is the workflow name and the result: **Passed**, **Failed**, **Timed out**, **Action required**, **Couldn't start**, **Done** (neutral) or **Stale**. The message has the commit title, the branch and the run number.

Skipped and cancelled runs aren't pushed. Failed, timed out, couldn't start and action required arrive as time-sensitive notifications.

### Deployment statuses [#deployment-statuses]

Services that report deploys to GitHub, such as Vercel and Cloudflare, show up here too. Only the result is pushed, not the pending and in-progress steps. Failed and errored deploys are time-sensitive.

### Pull requests [#pull-requests]

Opened and reopened pull requests push "New pull request". Closed pull requests push only if they were merged.

### Stars [#stars]

Opush pushes when the star count reaches 10, 25, 50, 100, 250, 500, 1,000, 2,500, 5,000, 10,000, 25,000, 50,000 and 100,000. Each milestone pushes once, even if someone removes a star and adds it again.

## Options [#options]

- **Only push failures**: skip pushes for runs and deploys that succeed. Issues, pull requests, releases and stars still push.
- **Show progress as a Live Activity** (iPhone and Android apps): while a workflow or deploy is running, a live progress card shows which job is running and how far along it is.

### Live progress for Actions [#live-progress-for-actions]

With live progress on, a card opens when a run starts and updates as jobs move. To see job names and a progress bar, also check **Workflow jobs** in GitHub. Without it, the card only shows that the run is going and for how long.

Progress is based on the number of jobs. Opush remembers how many jobs the workflow had the last time it passed, so the bar is right even before all jobs have started. It stops at 99% until the run is done.

When the run ends, the card shows the result and how long it took, for example "Failed · 3m 12s", then goes away on its own. The normal push tells you the result. Deploy cards show the time since the deploy started, with no progress bar.

See [Live progress](/docs/push/live-progress) for how cards look on iPhone and Android.
