Skip to content

fix: pin gavel - #337

Merged
adityathebe merged 1 commit into
masterfrom
fix/pin-dependencies
Aug 3, 2026
Merged

fix: pin gavel#337
adityathebe merged 1 commit into
masterfrom
fix/pin-dependencies

Conversation

@adityathebe

@adityathebe adityathebe commented Aug 3, 2026

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Chores
    • Pinned an automated workflow action to a specific version for more consistent and reliable builds.

@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Review Change Stack

Walkthrough

The test workflow now references the Gavel GitHub Action by commit instead of the mutable main branch.

Changes

Workflow security

Layer / File(s) Summary
Pin Gavel Action
.github/workflows/test.yml
The Gavel Action reference changes from main to commit 43a9189b99e71ed928f418e01cd34aa797c2c0e0.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes pinning the gavel GitHub Action, which is the main change.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/pin-dependencies
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch fix/pin-dependencies

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/test.yml:
- Line 36: Update the comment on the flanksource/gavel workflow step to
accurately describe the pinned dependency, replacing “main” with the pinned
commit SHA prefix or the intended explicit release tag.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: fa2479a5-d4e6-4cb7-9faf-5bcc5f5aefe2

📥 Commits

Reviewing files that changed from the base of the PR and between fbab81e and d6f67b7.

📒 Files selected for processing (1)
  • .github/workflows/test.yml

uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6

- uses: flanksource/gavel@main
- uses: flanksource/gavel@43a9189b99e71ed928f418e01cd34aa797c2c0e0 # main

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Workflow line context:"
if [ -f .github/workflows/test.yml ]; then
  nl -ba .github/workflows/test.yml | sed -n '30,42p'
else
  echo ".github/workflows/test.yml not found"
fi

echo
echo "All uses references in workflow:"
rg -n "uses:|gavel" .github/workflows/test.yml || true

echo
echo "Resolve flanksource/gavel main tag object/target:"
if command -v gh >/dev/null 2>&1; then
  for ref in "43a9189b99e71ed928f418e01cd34aa797c2c0e0" "main"; do
    echo "--- $ref"
    gh api "repos/flanksource/gavel/git/matches/$ref" -q '.[].sha' 2>/dev/null || true
  done
  gh api repos/flanksource/gavel/git/ref/tags/main 2>/dev/null || true
  tag_obj="$(gh api repos/flanksource/gavel/git/ref/tags/main -q '.object.sha' 2>/dev/null || true)"
  if [ -n "$tag_obj" ]; then
    echo "tag object:"
    gh api "repos/flanksource/gavel/git/tags/$tag_obj" 2>/dev/null || true
  fi
else
  echo "gh CLI not available"
fi

echo
echo "Read-only check: workflow contains pinned SHA with # main comment:"
python3 - <<'PY'
from pathlib import Path
p=Path(".github/workflows/test.yml")
if p.exists():
    lines=[(i+1,l.strip()) for i,l in enumerate(p.read_text().splitlines())]
    for i,l in lines:
        if "flanksource/gavel@43a9189b99e71ed928f418e01cd34aa797c2c0e0 # main" in l:
            print(f"line {i}: {l}")
else:
    print("missing")
PY

Repository: flanksource/commons

Length of output: 220


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Workflow line context:"
if [ -f .github/workflows/test.yml ]; then
  awk '{printf "%5d\t%s\n", NR, $0}' .github/workflows/test.yml | sed -n '30,42p'
else
  echo ".github/workflows/test.yml not found"
fi

echo
echo "All uses references in workflow:"
grep -n "uses:\|gavel" .github/workflows/test.yml || true

echo
echo "Read-only structural check: workflow contains pinned SHA with # main comment:"
python3 - <<'PY'
from pathlib import Path
p = Path(".github/workflows/test.yml")
target = "flanksource/gavel@43a9189b99e71ed928f418e01cd34aa797c2c0e0 # main"
for i, line in enumerate(p.read_text().splitlines(), 1):
    if target in line.strip():
        print(f"line {i}: {line.strip()}")
PRIVATED
for i, line in enumerate(p.read_text().splitlines(), 1):
    stripped=line.strip()
    if "flanksource/gavel@" in stripped:
        print(f"gavel ref at line {i}: {stripped}")
PY

echo
echo "Remote gavel refs/tags/main availability:"
python3 - <<'PY'
import urllib.request, json
ref_url = "https://api.github.com/repos/flanksource/gavel/git/ref/tags/main"
try:
    with urllib.request.urlopen(ref_url, timeout=20) as r:
        print(r.status)
        data = json.load(r)
        print(data)
except Exception as e:
    print(type(e).__name__, e)
PY

echo
echo "Remote pinned SHA availability:"
python3 - <<'PY'
import urllib.request, json

sha = "43a9189b99e71ed928f418e01cd34aa797c2c0e0"
url = f"https://api.github.com/repos/flanksource/gavel/git/matches/{sha}"
try:
    with urllib.request.urlopen(url, timeout=20) as r:
        print(r.status)
        data = json.load(r)
        print(data)
except Exception as e:
    print(type(e).__name__, e)

# Also show HEAD/main commit if easily available without raw content
main_url = "https://api.github.com/repos/flanksource/gavel/git/refs/heads/main"
try:
    with urllib.request.urlopen(main_url, timeout=20) as r:
        data = json.load(r)
        print("HEAD main object:", data.get("object"))
except Exception as e:
    print(type(e).__name__, e)
PY

Repository: flanksource/commons

Length of output: 1639


🏁 Script executed:

#!/bin/bash
set -euo pipefail

echo "Remote gavel refs/tags/main object:"
python3 - <<'PY'
import urllib.request, json
url = "https://api.github.com/repos/flanksource/gavel/git/ref/tags/main"
try:
    with urllib.request.urlopen(url, timeout=20) as r:
        data = json.load(r)
        print("status", r.status)
        print("object", data.get("object"))
        if data.get("object", {}).get("type") == "tag":
            tag_url = "https://api.github.com/repos/flanksource/gavel/git/tags/" + data["object"]["sha"]
            with urllib.request.urlopen(tag_url, timeout=20) as tr:
                tdata = json.load(tr)
                print("tag object", tdata)
                print("dereferenced commit", tdata.get("object", {}).get("sha"))
except Exception as e:
    print(type(e).__name__, e)
PY

echo
echo "Remote commit SHA availability:"
python3 - <<'PY'
import urllib.request, json
sha = "43a9189b99e71ed928f418e01cd34aa797c2c0e0"
url = "https://api.github.com/repos/flanksource/gavel/git/commits/" + sha
try:
    with urllib.request.urlopen(url, timeout=20) as r:
        data = json.load(r)
        print("status", r.status)
        print("sha", data.get("sha"))
        print("commit_message", data.get("commit", {}).get("message", "").splitlines()[0])
except Exception as e:
    print(type(e).__name__, e)
PY

Repository: flanksource/commons

Length of output: 514


🌐 Web query:

flanksource gavel main tag commit 43a9189b99e71ed928f418e01cd34aa797c2c0e0

💡 Result:

The git commit hash 43a9189b99e71ed928f418e01cd34aa797c2c0e0 is not found in the flanksource/gavel GitHub repository [1]. A review of the repository's commit history, release tags, and associated pull requests does not show this specific commit hash [1][2][3]. The flanksource/gavel project is a tool written primarily in Go that provides a gavel command-line interface for managing git commits, among other features [1]. Official releases for the repository currently extend up to at least v0.0.52 [3]. The provided commit hash does not correspond to any known activity or branch within this repository [1].

Citations:


🌐 Web query:

github flanksource gavel commit 43a9189b99e71ed928f418e01cd34aa797c2c0e0

💡 Result:

The commit hash 43a9189b99e71ed928f418e01cd34aa797c2c0e0 is not associated with the official flanksource/gavel repository [1]. A comprehensive search of commit history, pull requests, and releases within that repository does not return this specific hash [1][2][3][4][5][6][7][8][9][10][11][12][13][14]. It is possible this commit hash belongs to a different project or a fork not indexed in the provided results, as similar hashes appear in other contexts unrelated to the flanksource/gavel codebase [15][16][17][18][19][20].

Citations:


🌐 Web query:

site:github.com/flanksource/commons gavel@

💡 Result:

Gavel is a specialized CI/CD tool, distributed as a GitHub Action (flanksource/gavel), designed to execute, monitor, and report on testing and linting processes within a repository [1][2][3]. It is primarily used in GitHub Actions workflows to streamline CI/CD feedback by providing integrated test summaries, artifact generation (such as JSON and HTML result files), and automated pull request comments [1][2][4][3]. When integrated into a workflow, it typically replaces standard, unformatted go test output, allowing for more structured reporting and better visibility into test performance and linting outcomes [2][3]. Key features and use cases include: - CI/CD Integration: It is invoked in GitHub Actions using uses: flanksource/gavel@<version> [1][3]. - Automated Reporting: It supports outputting results in multiple formats, including JSON, HTML, and Markdown summaries, and can automatically post these results as comments on pull requests [1][2][4][3]. - Configuration: It can be configured via a .gavel.yaml file to manage settings, such as ignoring specific files or detections, which helps reduce noise from false positives [5]. - Error Handling: It includes flags like fail-on-error, allowing developers to control whether the CI pipeline should fail based on the tool's execution results [1][3]. There is no indication that "gavel@" refers to an email domain; rather, it appears to be a misinterpretation of the GitHub Action syntax (e.g., flanksource/gavel@main or flanksource/gavel@v<version>), where the "@" symbol denotes a specific version, branch, or tag reference for the action [1][2][3].

Citations:


🌐 Web query:

"flanksource/gavel@43a9189b99e71ed928f418e01cd34aa797c2c0e0"

💡 Result:

flanksource/gavel is a CLI toolkit designed for testing, linting, AI-powered code review, and CI automation [1]. The repository, hosted on GitHub, is written primarily in Go [1]. The specific commit reference 43a9189b99e71ed928f418e01cd34aa797c2c0e0 corresponds to a historical state of the main branch in the flanksource/gavel repository. Key capabilities of the Gavel tool include: - Fixture-based testing using markdown files with command blocks, tables, and CEL assertions [2]. - AI-powered code review and automated repair of lint violations [3]. - Integration with the Model Context Protocol (MCP) to allow AI assistants to interact safely with Gavel commands [3]. - CI/CD workflow management, including migration tools for GitHub Actions [2], organization-wide CI status reporting [4], and automated PR handling [4][3]. - Process supervision (e.g., Procfile support) for managing local development environments [4]. - Support for various linters, including integration of oxlint [4]. The project supports agentic workflows via the "Agent Skills" specification, enabling compatibility with various AI assistants such as Claude Code, VS Code Copilot, Cursor, and the Gemini CLI [2]. As of August 2026, the project remains actively developed with frequent releases [5][6].

Citations:


Align the workflow comment with the pinned SHA.

Line 36 pins flanksource/gavel to a commit SHA, but # main still describes a mutable branch. Use the commit prefix or an explicit release tag if that is the intended dependency.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/test.yml at line 36, Update the comment on the
flanksource/gavel workflow step to accurately describe the pinned dependency,
replacing “main” with the pinned commit SHA prefix or the intended explicit
release tag.

@github-actions

github-actions Bot commented Aug 3, 2026

Copy link
Copy Markdown

Gavel summary

Source Pass Fail Skip Duration
collections 60 0 0 3.0s
files 41 0 0 62ms
github.com/flanksource/commons/certs 4 0 0 330ms
github.com/flanksource/commons/cmd/hx 8 0 0 -
github.com/flanksource/commons/cmd/hx/parse 26 0 0 -
github.com/flanksource/commons/collections/syncmap 10 0 0 -
github.com/flanksource/commons/context 1 0 0 -
github.com/flanksource/commons/duration 2 0 0 -
github.com/flanksource/commons/files 16 0 0 -
github.com/flanksource/commons/har 30 0 0 -
github.com/flanksource/commons/hash 13 0 0 -
github.com/flanksource/commons/http 95 0 2 11.6s
github.com/flanksource/commons/logger 49 0 0 10ms
github.com/flanksource/commons/logger/httpretty/internal/color 15 0 0 -
github.com/flanksource/commons/logger/httpretty/internal/header 1 0 0 -
github.com/flanksource/commons/lookup 7 0 0 -
github.com/flanksource/commons/merge 28 0 0 -
github.com/flanksource/commons/test 5 0 1 30ms
github.com/flanksource/commons/text 1 0 0 -
github.com/flanksource/commons/tokenizer 3 0 0 -
logger 41 0 0 1ms
set 7 0 0 1ms

Totals: 463 passed · 0 failed · 3 skipped · 15.1s

View full results

@adityathebe
adityathebe merged commit 84ca9f9 into master Aug 3, 2026
10 checks passed
@adityathebe
adityathebe deleted the fix/pin-dependencies branch August 3, 2026 14:05
@flankbot

flankbot commented Aug 3, 2026

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 1.54.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants