Skip to content
This repository has been archived by the owner on Apr 4, 2024. It is now read-only.

How to get a reference to the PR's target branch for go-apidiff #1659

Open
abbasadel opened this issue May 23, 2023 · 0 comments
Open

How to get a reference to the PR's target branch for go-apidiff #1659

abbasadel opened this issue May 23, 2023 · 0 comments

Comments

@abbasadel
Copy link

abbasadel commented May 23, 2023

Hi,

We are using go-apidiff to check golang code backward compatibility part of the CI.
For go-apidiff to work properly, it needs to have $GITHUB_BASE_REF of the PR's target branch which is not available during bros merge and produces the following error:

 ##[group]Run joelanford/go-apidiff@main
 with:
   base-ref: origin/${GITHUB_BASE_REF}
   version: latest
   compare-imports: false
   print-compatible: true
   repo-path: .
   skip-cache: false
 env:
   DOCKER_PLATFORMS: linux/amd64,linux/arm64
   ARTIFACTS_USR: ***
   ARTIFACTS_PSW: ***
 + /home/runner/go/bin/go-apidiff origin/ --compare-imports=false --print-compatible=true --repo-path=.
 failed to lookup git commit hashes: could not get hash for "origin/": Revision invalid : must not end with "/"
 ##[error]Process completed with exit code 2.
 Post job cleanup.

Is there a way to set $GITHUB_BASE_REF or have a way to get a reference to the PR's target branch during bros merge?
More info: camunda/camunda#12838

Thanks

@abbasadel abbasadel changed the title support go-apidiff How to get a reference to the PR's target branch for go-apidiff May 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant