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

monorepo-tools: splitting to an existing repository with signed commits #435

Closed
dominikkaluza opened this issue Aug 29, 2018 · 4 comments
Closed
Labels
Enhancement New feature or request for change from user point of view Stale This issue have not been touched for some time and if it doesn't change, it will be closed soon.

Comments

@dominikkaluza
Copy link
Contributor

What is happening

It's not possible to split to an existing repository if the repository contains commits signed by GitHub (typically init commit or merge commits from pull requests).

How to reproduce:

  • Crate a new repository on GitHub with Initialize this repository with a README option checked
  • Build a monorepo from this repository
  • Try splitting the monorepo

Result:

monorepo_split.sh fails when trying to push to this repository

Workaround:

  • edit line 36 in monorepo_split.sh and change git push --tags $REMOTE master to git push --tags --force $REMOTE master (this is needed only for the first split, --force flag can be removed after that)

Expected result

monorepo_split.sh re-signs the commits and pushes them to the existing repository without using the --force flag

@vitek-rostislav
Copy link
Contributor

Hi @dominikkaluza, thanks for reporting the issue. We had the same problem in the past and solved it exactly the same way as you describe - by using push --force. At least, we should probably document this behavior 🤔

monorepo_split.sh could sign the commit using the same GPG key (https://help.github.com/articles/signing-commits-using-gpg/) that is used in the original github repository but this would work only if all the commits in the original repository were signed by the key.

@PetrHeinz
Copy link
Contributor

PetrHeinz commented Sep 3, 2018

I suppose it is theoretically possible to store all data about the signature into the commit msg during building the monorepo and then use this data to recreate exactly the same signed commit during the splitting. I haven't looked into it yet, but it should be possible to store all raw data of the commit encoded in the commit msg (it's possible to store 100MiB there) and during splitting restore the exact commit...

This could be a messy and time-consuming workaround, I would suggest to just document this behavior instead (I've created a separate issue #445 for this). We could leave this issue open if someone from the community want to take a look at it.

@stale
Copy link

stale bot commented Nov 11, 2018

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the Stale This issue have not been touched for some time and if it doesn't change, it will be closed soon. label Nov 11, 2018
@stale
Copy link

stale bot commented Jan 10, 2019

This issue has been automatically closed because there was no acivity within the last half a year.

@stale stale bot closed this as completed Jan 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request for change from user point of view Stale This issue have not been touched for some time and if it doesn't change, it will be closed soon.
Projects
None yet
Development

No branches or pull requests

3 participants