New to Kestra?
Use blueprints to kickstart your first workflows.
Triage Dependabot PRs with Kestra. Flag semver-major bumps and GitHub Actions workflow changes, alert Slack, keep minor and patch updates quiet.
Dependabot opens a pull request for every update. Most are patch and minor bumps that CI covers. The few that need a human (a new major version, or a change to your GitHub Actions workflows) get lost among them, and a Slack ping on every PR only adds noise.
This flow runs on every pull request event and alerts Slack only for the Dependabot PRs that need review. It does not guess from the title. Dependabot writes an updated-dependencies block into each commit message with update-type: version-update:semver-major|minor|patch for every dependency, including grouped updates. The flow reads that block, the same metadata the dependabot/fetch-metadata action uses.
It needs no script container. Two REST calls and a few jq expressions do the work.
github_pull_request (io.kestra.plugin.core.trigger.Webhook) receives GitHub pull_request events. log_event records the action, author and PR. Webhook pings and other events are handled too.is_dependabot_pr (io.kestra.plugin.core.flow.If) continues only when the PR author is dependabot[bot] and the action is opened, reopened or synchronize. Anything else goes to log_ignored.list_commits and list_files (io.kestra.plugin.core.http.Request) read the PR commits and changed files from the GitHub REST API.classify (io.kestra.plugin.core.output.OutputValues) extracts the dependency names, detects any semver-major update and lists changed files under .github/workflows/.needs_review (io.kestra.plugin.core.flow.If) checks the verdict:notify_slack (io.kestra.plugin.slack.notifications.SlackIncomingWebhook) posts the PR link, dependencies, the major flag and the workflow files. When post_pr_comment is true, comment_on_pr (io.kestra.plugin.github.issues.Comment) also posts a triage table on the PR. Its updateTag keeps a single comment that is edited in place when Dependabot rebases.log_routine_update logs the update and nothing is sent.Webhook executions use the defaults. Change them in the flow, or with the trigger inputs property.
post_pr_comment (BOOL, default false): also post a triage comment on flagged PRs.flag_workflow_changes (BOOL, default true): treat any change under .github/workflows/ as needing review, even for a minor bump.https://<kestra-host>/api/v1/main/executions/webhook/company.team/dependabot-pr-triage-slack/<key>, content type application/json, event "Pull requests".GITHUB_TOKEN: token with read access to the repository's pull requests (fine-grained: "Pull requests: Read"). With post_pr_comment: true it also needs "Pull requests: Read and write" (or "Issues: write").SLACK_WEBHOOK_URL: the Slack incoming webhook URL.In the open-source edition, secrets are set as base64-encoded SECRET_<NAME> environment variables. See https://kestra.io/docs/concepts/secret
GITHUB_TOKEN and SLACK_WEBHOOK_URL secrets.key with a long random value and save the flow.log_ignored.pull_request event from the webhook's "Recent Deliveries" tab.log_routine_update log.outputs.classify.values.dependencies: dependency names from the Dependabot metadata, for example express.outputs.classify.values.major: true when any dependency has a semver-major update.outputs.classify.values.workflow_files: changed files under .github/workflows/, comma-separated.outputs.classify.values.needs_review: the verdict the needs_review branch uses.outputs.comment_on_pr.commentUrl: link to the triage comment, when posted.pull_request.user.login. If you use Dependabot through a GitHub App with another name, change dependabot[bot] in is_dependabot_pr.list_files reads the first 100 files. That covers almost every Dependabot PR. Add pagination for very large grouped updates.curl -X POST -H 'Content-Type: application/json' -d @payload.json <webhook-url>.needs-review label with another io.kestra.plugin.core.http.Request call to POST /repos/{owner}/{repo}/issues/{number}/labels.else branch.Switch on trigger.body.repository.full_name.