rest-for-physics / rest-for-physics/framework
Validating submodules with their corresponding branch
@juanangp is already working on this.
Since Apr 21, 2023.
- Dominant language
- C++
- Stars
- 19
- Forks
- 14
- PR merge metrics
- No merged PRs in 30d
Description
This issue comes after some discussions present at the following PR
https://github.com/rest-for-physics/axionlib/pull/56#issuecomment-1517527380
I think a way around to solve this problem could be having a script that identifies if the present branch associtated to the PR that is being validated exists in the framework and returns master if not.
Something like:
echo "branchAtRepositoryExists.sh framework ${{ env.BRANCH_NAME }}"
Thus, in the submodule framework validation frameworkValidation.yml we would do something like:
echo "branchAtRepositoryExists.sh framework ${{ env.BRANCH_NAME }}" >> $VALIDATION_BRANCH
uses: rest-for-physics/framework/.github/workflows/validation.yml@$VALIDATION_BRANCH
Then we would change the following lines at the framework/validation.yml as follows:
echo "branchAtRepositoryExists.sh axionlib ${{ env.BRANCH_NAME }}" >> $VALIDATION_BRANCH
uses: rest-for-physics/axionlib/.github/workflows/validation.yml@$VALIDATION_BRANCH
Then, as soon as we create a branch at the framework with the same name as the branch associated to the submodule PR, the submodule PR will trigger the pipelines at framework and submodules that have the same name as the PR, and if it does not exist it will use master.
EDIT:
Probably the script needs to receive the name of the repository. Thus two arguments would be necessary:
branchAtRepositoryExists.sh framework ${{ env.BRANCH_NAME }}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.