Conversation
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/24535202-772c-48b3-9cff-bd34ad3e1806 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/24535202-772c-48b3-9cff-bd34ad3e1806 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/24535202-772c-48b3-9cff-bd34ad3e1806 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/24535202-772c-48b3-9cff-bd34ad3e1806 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/24535202-772c-48b3-9cff-bd34ad3e1806 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/24535202-772c-48b3-9cff-bd34ad3e1806 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/24535202-772c-48b3-9cff-bd34ad3e1806 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
gh aw lint for lock-file-only actionlint checks
There was a problem hiding this comment.
Pull request overview
Adds a new fast-path CLI command to lint committed .lock.yml workflows using actionlint only, without recompiling Markdown workflows or running other scanners.
Changes:
- Introduces
gh aw lintto discover and lint*.lock.ymlfiles from a default workflows directory, an explicit directory, or explicit file paths. - Extends the actionlint runner to support toggling shellcheck/pyflakes integrations and passing ignore patterns.
- Adds unit tests for lock-file resolution and integration-status messaging, and documents the new command in CLI docs.
Show a summary per file
| File | Description |
|---|---|
| pkg/cli/lint_command.go | New lint cobra command; resolves lock files and runs actionlint with default ignore patterns and integrations disabled by default. |
| pkg/cli/lint_command_test.go | Unit tests for the new command wiring and lock-file resolution behavior. |
| pkg/cli/actionlint.go | Adds actionlint run options (integrations + ignore patterns) and updates user-facing execution messaging. |
| pkg/cli/actionlint_test.go | Adds test coverage for integration-status string generation. |
| docs/src/content/docs/setup/cli.md | Documents gh aw lint usage, defaults, and flags. |
| cmd/gh-aw/main.go | Registers the new lint command under the “development” command group. |
Copilot's findings
Tip
Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comments suppressed due to low confidence (1)
pkg/cli/actionlint.go:298
- In verbose mode, the "Run actionlint directly" message prints a docker command that does not reflect the actual invocation when options are set (e.g., it omits -shellcheck= / -pyflakes= disabling flags and any -ignore patterns). This can mislead users trying to reproduce lint results locally. Consider building this string from the same dockerArgs/options used for execution so it stays in sync.
// In verbose mode, also show the command that users can run directly
if verbose {
dockerCmd := fmt.Sprintf("docker run --rm -v \"%s:/workdir\" -w /workdir rhysd/actionlint:latest -format '{{json .}}' %s",
gitRoot, strings.Join(relPaths, " "))
fmt.Fprintf(os.Stderr, "%s\n", console.FormatInfoMessage("Run actionlint directly: "+dockerCmd))
}
- Files reviewed: 6/6 changed files
- Comments generated: 1
| return "without pyflakes" | ||
| case includePyflakes: | ||
| return "without shellcheck" |
|
@copilot review all comments |
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/01d9ac32-b5da-428e-85de-82ff4ae4f07a Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Reviewed all comments and addressed the actionable feedback on integration-status wording in f89db3f. The message now uses unambiguous text: "with shellcheck only" / "with pyflakes only", with tests updated accordingly. Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot add a makefile target to run lint and write up in the agent_progress lint |
|
@copilot make sure docker command accept a context for clean cancellation |
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/c0f99d2b-4f32-4fb1-9e62-6e3dd9a47b42 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/c0f99d2b-4f32-4fb1-9e62-6e3dd9a47b42 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/c0f99d2b-4f32-4fb1-9e62-6e3dd9a47b42 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Agent-Logs-Url: https://github.com/github/gh-aw/sessions/c0f99d2b-4f32-4fb1-9e62-6e3dd9a47b42 Co-authored-by: pelikhan <4175913+pelikhan@users.noreply.github.com>
Added this in ee3ce09: new Makefile targets
Done in ee3ce09 (with follow-up wording tweaks in c7b55ca): actionlint Docker execution now takes caller context in the lint path, so cancellation is cleanly propagated through Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
Agent-Logs-Ur-U0 /usr/bin/git /ref/tags/v9 git sv git rev-�� /actionlint.go git /usr/bin/git --show-toplevel git /usr/bin/git git` (http block)
|
gh aw lint for lock-file-only actionlint checksgh aw lint for lock-file-only actionlint checks and cancellation-aware execution
This introduces a fast lint path focused on validating existing
.lock.ymlfiles on disk, without recompiling.mdworkflows or running additional scanners. It targets the “is the committed lock file parseable/valid for Actions syntax” CI gate.New command: lock-file-only linting
gh aw lintto run actionlint directly against existing lock files.gh aw lint(default scan of.github/workflows/*.lock.yml)gh aw lint .github/workflows/foo.lock.ymlgh aw lint --dir .github/workflowsgh aw lint --shellcheck --pyflakesMakefile integration for lock-file lint
make lint-lockto run./gh-aw lint.make agent-report-progress-lintto run the standard pre-PR gate plus lock-file lint.make helpentries for these targets.Cancellation-aware actionlint Docker execution