Skip to content

Create auto-merge workflow #40

Description

@hohwille

We have main branch for the initial state of the training with frontend, backend skeleton and exercise descriptions.
Then we also have a solution branch and we used to have additional solution branches per exercise.
Due to the high effort maintaining changes across all these branches, we removed the other partial solution branches.
In the last training we got the feedback that participants were missing partial solution branches if they could not complete an exercise on time but wanted to continue and catch up for the next exercise.

The idea of this story is that we reintroduce these branches but add some workflow that will help us maintaining the changes:

  1. sync-main will merge all changes made to main to the next higher branch (solution/exercise-1). So if we update an exercise or a version in pom.xml, etc. the update will also arrive on the next solution branch (and from there upwards to all others).
  2. In the same way we merge changes from solution/N to solution/N+1 where the last branch is solution/complete.

Questions/discussion:

  • How to deal with conflicts? I would suggest to collect them and either just somehow report them or even automatically create a PR out of it for us to resolve manually. In any way the conflicts should then be discarded keeping so the file remains unchanged on the target branch.
  • We could also go the other way around and only maintain the solution/complete branch. Then we could even add comment markers to the code telling what sections are specific for what exercise and need to be removed to get to the state before the exercise. This could even avoid all conflicts since we only maintain one branch and could generate everything else from it. Then the workflow could even run manually so we can do various small changes to the solution and when we are ready, we would simply run the workflow to update/re-generate all the branches.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions