Snapshot Pages to the Wayback Machine After Deploy
Triggers a Wayback Machine save of a URL, verifies the snapshot landed, and alerts on failure.
Monitor GitHub repository branch sprawl and stale Git branches with Kestra. Query GitHub API, open cleanup issues, and alert teams on Slack.
Large engineering teams create hundreds of feature, bugfix, and experimental branches across primary repositories. Over time, abandoned branches that were never merged or deleted accumulate, creating clutter in developer Git clones, triggering unintended CI workflow runs, and complicating commit history searches. This blueprint queries the GitHub REST API weekly for unprotected branches, compares commit dates against a configurable inactivity threshold (e.g. 90 days), logs an automated GitHub cleanup audit ticket, and notifies engineering teams on Slack.
weekly_branch_hygiene_check (io.kestra.plugin.core.trigger.Schedule) initiates the audit every Monday at 09:00 UTC (shipped disabled for safe verification).probe_stale_branches (io.kestra.plugin.scripts.python.Script) interrogates the GitHub REST API (GET /repos/{owner}/{repo}/branches), checks commit timestamps on unprotected branches, and filters for branches inactive beyond stale_days_threshold.branch_on_stale_branches (io.kestra.plugin.core.flow.If) evaluates whether any stale branches were discovered (has_stale == true):then: Automatically files a GitHub tracking issue via create_branch_hygiene_issue (io.kestra.plugin.github.issues.Create) and alerts the Slack channel via alert_devops_slack (io.kestra.plugin.slack.notifications.SlackIncomingWebhook).else: Emits an informational log entry (log_branches_clean) confirming clean branch hygiene.log_audit_complete (io.kestra.plugin.core.log.Log) records the audit outcome.errors block alerts Slack if GitHub API limits are reached or tokens expire.Kestra coordinates external API polling, date arithmetic, conditional issue creation, and chat alerting inside a single declarative workflow. It manages personal access tokens securely, provides complete execution history, and eliminates the need for separate standalone monitoring daemons.
repo permissions.GITHUB_TOKEN: GitHub token used to query repository branches and open tracking issues.SLACK_WEBHOOK: Incoming Webhook URL for alerts.repository (STRING, default my-org/primary-backend): Target GitHub repository (owner/repo) to audit.stale_days_threshold (INT, default 90): Number of inactive days before a branch is classified stale.target_issue_repository (STRING, default my-org/primary-backend): Repository where the governance issue will be created.outputs.probe_stale_branches.vars.total_branches: Total number of unprotected branches audited.outputs.probe_stale_branches.vars.stale_count: Count of branches exceeding inactivity threshold.outputs.probe_stale_branches.vars.stale_branches: List of stale branch objects (name, last_commit, author).GITHUB_TOKEN and SLACK_WEBHOOK in your Kestra namespace.repository to match an active development codebase.weekly_branch_hygiene_check trigger for continuous Git hygiene monitoring.DELETE /repos/{owner}/{repo}/git/refs/heads/{branch}) gated behind an interactive approval task.io.kestra.plugin.core.flow.ForEach.