Skip to content

Add gardener workflows#234

Open
byrichardpowell wants to merge 2 commits into
mainfrom
add-gardener-workflows
Open

Add gardener workflows#234
byrichardpowell wants to merge 2 commits into
mainfrom
add-gardener-workflows

Conversation

@byrichardpowell
Copy link
Copy Markdown
Contributor

Summary

Adds the gardener tooling from shopify-app-js to this template repo:

  1. gardener-notify-event.yml + gardener-notify-slack.yml — auto-label new issues/PRs with devtools-gardener and post a summary to Slack. Split into two workflows so Dependabot-opened PRs (which lose GITHUB_TOKEN write access and Actions secrets) still get labeled and notified via the workflow_run follow-up.
  2. gardener-investigate-issue.yml — runs anthropics/claude-code-action on issues labeled devtools-investigate-for-gardener. Posts a starter Slack message, runs the investigation against a structured JSON schema, writes the report to the job summary, and threads the Summary section back to Slack.
  3. .claude/skills/investigating-github-issues/ — skill invoked by the workflow, tailored for this template:
    • Scope is constrained to app/, extensions/, prisma/, public/, and root config (not a monorepo, so no packages/ mention).
    • Calls out that many issues here are actually upstream bugs in @shopify/shopify-app-react-router and should be redirected to Shopify/shopify-app-js.
    • Inspects pinned versions in package.json instead of a published library version.

Setup required (post-merge)

  • Create labels: devtools-gardener, devtools-investigate-for-gardener
  • Add secrets: ANTHROPIC_API_KEY, SLACK_GARDENER_BOT_TOKEN (+ optional ANTHROPIC_BASE_URL)
  • Add variable: GARDENER_SLACK_CHANNEL_ID

Test plan

  • Create the devtools-gardener and devtools-investigate-for-gardener labels
  • Set secrets and variables
  • Open a throwaway test issue — confirm devtools-gardener is applied and Slack gets a post
  • Manually apply devtools-investigate-for-gardener to a real issue — confirm the investigation runs and reports back

🤖 Generated with Claude Code

byrichardpowell and others added 2 commits April 20, 2026 16:27
Adds two workflows that react to new issues and PRs:

- `gardener-notify-event.yml` captures the triggering payload as an
  artifact on issue/PR open and on `devtools-gardener` label events.
  Uses `pull_request_target` so Dependabot- and fork-opened PRs still
  produce an artifact.
- `gardener-notify-slack.yml` runs on `workflow_run` completion,
  downloads the artifact, applies the `devtools-gardener` label on
  first open, and posts a summary to Slack.

Split into two workflows because Dependabot-triggered workflows lose
write permissions and secret access; the `workflow_run` follow-up runs
in the default-branch context with full permissions regardless of the
upstream actor.

Requires a `SLACK_GARDENER_BOT_TOKEN` secret and
`GARDENER_SLACK_CHANNEL_ID` variable, plus a `devtools-gardener` label.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Adds a workflow that runs `anthropics/claude-code-action` to investigate
GitHub issues in this template repository, plus the skill it invokes.

- `.github/workflows/gardener-investigate-issue.yml` triggers on the
  `devtools-investigate-for-gardener` label or `workflow_dispatch`.
  Posts a starter message to Slack, runs the investigation in a
  structured-output JSON schema, writes the report to the job summary,
  and posts a threaded follow-up with the Summary section to Slack.
- `.claude/skills/investigating-github-issues/` contains the skill and
  a report template tailored for this template (single React Router
  app, not a monorepo — scopes edits to `app/`, `extensions/`,
  `prisma/`, `public/`, and root config files; flags library bugs that
  belong in `Shopify/shopify-app-js`).
- `.claude/skills/shared/references/version-maintenance-policy.md` is
  the shared policy referenced by the skill.

Requires `ANTHROPIC_API_KEY` and `SLACK_GARDENER_BOT_TOKEN` secrets,
`GARDENER_SLACK_CHANNEL_ID` variable, and a
`devtools-investigate-for-gardener` label.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@byrichardpowell byrichardpowell force-pushed the add-gardener-workflows branch from d10987c to 8c403f7 Compare April 20, 2026 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant