Skip to content

React to GitHub events, set up from your AI assistant

Ask for what should happen when an issue is opened, a pull request is merged or a release is published. ClickRuntime gives you the webhook URL, checks GitHub's signature and runs the code.

Your assistantClickRuntime connected
Create a ClickRuntime automation: when a new issue is opened in acme/app, label it bug, feature or question with AI.
I'll add a webhook URL for the repo's issues events, check GitHub's signature, and apply one label per new issue.
Label new issues in acme/appLive
When
Each incoming event
Uses
GitHub
RunsClickRuntime dashboard
  • 08:12✓ Label new issues in acme/app · SucceededLast run08:12 · labelled bug

Can ChatGPT or Claude react to GitHub events?

An assistant can read a repo while you chat, but it can't be notified when an issue is opened. With ClickRuntime connected, it creates an automation with a trigger link that you add as a GitHub webhook. GitHub posts each event there, ClickRuntime checks the X-Hub-Signature-256 header, and the script labels, comments, notifies or updates whatever you asked for.

Why the assistant can’t do this on its own

  • GitHub webhooks need a public HTTPS URL that's always up. Assistants don't have one.
  • The script needs a GitHub token kept outside the chat. ClickRuntime stores it as a secret.
  • Actions workflows can react to events too, but they live in the repo and need YAML. Here you describe the result and it runs across repos without editing any of them.

Set it up from your AI assistant

The same steps work in ChatGPT, Claude, Cursor and any assistant that supports MCP connectors.

  1. Step 1Connect ClickRuntime to your assistantAdd ClickRuntime as a connector (MCP server) in ChatGPT, Claude, Cursor or another MCP client, using https://clickruntime.com/api/mcp. You sign in with Google or email; there is no API key to copy. This is done once per assistant.
  2. Step 2Paste the promptStart a new chat and paste: “Create a ClickRuntime automation: when a new issue is opened in acme/app, read the title and body and add one label: bug, feature or question. Check GitHub's webhook signature.” Change the details (times, channels, addresses) to yours.
  3. Step 3Read the draftThe assistant restates what will happen, asks for anything missing, such as your timezone or which channel to post to, and saves a draft automation. A draft never runs on its own, so nothing happens until you agree.
  4. Step 4Connect accounts and save keysThe assistant asks you to save a fine-grained GitHub token with Issues read and write on the repo as GITHUB_TOKEN in the ClickRuntime dashboard. It can register the webhook for you with that token, or give you the trigger link and a secret to add under the repo's Settings → Webhooks (content type JSON, Issues events).
  5. Step 5Test itGitHub sends a ping when the webhook is added; then open a test issue. The assistant checks the stored event, the signature result and that the label was added.
  6. Step 6Turn it onThe assistant tells you what will run, when, and which services it will contact, then asks your permission to turn it on. From then on it runs on ClickRuntime's servers, and you can close the chat.
  7. Step 7Check it in the ClickRuntime dashboardIncoming events are listed with the GitHub event type, the signature result and the run each started. The run log shows which label was chosen for which issue. Failed runs can be replayed after a fix.
Prompt to copy.txt

“Create a ClickRuntime automation: when a new issue is opened in acme/app, read the title and body and add one label: bug, feature or question. Check GitHub's webhook signature.”

Connector setup for each assistant: ChatGPT, Claude, Claude Code, Cursor, and other assistants.

What the assistant writes

A typical script for this job. Yours matches your pages, accounts and wording, and you can read every version in the ClickRuntime dashboard.

label_new_issues.pyexample
1from clickruntime import on_event, credentials, http, ai, log
2 
3LABELS = ["bug", "feature", "question"]
4 
5@on_event
6def handle(event):
7if not event.is_verified:
8return {"skipped": "bad signature"}
9if event.header("X-GitHub-Event") != "issues" or event.json.get("action") != "opened":
10return {"skipped": "not a new issue"}
11 
12issue = event.json["issue"]
13repo = event.json["repository"]["full_name"]
14text = f"{issue['title']}\n\n{(issue.get('body') or '')[:2000]}"
15try:
16label = ai.generate(text, system="Answer with one word: bug, feature or question.", max_output_tokens=5).text.strip().lower()
17except ai.AIError:
18label = "bug" if "error" in text.lower() or "crash" in text.lower() else "question"
19if label not in LABELS:
20label = "question"
21 
22token = credentials.secret("GITHUB_TOKEN")
23http.post(
24f"https://api.github.com/repos/{repo}/issues/{issue['number']}/labels",
25headers={"Authorization": "Bearer " + token, "Accept": "application/vnd.github+json"},
26json={"labels": [label]},
27).raise_for_status()
28log.info("Labelled", {"issue": issue["number"], "label": label})
29return {"issue": issue["number"], "label": label}
  • The trigger link's GitHub signature check runs before the script, so `event.is_verified` is true only for genuine GitHub deliveries.
  • AI picks the label from the issue text. If AI is unavailable, a keyword rule keeps the run working.
  • The same pattern works for pull_request, release, push or star events: the assistant changes the event filter and what the script does.

Trigger link, not a schedule

Use the trigger link for anything that should happen right after a GitHub event.

Use a schedule for checks GitHub doesn't send events for, such as pull requests with no review for three days.

Limits

  • Each delivery is one run; subscribe the webhook only to the events you need.
  • The GitHub token's permissions limit what the script can do. Use a fine-grained token scoped to the repos involved.
  • The AI reads text only; images in issues are not sent.

Troubleshooting

GitHub shows the ping failed.

Check the payload URL is the trigger link and the content type is application/json. The ClickRuntime dashboard lists every delivery that arrived.

Labels aren't added (403 or 404).

The token can't write issues on that repo. Create a fine-grained token with Issues read and write on it and save it again as GITHUB_TOKEN.

Signature checks fail.

The secret in GitHub's webhook settings differs from the one in the trigger link settings. Set the same value in both and redeliver from GitHub.

What you can add next

The first version is rarely the last. Because the automation is a Python script with memory, AI and any API available, you grow it by asking your assistant for the change. Each change is a new version, and a failed deploy never replaces the working one.

  • Built-in AI

    Comment asking for missing steps to reproduce on bug reports

    “Change my issue labelling automation so that when a bug report has no steps to reproduce, it comments asking for them politely.”
  • Any app or API

    Post new bugs to #engineering in Slack

    “Add to my issue labelling automation: when an issue is labelled bug, post its title and link to #engineering in Slack.”
  • Any app or API

    Copy bugs to Linear with the same title and link

    “Add to my issue labelling automation: create a Linear issue in the Platform team for each new bug, linking back to GitHub.”
  • Memory between runs

    Spot repeat reports by remembering recent issue titles

    “Change my issue labelling automation so it remembers the last 200 issue titles and comments with a link when a new issue looks like a repeat.”
  • Schedules

    A Monday digest of last week's issues by label

    “Add to my issue labelling automation: every Monday at 9, email me how many issues were opened last week per label, with links to the bugs.”
  • Multi-step logic

    Handle pull requests too: welcome first-time contributors

    “Change my issue labelling automation so it also handles new pull requests, and comments a thank-you on a contributor's first pull request.”
  • Trigger links

    Listen to several repos through the same trigger link

    “Change my issue labelling automation so it works for acme/app, acme/api and acme/docs, using a different label set for docs.”

Can ChatGPT respond to GitHub webhooks?

With ClickRuntime connected, yes. ChatGPT sets up the automation and its trigger link; GitHub sends events there and the script runs on ClickRuntime's servers.

How is this different from GitHub Actions?

Actions run inside one repo from YAML files. A ClickRuntime automation is described in chat, can span repos and other apps, keeps state between runs and has built-in AI. For CI and builds, Actions is the better fit.

Is GitHub's signature checked?

Yes. Set the webhook secret in the trigger link's signature settings and only deliveries signed with it reach the script.

Can it register the webhook for me?

Yes, when you've saved a GitHub token with permission to manage the repo's webhooks. Otherwise the assistant gives you the URL and secret to add yourself.

Does it work with GitHub organisations?

Yes. An organisation webhook sends events from all its repos to one trigger link, and the script reads the repository from each event.

Other use cases

Set up your first automation in ChatGPT or Claude

Free plan. No credit card.

Server URLhttps://clickruntime.com/api/mcp