From 7ad00a41306203b788646bf222093ab700a77d46 Mon Sep 17 00:00:00 2001 From: OpenHands Bot Date: Thu, 28 May 2026 05:46:58 +0000 Subject: [PATCH] feat(automations): add Slack+GitHub+Linear daily organization catalog entry --- ...lack-github-linear-daily-organization.json | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 automations/catalog/slack-github-linear-daily-organization.json diff --git a/automations/catalog/slack-github-linear-daily-organization.json b/automations/catalog/slack-github-linear-daily-organization.json new file mode 100644 index 0000000..7fa6068 --- /dev/null +++ b/automations/catalog/slack-github-linear-daily-organization.json @@ -0,0 +1,26 @@ +{ + "id": "slack-github-linear-daily-organization", + "name": "Slack + GitHub + Linear daily organization", + "category": "Personal productivity", + "description": "Every morning, reconcile your open GitHub PRs with Linear issues, align active work, surface relevant Slack context, and send yourself a concise daily plan.", + "requiredIntegrationIds": [ + "slack", + "github", + "linear" + ], + "popularityRank": 88, + "estimatedSetupMinutes": 10, + "suggestedTrigger": { + "type": "cron", + "schedule": "0 7 * * *", + "timezone": "[IANA_TIMEZONE]" + }, + "placeholders": [ + "[GITHUB_USERNAME]", + "[LINEAR_ASSIGNEE_QUERY]", + "[GITHUB_ORG_OR_REPO_SCOPE]", + "[SLACK_RECIPIENT_QUERY]", + "[IANA_TIMEZONE]" + ], + "prompt": "You are running a daily GitHub/Linear/Slack organization automation.\n\nSchedule context:\n- This automation runs every morning at 7:00 AM in [IANA_TIMEZONE].\n- Treat \"today\" and \"past 1-3 days\" in [IANA_TIMEZONE].\n\nImportant safety and access rules:\n1. First, verify that you have working access to GitHub, Linear, and Slack using the available official tools/APIs. A minimal successful read for each service is enough.\n2. If any one of GitHub, Linear, or Slack is unavailable, missing credentials, or returns an authorization error, stop immediately. Do not make partial updates. If Slack is available, send the configured Slack recipient a short message saying which service was unavailable and that no changes were made; otherwise finish with that error.\n3. Prefer official APIs/MCP tools over browser interaction. Do not browse web UIs unless no API/tool path exists.\n4. When posting to Slack or creating/updating human-readable external-service content, include a short disclosure that the content was generated by an AI agent (OpenHands) on behalf of the user.\n\nIdentity and scope:\n- GitHub user to inspect: [GITHUB_USERNAME].\n- GitHub issue scope: [GITHUB_ORG_OR_REPO_SCOPE]. Examples: visible repositories in one or more organizations, or an explicit allowlist of repositories.\n- Linear assignee: resolve by searching for [LINEAR_ASSIGNEE_QUERY]. Do not guess an ID if multiple plausible matches exist.\n- Slack recipient for the final daily plan: resolve by searching for [SLACK_RECIPIENT_QUERY], or use the current authenticated Slack user if that is the intended recipient.\n\nTask 1 \u2014 Ensure the user's open PRs are associated with GitHub issues:\n1. Find all open pull requests authored by [GITHUB_USERNAME] across the configured GitHub scope.\n2. For each PR, determine whether it is already associated with a GitHub issue. Count an association if the PR body has a clear issue reference or closing keyword (for example, #123, owner/repo#123, fixes, closes, or resolves), or if GitHub's API exposes linked/closing issues.\n3. If a PR has no associated issue:\n a. Search open issues in the same repository for an obvious matching issue using the PR title, branch name, and summary. Only treat an issue as obvious if the title/topic clearly matches; do not force weak matches.\n b. If an obvious open issue exists, use that issue.\n c. If none exists, create a new GitHub issue in the same repository summarizing the PR's purpose and linking back to the PR. Include an AI disclosure in the issue body.\n d. Update the PR description to include a non-closing association such as \"Related issue: #123\" or \"Related issue: owner/repo#123\" for cross-repo references. Preserve the existing PR description. Avoid \"Fixes\", \"Closes\", or \"Resolves\" unless the PR already used a closing keyword or the issue clearly should close when the PR merges.\n\nTask 2 \u2014 Ensure GitHub issues are represented in Linear:\n1. Find all open GitHub issues, excluding PRs, in the configured GitHub issue scope.\n2. For each issue, verify that it has a corresponding Linear issue. Match by GitHub issue URL first, then by exact repository/name/number and title if needed.\n3. If no Linear issue exists, create one in the appropriate Linear team/project using the GitHub issue title, URL, repository, labels, and a concise summary. Include an AI disclosure in the Linear issue description. Choose an appropriate priority for newly created Linear issues using this rubric:\n - Urgent: security, production outage, data loss, severe user-blocking regression, active incident.\n - High: important bug/regression, release blocker, broadly affecting users, high-value requested work.\n - Medium: normal feature/bug/task with moderate impact.\n - Low: cleanup, docs, nice-to-have, unclear/low-impact backlog.\n - No priority only if there is insufficient information.\n4. For every GitHub issue that has one or more open PRs associated with it, ensure the corresponding Linear issue is assigned to the configured Linear assignee and has a started/In Progress status. If the Linear issue is already completed or canceled, do not reopen it; mention this in the final report instead.\n5. Do not downgrade or otherwise change priorities of existing Linear issues merely because they seem wrong. If an existing priority is missing and the issue is actively in progress due to an open PR, you may set a reasonable priority. If a priority seems unclear or incorrect, flag it in the final Slack report rather than changing it.\n\nTask 3 \u2014 Check Slack context for active Linear issues:\n1. Inspect active Linear issues assigned to the configured assignee and not completed/canceled, especially urgent, high-priority, and in-progress issues.\n2. Search Slack public content and, if available in the tool configuration, private/DM-accessible content for the last 1-3 days for requests, mentions, or discussions related to those Linear issue identifiers, issue titles, linked GitHub issues/PRs, and relevant repository names.\n3. Summarize actionable Slack requests/discussions. Include links to Slack messages/threads when the Slack tooling provides them.\n4. Do not expose private Slack content beyond what is necessary for the configured recipient's own daily plan.\n\nTask 4 \u2014 Produce and send the daily plan:\n1. Review all active Linear issues assigned to the configured assignee, prioritizing Urgent then High then Medium then Low, while also considering Slack requests, open PR status, blockers, and issue age.\n2. Create a concise plan for what the recipient should work on today, focusing on the most urgent and important issues first.\n3. Include:\n - Top 3-5 recommended focus items with Linear identifiers/titles and links.\n - Any GitHub PR issue-association work performed.\n - Any GitHub issues imported into Linear.\n - Any Linear issues moved to In Progress or assigned to the configured assignee because an open PR exists.\n - Any Slack requests/discussions from the past 1-3 days relevant to active Linear issues.\n - Any issue priorities that are unclear or appear incorrect; explicitly say you did not change those priorities.\n - Any access or matching limitations.\n4. Send the report to the configured Slack recipient as a DM if possible. If DM is not possible, use the best available Slack destination for that recipient. Include the AI disclosure in the message.\n5. Finish with a short execution summary including counts of PRs checked, PRs updated, GitHub issues created, GitHub issues imported to Linear, Linear issues updated, and Slack discussions found.\n\nBe careful and conservative: avoid duplicate GitHub issues, duplicate Linear issues, weak associations, or broad destructive changes." +} \ No newline at end of file