Add PDK update reusable workflow and Claude Code repo setup#180
Merged
Conversation
Rewrite CLAUDE.md to document the repo as a reusable-workflow library (architecture, conventions, fork-PR security model, linting) and add PreToolUse hooks under .claude/ enforcing project safety rules. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Run `pdk update` against the calling module and open (or refresh) a `pdk_update` PR with the template changes. A fixed branch name means a later run overwrites the existing open PR. The PR title and commit message are "(maint) PDK Update" and the body reports the template URL/ref and pdk version. Includes an example caller and a README entry, and updates the CLAUDE.md action-pinning guidance to prefer major-version tags. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
gavindidrichsen
approved these changes
Jun 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds a new reusable workflow and sets up Claude Code tooling for the repository.
module_pdk_update.yml— new reusable workflowpdk update --forceagainst the calling module.pdk_updatebranch and a PR is opened against the default branch. If there are no changes, no branch or PR is created.(maint) PDK Update; the PR body reports the template URL/ref and the pdk version used.ruby_version(default3.1),runs_on(defaultubuntu-latest),pdk_version(default: latest). Optionaltokensecret — pass a PAT/App token so CI runs on the generated PR (PRs opened with the defaultGITHUB_TOKENdo not trigger further workflows).example/module/pdk_update.ymlcaller (scheduled + manual dispatch) and a README entry.Claude Code repository setup
CLAUDE.mdto document this repo as a library of reusable workflows: architecture, conventions (inputs are a public API, action pinning), the fork-PR security model, and linting..claude/PreToolUsehooks enforcing project safety rules: no PR merge, no commits onmain/master, no push, norm.Additional Context
peter-evans/create-pull-request, which natively only opens a PR when the tree differs from the base, force-updates the fixed branch, and updates an existing open PR — giving the "overwrite the existing PR" behaviour without bespoke branch/commit logic.pdk updaterunsbundle installin a scrubbed environment — bundler'sunbundle_envdeletes allBUNDLE_*vars and pdk forcesBUNDLE_IGNORE_CONFIG=1— so puppetcore gem-source credentials cannot be supplied to it.puppetlabs-firewall, which surfaced the puppetcore limitation above (firewall is a puppetcore module). Happy-path verification against a public module is still pending.Related Issues (if any)
None.
Checklist