Skip to content

Conversation

@6d7a
Copy link
Contributor

@6d7a 6d7a commented Dec 10, 2025

Closes #1158

Context

In some configurations ggshield runs in repositories without a configured remote, for example when running in a git pre-receive hook.

What has been done

This commit adds a REPOSITORY_REMOTE_FALLBACK environment variable for setting a fallback value for the remote URL.

PR check list

  • As much as possible, the changes include tests (unit and/or functional)
  • If the changes affect the end user (new feature, behavior change, bug fix) then the PR has a changelog entry (see doc/dev/getting-started.md). If the changes do not affect the end user, then the skip-changelog label has been added to the PR.

@6d7a 6d7a requested a review from a team as a code owner December 10, 2025 16:42
@codecov
Copy link

codecov bot commented Dec 10, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 92.01%. Comparing base (7218450) to head (00d20ca).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1159      +/-   ##
==========================================
+ Coverage   91.97%   92.01%   +0.04%     
==========================================
  Files         144      144              
  Lines        6202     6209       +7     
==========================================
+ Hits         5704     5713       +9     
+ Misses        498      496       -2     
Flag Coverage Δ
unittests 92.01% <100.00%> (+0.04%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@6d7a 6d7a force-pushed the 6d7a/issue-1158/set-repo-url-in-env-var branch from 6e25e87 to 5712257 Compare December 11, 2025 08:38
In some configurations ggshield runs in repositories without a configured remote, for example when running in a git pre-receive hook. This commit adds a REPOSITORY_REMOTE_FALLBACK environment variable for setting a fallback value for the remote URL.

Issue #1158
@6d7a 6d7a force-pushed the 6d7a/issue-1158/set-repo-url-in-env-var branch from 5712257 to 00d20ca Compare December 11, 2025 08:59
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.

Pre-receive does not honor excluded paths from the server

2 participants