GitHub Issues
Open an issue in your repository when a run fails, times out or is aborted.
Opens an issue in one of your GitHub repositories when a run of an Actor fails, times out or is aborted. It never opens an issue for a succeeded run. It uses the GitHub connection under Settings → Connections, the same one as the GitHub results export. With the Scrape.ly GitHub App, the repository must be one you selected when installing the app.
Open an issue when a run fails
Set it up with the Open a GitHub issue when a run fails recipe in New automation, or add GitHub issue as a delivery in the automation editor.
- Click New automation (in Automations, or on an Actor's Automations tab) and pick Open a GitHub issue when a run fails, or click Or create manually and pick Create GitHub issue.
- Pick the Repository.
- Optionally write a message. It is shown at the top of the issue.
- Use Save and send test. The test opens a real issue titled
Scrape.ly test issueand closes it straight away.
No duplicates: the issue title is the same for every run of that Actor (or task) with that outcome: Scrape.ly: My Actor failed, Scrape.ly: My Actor timed out or Scrape.ly: My Actor was aborted. If an issue with that title is still open, a run that fails again adds a comment to it instead of opening a new issue. Close the issue once it's fixed; the next failure opens a fresh one.
Issue body: the status, duration, results count, cost and run ID, the run's status message in a code block, and links to View run, Open dataset and Manage this notification. Your message, if you wrote one, comes first. It can use the same variables as Slack messages: {{actorName}}, {{status}}, {{itemCount}}, {{duration}}, {{cost}}, {{runUrl}}, {{datasetUrl}}, {{taskName}} and {{runId}}. Names from the run are shown as code, so they can't @mention people.
Permission: the Scrape.ly GitHub App needs the Issues permission. If you installed the app before this integration existed, GitHub asks you to approve it. Until you do, the delivery history says so; your GitHub results export keeps working meanwhile. If you connected through the older GitHub connection, there is nothing to approve.
Limits: each GitHub Issues integration opens at most 30 issues an hour, and each issue counts toward the account's daily message limit (5,000 a day, shared with Slack, Discord, Teams and Telegram messages). If GitHub isn't connected, the repository isn't selected for the app, the Issues permission isn't approved yet, issues are turned off in the repository, or the connection expired, the delivery history on the automation's page says so.
In the automation editor
GitHub issue is also a delivery in the automation editor. It opens an issue only when the automation run fails, and is skipped when the run succeeds. The title is Scrape.ly: automation <name> failed, and the body lists each step's status and error.
API
A webhook with a githubissue notification. Only ACTOR.RUN.FAILED, ACTOR.RUN.TIMED_OUT and ACTOR.RUN.ABORTED are allowed.
curl -X POST https://api.scrape.ly/v2/webhooks \
-H "Authorization: Bearer $SCRAPELY_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"eventTypes": ["ACTOR.RUN.FAILED", "ACTOR.RUN.TIMED_OUT", "ACTOR.RUN.ABORTED"],
"condition": { "actorId": "YOUR_ACTOR_ID" },
"description": "Open an issue when the scraper fails",
"notification": {
"channel": "githubissue",
"repo": "your-org/your-repo",
"message": "{{actorName}} needs a look: {{runUrl}}"
}
}'message is optional. Responses carry notification.githubIssueSettings with the repo. In an automation, use a delivery with "channel": "githubIssue" and "repo".