rest-for-physics / rest-for-physics/framework

Validating submodules with their corresponding branch

Open
#398 1 comment 0 reactions 1 assignee View on GitHub

@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:

https://github.com/rest-for-physics/framework/blob/babeff3be96b7e433ebcf42e4c55b4ae82530275/.github/workflows/validation.yml#L656

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.