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

Action reporting wrong SHA in a Pull Request #8

Closed
rhuanbarreto opened this issue Jan 19, 2024 · 0 comments · Fixed by #9
Closed

Action reporting wrong SHA in a Pull Request #8

rhuanbarreto opened this issue Jan 19, 2024 · 0 comments · Fixed by #9
Assignees

Comments

@rhuanbarreto
Copy link

In the following line:

const { repo, serverUrl, sha } = github.context;

the sha ref the action is printing in a Pull Request is not the right reference to use.

The right one is context.payload.pull_request.head.sha.

An example for another github action:

https://github.com/chromaui/chromatic-cli/blob/b75294bf6dd44ce99846daed9164ba2ba343a0a3/action-src/main.ts#L19-L84

@milesj milesj self-assigned this Jan 19, 2024
@milesj milesj closed this as completed in #9 Jan 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants