telia-oss / github-pr-resource

Github pull request resource for Concourse
MIT License
182 stars 5 forks source link

Support for other types of source cloning #279

Open egana-hmh opened 2 years ago

egana-hmh commented 2 years ago

Feature request.

Clones the base (e.g. master branch) at the latest commit, and merges the pull request at the specified commit into master. This ensures that we are both testing and setting status on the exact commit that was requested in input. https://github.com/telia-oss/github-pr-resource#get

This is a great default, but I think it could be really useful to have other options available.

One real example is I think it would be very easy to reuse this plugin for sonarqube scanning if the preview merge wasn't performed – as sonarqube PR analysis won't work with a preview merge to the master branch. An option to start with the source as the HEAD commit of the PR branch could potentially allow this use case.

The analysis is being run on a local repository with valid repository metadata (e.g. the .git or .svn folders have not been removed). Avoid any attempt at previewing the merge or actions involving your main branch. https://docs.sonarqube.org/latest/analysis/pull-request/

bgandon commented 4 months ago

Unfortunately, there is no hope that you get any support here (#246 was 2+y ago).

But recent news is that the Cloud Foundry community is now maintaining a fork of this resource at cloudfoundry-community/github-pr-resource.

On our Concourse installation at Gstack, that one is working fine. Could you give a try and provide feedback there?

_(the new resource is a drop-in replacement; you only have to switch telia-ossto cfcommunity in in the resource_types: declaration, i.e. specify repository: cfcommunity/github-pr-resource)_