reference Environment variables
OPENGREP_REPO_NAME
- Also spelled
SEMGREP_REPO_NAME- Value
- a repository name
- See also
opengrep ci
On GitHub Actions, when opengrep ci scans a pull request and GH_TOKEN is set, it asks the GitHub API for the merge base of the pull request. The variable names the repository, as owner/repo; when it is unset, GITHUB_REPOSITORY, set by GitHub Actions, is used. If the lookup fails, for example because of a wrong name, Opengrep fetches the history and computes the merge base locally, which takes longer.
Examples
Naming the repository on GitHub Actions
Command
$ OPENGREP_REPO_NAME=my-org/my-repo opengrep ci -q --config rule.yaml