Repository navigation
Description
Fix generated Dependabot ignore for gh-aw action subpaths
Summary
gh aw compile generates a Dependabot ignore rule for github/gh-aw-actions, but Dependabot names each reusable action by its full subpath. As a result, the generated rule does not suppress updates for actions such as setup and setup-cli.
Current behavior
The compiler inserts:
ignore:
- dependency-name: "github/gh-aw-actions" # Managed by gh aw compile. Version-locked to the gh-aw compiler; do not bump.Dependabot identifies the actual dependencies as:
github/gh-aw-actions/setupgithub/gh-aw-actions/setup-cli
The exact repository-name rule matches neither dependency.
Reproduction and evidence
- Configure Dependabot for the
github-actionsecosystem. - Run
gh aw compileso it adds the managed ignore rule. - Commit compiled workflows that use
github/gh-aw-actions/setuporgithub/gh-aw-actions/setup-cli. - Dependabot still opens action-pin update pull requests.
Observed examples:
joshjohanning/github-changelog-weekly#67, dependencygithub/gh-aw-actions/setupjoshjohanning/github-changelog-weekly#68, dependencygithub/gh-aw-actions/setup-cli
Changing the managed rule to the wildcard below fixed the behavior:
ignore:
- dependency-name: "github/gh-aw-actions/*" # Managed by gh aw compile. Version-locked to the gh-aw compiler; do not bump.After joshjohanning/github-changelog-weekly#69 applied the wildcard, Dependabot automatically closed both affected pull requests.
Expected behavior
The compiler-generated rule should ignore every action beneath the effective actions repository, including setup, setup-cli, and other action subpaths. Recompilation should also migrate the old compiler-managed exact rule rather than retain both rules.
Agentic plan
- In
pkg/workflow/dependabot_reconcile.go, construct the managed Dependabot pattern asc.effectiveActionsRepo() + "/*". - Update reconciliation so an existing exact rule is recognized as the previous compiler-managed form when it carries the managed inline comment. Replace it with the wildcard rule instead of appending a duplicate.
- Preserve user-authored exact rules that do not carry the compiler-managed comment.
- Keep custom action repository support by deriving the wildcard from
effectiveActionsRepo()rather than hard-codinggithub/gh-aw-actions/*. - Update
pkg/workflow/dependabot_test.goto cover:- adding the wildcard rule to a GitHub Actions update block;
- preserving user-defined ignore entries;
- migrating the old compiler-managed exact rule to the wildcard;
- not duplicating an existing wildcard rule;
- generating the corresponding wildcard for an
--actions-repo owner/repooverride; - preserving an unmarked user-authored exact rule.
- Update the documented examples in:
docs/src/content/docs/reference/dependabot.mddocs/src/content/docs/reference/faq.mddocs/src/content/docs/reference/compilation-process.md
- Run the targeted Dependabot reconciliation tests and the repository's standard Go formatting and validation checks.
Acceptance criteria
gh aw compilewritesdependency-name: "github/gh-aw-actions/*"for the default actions repository.- Existing compiler-managed
github/gh-aw-actionsentries migrate cleanly to the wildcard form. - No duplicate managed ignore entries are introduced.
- User-defined ignore entries remain unchanged.
- Custom actions repositories produce
<owner>/<repo>/*. - Documentation consistently shows the working wildcard rule.
Activity