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

Multiple commits move HEAD during Github Actions #16

Open
Demmonius opened this issue Mar 6, 2020 · 1 comment
Open

Multiple commits move HEAD during Github Actions #16

Demmonius opened this issue Mar 6, 2020 · 1 comment

Comments

@Demmonius
Copy link

Demmonius commented Mar 6, 2020

Hello,
First of all, thank you for this action, it's useful!

I'm running it in my CI but I got an issue here: https://github.com/UnlyEd/next-right-now/runs/474616496 (section "Comment PR (Deployment success)")
And got this error:
Couldn't find an open pull request for branch with head at 68cd1584010cc948222fb38ea56067020d8eacda.
It looks close to #8 but I don't think that's the same problem.

In my case, when I push many commits in a short time, the HEAD is no longer on my initial commit and comment-on-pr can't associate my commit with the HEAD.

Any ideas to solve it?
Maybe by adding an environment variable to set ref to use? Something provided Github Actions, like:

      - name: Comment PR
        uses: unsplash/comment-on-pr@master
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_CI_PR_COMMENT }}
          GITHUB_SHA: ${{ github.sha }}
        with:
          msg: "Commit ${{ github.sha }} deployed"

Where GITHUB_SHA is the commit to use to find the pull request?

Thank you!

@Vadorequest
Copy link

@aaronklaassen What do you think about that?

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

2 participants