Skip to content

ci: fix scorecard trigger for tag push#12

Open
coseto6125 wants to merge 1 commit into
mainfrom
fix/scorecard-trigger
Open

ci: fix scorecard trigger for tag push#12
coseto6125 wants to merge 1 commit into
mainfrom
fix/scorecard-trigger

Conversation

@coseto6125
Copy link
Copy Markdown
Owner

@coseto6125 coseto6125 commented Apr 6, 2026

Summary

  • Scorecard only supports default branch push, not tag events
  • Change trigger from push: tags: v* to push: branches: main + weekly cron schedule
  • Fixes failing scorecard job on v0.3.0 release

🤖 Generated with Claude Code

Summary by Sourcery

CI:

  • Adjust Scorecard GitHub Actions workflow to trigger on pushes to the main branch and on a weekly scheduled run, replacing the previous tag-based trigger.

Scorecard only supports default branch, not tag push events.
Change from tag trigger to main branch push + weekly cron.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai Bot commented Apr 6, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adjusts the OpenSSF Scorecard GitHub Action workflow to run on main branch pushes and a weekly cron schedule instead of tag pushes, addressing unsupported tag triggers and fixing the failing scorecard job for releases.

Flow diagram for Scorecard workflow trigger behavior change

flowchart TB
  Start[GitHub event occurs] --> CheckEventType{Event type}

  CheckEventType -->|push| PushTarget
  CheckEventType -->|schedule| CronTarget
  CheckEventType -->|workflow_dispatch| DispatchTarget
  CheckEventType -->|tag push| TagTarget

  PushTarget{Push target} -->|branch main| RunWorkflowPush[Run Scorecard workflow]
  PushTarget -->|other branches| IgnorePush[Do not run workflow]

  CronTarget --> RunWorkflowCron[Run Scorecard workflow]
  DispatchTarget --> RunWorkflowDispatch[Run Scorecard workflow]

  TagTarget[Tag push<br/>no longer configured] --> IgnoreTag[Do not run workflow]
Loading

File-Level Changes

Change Details Files
Update Scorecard workflow triggers to use main branch pushes and a weekly cron schedule instead of tag-based triggers.
  • Add a weekly cron schedule trigger at 06:00 UTC every Monday for the workflow.
  • Change the push trigger from version tag patterns to the main branch.
  • Retain manual workflow_dispatch triggering while updating the other triggers.
.github/workflows/scorecard.yml

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown

@sourcery-ai sourcery-ai Bot left a comment

Choose a reason for hiding this comment

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

Hey - I've left some high level feedback:

  • The workflow now hardcodes main as the branch; consider using github.event.repository.default_branch (or a reusable workflow input) so this still works if the default branch name changes.
Prompt for AI Agents
Please address the comments from this code review:

## Overall Comments
- The workflow now hardcodes `main` as the branch; consider using `github.event.repository.default_branch` (or a reusable workflow input) so this still works if the default branch name changes.

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants