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

Add workflow to automatically merge changes in stable into stardisk branch #19

Merged
merged 2 commits into from
Dec 22, 2023

Conversation

scaedufax
Copy link
Contributor

Add workflow to automatically merge changes in stable into stardisk branch

Requirements

  • The pull request Stardisk branch #18 is required.
    • The pull request should be merged into a new stardisk branch
    • Currently this PR requires the new branch to be called stardisk
  • Github Actions needs write permissions. (See repository Settings -> Actions -> General -> Workflow permissions)
    • Currently this is a bit of a security issue, changes to workflows should be considered with deep care. Using Github Tokens, it would be possible to define the permissions more specifically for the task.

Proof of concept

The testing repo https://github.com/scaedufax/nbody-stardisk-test contains both the automerge feature and the stardisk verison.

Solving conflicts by hand

I think this will only rarely happen here, but might be needed once in a while.
The git book is really detailed and discusses the matter of merge conflicts very nicely. Especially the chapters Git Branching - Basic Branching and Merging and Git Tools - Advanced Merging should be of interest.

However a quick outline shall also be given here, as well as in the comments of the workflow for future reference!

  1. Make sure the stable and stardisk branches are up to date, respectively
git checkout stable
git pull
git checkout stardisk
git pull
  1. Merge stable into stardisk (make sure you are on the stardisk branch first)
  git checkout stardisk
  git merge stable
  1. Merge conflicts should appear. Fix conflict in a way of your choice, e.g.,
git mergetool --tool=vimdiff
  1. commit and push your changes to the upstream stardisk branch
git push origin stardisk

@kaiwu-astro
Copy link
Member

I think we should give Uli a round of applause 👏. PR #18 added the long-waited stardisk version to our repo, and this PR elegantly implements automatic fetching of updates from stable branch with GitHub Actions automation, which is exactly what Rainer have been looking forward to. This involves a lot of work behind it (as far as I know, studying and testing GitHub Actions take lots of efforts). Thank you for the efforts and nice work!

@scaedufax scaedufax marked this pull request as ready for review December 21, 2023 16:46
@spurzem spurzem merged commit 2340400 into nbody6ppgpu:stable Dec 22, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants