Skip to content

Add gardener workflows#1445

Merged
byrichardpowell merged 2 commits intomainfrom
add-gardener-workflows
Apr 20, 2026
Merged

Add gardener workflows#1445
byrichardpowell merged 2 commits intomainfrom
add-gardener-workflows

Conversation

@byrichardpowell
Copy link
Copy Markdown
Contributor

Summary

Adds the gardener tooling from shopify-app-js to this Ruby API client 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 gem:
    • Scope is constrained to lib/, test/, docs/, CHANGELOG.md, and shopify_api.gemspec.
    • Excludes bundle/gem/rake/ruby from allowed-tools to block arbitrary execution from prompt injection.
    • Distinguishes the two version axes that matter here: the shopify_api gem major, and the Shopify API version (e.g. 2025-01) — many "bug" reports are API-version-dictated behavior, not gem bugs.
    • References BREAKING_CHANGES_FOR_V*.md and REST_RESOURCES.md during triage.
    • Path A (fix) additionally requires a Minitest test and a CHANGELOG.md entry under ## Unreleased.
    • Calls out that Rails-integration issues belong in Shopify/shopify_app.

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 12:37
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 gem, 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 gem (Ruby API client; scopes
  edits to `lib/`, `test/`, `docs/`, `CHANGELOG.md`, and
  `shopify_api.gemspec`; distinguishes gem-major version from Shopify
  API version; flags Rails-integration issues that belong in
  `Shopify/shopify_app`).
- `.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 7913f64 to f78d3c6 Compare April 20, 2026 19:52
@byrichardpowell byrichardpowell merged commit 973f753 into main Apr 20, 2026
7 checks passed
@byrichardpowell byrichardpowell deleted the add-gardener-workflows branch 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.

2 participants