fix: add actionlint coverage for scaffold workflow templates - #1030
Merged
Conversation
The pre-commit actionlint hook only checks .github/workflows/ in the
repo root, so scaffold templates under internal/scaffold/fullsend-repo/
were never linted. This allowed secrets: {} to slip into the
shim-workflow-call template — actionlint flags empty secrets sections
as a syntax error when the called workflow declares no secrets.
Add hack/lint-scaffold-workflows which copies scaffold workflows into a
temp git repo (with __ORG__ placeholder substitution) and runs
actionlint. Wire it into pre-commit with the same file trigger pattern
as lint-workflow-size.
Also remove the now-invalid secrets: {} from the shim template and its
corresponding test assertion.
Assisted-by: Claude claude-opus-4-6 <noreply@anthropic.com>
Signed-off-by: Ralph Bean <rbean@redhat.com>
Site previewPreview: https://8233f28b-site.fullsend-ai.workers.dev Commit: |
CI installs actionlint via pre-commit's isolated Go environment, so it is not on the system PATH when our language: script hook runs. Fall back to go run if actionlint is not found. Assisted-by: Claude claude-opus-4-6 <noreply@anthropic.com> Signed-off-by: Ralph Bean <rbean@redhat.com>
rh-hemartin
requested changes
May 18, 2026
Member
There was a problem hiding this comment.
Please, make use of pre-commit you can specify which files are passed with files:
- repo: https://github.com/rhysd/actionlint
rev: v1.7.11
hooks:
- id: actionlint
files: |
(?x)^(
\.github/workflows/
|internal/scaffold/fullsend-repo/.github/workflows
|internal/scaffold/fullsend-repo/templates
)
args: ["-ignore", 'unexpected key "queue" for "concurrency"']
Replace the 83-line hack/lint-scaffold-workflows script with a files pattern override on the existing actionlint pre-commit hook. actionlint handles __ORG__ placeholders and non-standard paths fine when given files directly, so the tempdir-copy-and-substitute approach was unnecessary. Suggested-by: Hector Martin <rh-hemartin@users.noreply.github.com> Assisted-by: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Ralph Bean <rbean@redhat.com>
ReviewFindingsHigh
Low
Previous runReviewFindingsMedium
Low
|
rh-hemartin
approved these changes
May 26, 2026
4 tasks
5 tasks
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
hack/lint-scaffold-workflowsto run actionlint on scaffold templates (with__ORG__placeholder substitution) — the existing pre-commit actionlint hook only covers.github/workflows/in the repo root.pre-commit-config.yamlwith the same file trigger aslint-workflow-sizesecrets: {}fromshim-workflow-call.yaml— actionlint flags empty secrets sections when the called workflow declares none (fixes the lint failure on chore: update fullsend shim workflow #1028)scaffold_test.goContext
secrets: {}was introduced in #503 as an explicit "pass no secrets" when migrating from PAT to OIDC, then carried forward in #792 when per-stage jobs were collapsed into a single dispatch job. The intent was correct but actionlint considers it a syntax error. Omittingsecrets:entirely has the same effect.Test plan
hack/lint-scaffold-workflowspasses after removingsecrets: {}pre-commit run lint-scaffold-workflows --all-filespasses🤖 Generated with Claude Code