Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge gatekeepr failed on push event (merge pr) #79

Open
alon-dotan-starkware opened this issue Aug 12, 2024 · 0 comments
Open

merge gatekeepr failed on push event (merge pr) #79

alon-dotan-starkware opened this issue Aug 12, 2024 · 0 comments

Comments

@alon-dotan-starkware
Copy link

Looks like there is some missing env var nor param when action triggered by push event
Im getting the following error

Error: failed to create validator: reference of repository is empty
Usage:
  merge-gatekeeper validate [flags]

Flags:
  -h, --help             help for validate
  -i, --ignored string   set ignored jobs (comma-separated list)
      --interval uint    set validate interval second (default [10](https://github.com/starkware-libs/sequencer/actions/runs/10330954989/job/28600586832#step:3:11))
      --ref string       set ref of github repository. the ref can be a SHA, a branch name, or tag name
  -r, --repo string      set github repository
  -s, --self string      set self job name (default "merge-gatekeeper")
      --timeout uint     set validate timeout second (default 600)

Global Flags:
  -t, --token string   set github token

failed to execute command: failed to create validator: reference of repository is empty

action config:

on:
  push:
    branches:
      - main
      - main-v[0-9].**
    tags:
      - v[0-9].**

  pull_request:
    types:
      - opened
      - reopened
      - synchronize
      - auto_merge_enabled
      - edited
      
  ....
  jobs:
    ....
    ....
    merge-gatekeeper:
    runs-on: ubuntu-latest
    # Restrict permissions of the GITHUB_TOKEN.
    # Docs: https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
    permissions:
      checks: read
      statuses: read
    steps:
      - name: Run Merge Gatekeeper
        if: github.event_name != 'merge_group'
        uses: upsidr/merge-gatekeeper@v1
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          timeout: 1200
          ignored: "code-review/reviewable"

      - name: Run Merge Gatekeeper in Merge Queue
        if: github.event_name == 'merge_group'
        uses: upsidr/merge-gatekeeper@v1
        with:
          token: ${{ secrets.GITHUB_TOKEN }}
          ref: ${{github.ref}}
          timeout: 1200
          ignored: "code-review/reviewable"
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

No branches or pull requests

1 participant