Appearance
Connect GitHub and GitLab
Connect a repository to a channel and its pull requests, issues, releases and failed builds show up as topics, with no GitHub or GitLab app to install.
Admins can do this. Members can when an admin lets them add apps (Settings › Integrations › Who can add apps). You can only pick a channel you are in.
In Connectdary
- Open Settings › Integrations.
- Under GitHub and GitLab, choose Set up GitHub or Set up GitLab.
- Pick the Channel.
- Tick the Events you want. The quiet defaults are pull requests (or merge requests), review requests, issues, releases and CI failures. Comments, pushes, reviews and passing CI are off.
- Optionally fill Repositories to limit which repositories post (see Filters).
- Choose Create webhook. Connectdary shows a Payload URL and a Secret. Copy both now: the secret is shown once.
The address looks like https://connect.example.com/api/v1/forges/github/<id> (or /gitlab/).
In GitHub
Open the repository or organization, then Settings › Webhooks › Add webhook.
| Field | What to enter |
|---|---|
| Payload URL | The address from Connectdary. |
| Content type | application/json |
| Secret | The secret from Connectdary. |
| Which events | Let me select individual events, then tick the ones below. |
For the default events tick Pull requests, Issues, Releases, Workflow runs and Check suites. Add Issue comments and Pull request review comments for comments, Pushes for pushes, and Pull request reviews for reviews. Connectdary lists the exact boxes for your choice when it shows the secret.
Choose Add webhook. GitHub sends a test; on the Connectdary row, "No deliveries yet" changes to "Last delivery …".
In GitLab
Open the project or group, then Settings › Webhooks › Add new webhook.
| Field | What to enter |
|---|---|
| URL | The address from Connectdary. |
| Secret token | The secret from Connectdary. |
| Trigger | Merge request events, Issues events, Releases events and Pipeline events for the defaults. Add Comments and Push events if you ticked those. |
Add the webhook, then use Test to send one.
INFO
Tick the same boxes on both sides. If Connectdary expects pull requests but GitHub doesn't send them, nothing arrives. Change what Connectdary accepts any time with Events on the row.
What appears in the channel
Maya opens pull request 42 on relay/web. In #engineering:
- A topic PR #42 · Fix login redirect loop appears, with a message "maya opened PR #42" that shows the branches and labels. On GitLab it is MR !7 · ….
- Reviews, comments and pushes you turned on join that same topic.
- When the pull request is merged, the topic is resolved with the summary "Merged by maya". Closing without merging says "Closed without merging by …".
- If it is reopened, the topic opens again. A late comment on a merged pull request doesn't reopen it.
- Issues work the same way, one topic each.
Releases and failed builds don't belong to one pull request. They go to one topic per repository, relay/web activity:
maya published v1.2.0: Autumn release CI failed on
mainat4e1d2c3
If GitHub delivers the same event twice, it is posted once. Names and titles from outside never become mentions.
Filters
Repositories takes repository paths, separated by commas. * matches anything, upper or lower case.
| You enter | It posts for |
|---|---|
| (empty) | Every repository that sends to this address. |
relay/* | relay/api, relay/web and every other relay repo. |
relay/web | Only that repository. |
relay/api, relay/web | Those two. |
relay/platform/* | GitLab projects in the relay/platform group and below. |
A delivery from other/site posts nothing. Use one connection per channel: to send relay/api to #engineering and relay/site to #marketing, connect twice, each with its own filter and its own webhook on the other side.
Rotate the secret
Do this when the secret leaked or someone who knew it left.
- On the row, choose Rotate secret and confirm.
- Copy the new secret from the sheet.
- Paste it into the webhook on GitHub (Secret) or GitLab (Secret token).
The old secret keeps working for 24 hours, so nothing is lost while you swap it. The row says until when. You can't rotate again until that day has passed. Whoever connected the repository can still rotate it or disconnect it if members lose the right to add apps.
When nothing arrives
- GitHub says the delivery failed with an invalid signature. The secret on GitHub differs from Connectdary's. Rotate and paste the new one. Nothing is posted for a wrong secret.
- Delivery succeeds but nothing is posted. The event isn't ticked in Connectdary, the repository doesn't match the filter, or it's a test event.
- The row says "No deliveries yet". The payload URL is wrong, or GitHub's content type isn't
application/json. - You disconnected it. Deliveries are refused from then on. Delete the webhook on GitHub or GitLab too.
Mobile lists these connections but doesn't set them up.