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

Replicate actions checkout to check out repositories in build chain #394

Open
shubhbapna opened this issue Feb 16, 2023 · 0 comments
Open
Labels
enhancement New feature or request needs-discussion need to further discuss and determine whether it is needed or not

Comments

@shubhbapna
Copy link
Contributor

In #392 we renamed the target branch to source after merging to fix the sonar cloud issue.

I think it will be worthwhile to explore any side effects of this as well as mimic how github checks out repositories in PR just so that if we ever add a new tool like sonar cloud we will have consistent behavior.

Looking at sonarcloud-github-action, their sample workflow shows that simply using actions/checkout and running sonar cloud is enough to get PR analysis[1]. So if we can replicate how action/checkout checks out a repo during a PR we should be able to get what we want.
actions/checkout by default uses GITHUB_SHA to checkout a repository which points to a test merge commit that github produces by merging source into target during a pull request event. So instead of actually cloning and then merging, it simply fetches and checks out a commit.
[1] https://github.com/SonarSource/sonarcloud-github-action#usage

@shubhbapna shubhbapna added enhancement New feature or request needs-discussion need to further discuss and determine whether it is needed or not labels Feb 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs-discussion need to further discuss and determine whether it is needed or not
Projects
None yet
Development

No branches or pull requests

1 participant