Skip to content

Dependabot merges PRs that do not pass CI #33

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

Closed
raxod502 opened this issue Sep 22, 2022 · 3 comments · Fixed by #38
Closed

Dependabot merges PRs that do not pass CI #33

raxod502 opened this issue Sep 22, 2022 · 3 comments · Fixed by #38

Comments

@raxod502
Copy link
Contributor

raxod502 commented Sep 22, 2022

Looks like the CI errors noted in #32 were introduced by #31 being auto-merged by

automerge:
name: AutoMerge
needs: ci
runs-on: ubuntu-latest
if: github.event_name == 'pull_request_target' && github.actor == 'dependabot[bot]'
steps:
- uses: actions/github-script@v3
with:
script: |
github.pulls.merge({
owner: context.payload.repository.owner.login,
repo: context.payload.repository.name,
pull_number: context.payload.pull_request.number
})
despite some checks not passing:

image

For some reason the same CI was run twice, but once as a no-op (which passed) and once with the actual tests (which failed). I think the GitHub Actions configuration needs to be updated somehow to prevent that.

@raxod502
Copy link
Contributor Author

Looks like this is (partially) because pull_request_target is the wrong trigger to use. Per docs, it fully ignores the head of the PR and only runs against the base branch, so, of course will pass despite bad code in PR.

I think what we want is a trigger (or action) that will run against a synthesized merge commit instead.

@kddnewton
Copy link
Member

Ugh... I kind of knew this might be wrong and didn't know how to fix it. Thanks for catching, I'll see what I can find. If you know how to fix this I would appreciate the help as well!

@raxod502
Copy link
Contributor Author

Fixed in #38.

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 a pull request may close this issue.

2 participants