Skip to content

Add gardener workflows - #16

Closed
byrichardpowell wants to merge 1 commit into
mainfrom
add-gardener-workflows
Closed

Add gardener workflows#16
byrichardpowell wants to merge 1 commit into
mainfrom
add-gardener-workflows

Conversation

@byrichardpowell

Copy link
Copy Markdown
Collaborator

Summary

Adds the gardener auto-label + Slack notification workflows from shopify-app-js:

  • 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 GITHUB_TOKEN write access and Actions secrets; the workflow_run follow-up runs in the default-branch context with full permissions regardless of the upstream actor.

No investigate workflow in this repo — just the notify pair.

Setup required (post-merge)

  • Create label: devtools-gardener
  • Add secret: SLACK_GARDENER_BOT_TOKEN
  • Add variable: GARDENER_SLACK_CHANNEL_ID

Test plan

  • Create the devtools-gardener label
  • Set secret and variable
  • Open a throwaway test issue — confirm devtools-gardener is applied and Slack gets a post

🤖 Generated with Claude Code

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>
@byrichardpowell
byrichardpowell requested a review from a team as a code owner April 20, 2026 16:44
@byrichardpowell

Copy link
Copy Markdown
Collaborator Author

Superseded by https://github.com/shop/world/pull/629221 — these workflows are authored in the shop/world monorepo under areas/apps/shopify-app-packages/packages/php/.github/workflows/ and synced here, so the PR belongs upstream.

@byrichardpowell
byrichardpowell deleted the add-gardener-workflows branch April 20, 2026 18:10
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