Skip to content

Skip changes detection outside pull-requests#1298

Open
leplatrem wants to merge 1 commit into
mainfrom
fix-changes-detection
Open

Skip changes detection outside pull-requests#1298
leplatrem wants to merge 1 commit into
mainfrom
fix-changes-detection

Conversation

@leplatrem
Copy link
Copy Markdown
Contributor

Should fix this:

Run files=$(git diff --name-only "$BASE" "$HEAD")
    files=$(git diff --name-only "$BASE" "$HEAD")
    echo "Changed files:"
    echo "$files"
    check() {
      if echo "$files" | grep -qE "$2"; then
        echo "$1=true" >> "$GITHUB_OUTPUT"
      else
        echo "$1=false" >> "$GITHUB_OUTPUT"
      fi
    }
    check cronjobs       '^.github/workflows/|^cronjobs/'
    check browser_tests  '^.github/workflows/|^browser-tests/'
    check git_reader     '^.github/workflows/|^git-reader/'
    shell: /usr/bin/bash -e {0}
    env:
      BUILDX_NO_DEFAULT_ATTESTATIONS: 1
      GAR_LOCATION: us
      GAR_REPOSITORY: remote-settings-prod
      GCP_PROJECT_ID: moz-fx-remote-settings-prod
      BASE:
      HEAD:
  fatal: ambiguous argument '': unknown revision or path not in the working tree.
  Use '--' to separate paths from revisions, like this:
  'git <command> [<revision>...] -- [<file>...]'
  Error: Process completed with exit code 128.

@leplatrem leplatrem requested a review from a team as a code owner May 14, 2026 14:37
@leplatrem leplatrem added the bug Something isn't working label May 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants