set associated head sha on pull request event#234
Conversation
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
|
This might seem as a fix in versioning, but it's a breaking change. For example, this breaks all our workflows which depend on the built image Now we have to include extra conditions as the sha won't be the same when there's a PR and a push to This now requires implementations to use |
|
@gustavovalverde From what I see on ZcashFoundation/zebra#5390, you're pushing an image on PR and others jobs depend on it using I didn't think about this use case as pushing on PR is not possible in majority of cases as secrets can't be exposed. But in your case I see you're using Even if you can share image between jobs without pushing them, it still sounds like a valid use case to use a registry. I will revert this change, sorry about that. |
| context.ref = `refs/pull/${context.payload.number}/merge`; | ||
| } | ||
|
|
||
| if ((/pull_request/.test(context.eventName) || /pull_request_target/.test(context.eventName)) && context.payload?.pull_request?.head?.sha != undefined) { |
There was a problem hiding this comment.
This appears to check that substring “pull_request” appears anywhere in the event name. Maybe the intention was to check if the name starts with a certain substring? Or matches exactly if that’s the entire event name?
fixes #206
Signed-off-by: CrazyMax crazy-max@users.noreply.github.com