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

Automerge fails when author of a commit is not defined #259

Closed
2 tasks done
marco-ippolito opened this issue Aug 22, 2022 · 2 comments · Fixed by #258
Closed
2 tasks done

Automerge fails when author of a commit is not defined #259

marco-ippolito opened this issue Aug 22, 2022 · 2 comments · Fixed by #258
Assignees

Comments

@marco-ippolito
Copy link
Contributor

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the bug has not already been reported

Fastify version

3.0.0

Plugin version

3.2.2

Node.js version

18.7.0

Operating system

macOS

Operating system version (i.e. 20.04, 11.3, 10)

12.5.1

Description

When automerging it checks if in the commit list there is a non-dependabot commit, by doing so it goes into uncaught exception if there is an unkown author commit.
image

Steps to Reproduce

tap.test('should skip PR with non dependabot commit', async () => {
  const PR_NUMBER = Math.random()
  const { action, stubs } = buildStubbedAction({
    payload: {
      pull_request: {
        user: {
          login: BOT_NAME,
        },
        number: PR_NUMBER,
      },
    },
    inputs: { PR_NUMBER },
  })

  stubs.prCommitsStub.resolves([
    {
      author: undefined
    },
  ])

  await action()

  sinon.assert.calledOnce(stubs.prCommitsStub)
  sinon.assert.calledWithExactly(
    stubs.logStub.logWarning,
    'PR contains non dependabot commits, skipping.'
  )
  sinon.assert.notCalled(stubs.approveStub)
  sinon.assert.notCalled(stubs.mergeStub)
})`
``

### Expected Behavior

I think it should check if the commit has a known author.
@simoneb
Copy link
Collaborator

simoneb commented Aug 22, 2022

The intended behavior is that an unknown author is considered the same as an author who's not dependabot

@github-actions
Copy link

🎉 This issue has been resolved in version 3.2.3 🎉

The release is available on:

Your optic bot 📦🚀

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