Skip to content

fix: update base ref fallback with different path#108

Merged
buger merged 1 commit into
mainfrom
fix/add-fallback-logic-to-git-baseref
Apr 6, 2026
Merged

fix: update base ref fallback with different path#108
buger merged 1 commit into
mainfrom
fix/add-fallback-logic-to-git-baseref

Conversation

@vladzabolotnyi

Copy link
Copy Markdown

We don't have a documentation explicitly describing the repository property on github. Current change referencing this discussion:
https://github.com/orgs/community/discussions/54817

@probelabs

probelabs Bot commented Apr 6, 2026

Copy link
Copy Markdown
Contributor

This PR fixes a bug in the dependency-guard.yml GitHub Actions workflow by correcting the fallback path for the base reference. The expression to get the repository's default branch was updated from github.repository.default_branch to github.event.repository.default_branch.

This ensures that the workflow can reliably determine the base branch for comparison, even in contexts where github.event.pull_request.base.ref might not be available, preventing potential failures in the dependency change check.

Files Changed Analysis

  • .github/workflows/dependency-guard.yml: A single-line change in the workflow definition to correct a GitHub context variable.

Architecture & Impact Assessment

  • What this PR accomplishes: It corrects a variable path in the dependency-guard workflow to ensure the fallback mechanism for determining the base git reference works correctly.
  • Key technical changes introduced: The GitHub Actions expression for the BASE_REF environment variable was changed from github.repository.default_branch to github.event.repository.default_branch.
  • Affected system components: The change is isolated to the dependency-guard CI job. This job is responsible for checking for dependency changes in pull requests, and this fix improves its reliability.

Scope Discovery & Context Expansion

The change is highly localized to the dependency-guard.yml workflow. The fix ensures that the git fetch command within the workflow receives the correct default branch name when the pull request's base reference is not directly available from the event payload. This prevents the job from failing due to an incorrect git reference. The impact is limited to the execution of this specific CI check and has no effect on production code or other services.

Metadata
  • Review Effort: 1 / 5
  • Primary Label: bug

Powered by Visor from Probelabs

Last updated: 2026-04-06T11:23:08.313Z | Triggered by: pr_opened | Commit: 868d754

💡 TIP: You can chat with Visor using /visor ask <your question>

@probelabs

probelabs Bot commented Apr 6, 2026

Copy link
Copy Markdown
Contributor

✅ Security Check Passed

No security issues found – changes LGTM.

✅ Architecture Check Passed

No architecture issues found – changes LGTM.

✅ Performance Check Passed

No performance issues found – changes LGTM.


Powered by Visor from Probelabs

Last updated: 2026-04-06T11:23:00.309Z | Triggered by: pr_opened | Commit: 868d754

💡 TIP: You can chat with Visor using /visor ask <your question>

@buger
buger merged commit d3fa208 into main Apr 6, 2026
8 checks passed
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