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

Move official starters into monorepo #1545

Closed
KyleAMathews opened this issue Jul 19, 2017 · 11 comments
Closed

Move official starters into monorepo #1545

KyleAMathews opened this issue Jul 19, 2017 · 11 comments
Labels
help wanted Issue with a clear description that the community can help with.

Comments

@KyleAMathews
Copy link
Contributor

That way we can consolidate tooling + issues + PRs here.

We still want the code to be published to the individual repos however to make it easy to install. So we should have a hook which pushes changes to their folders in the monorepo to the starter repos.

@stale
Copy link

stale bot commented Jan 15, 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? Issue that may be closed soon due to the original author not responding any more. label Jan 15, 2018
@KyleAMathews
Copy link
Contributor Author

NOT STALE!

@stale stale bot removed the stale? Issue that may be closed soon due to the original author not responding any more. label Jan 15, 2018
@KyleAMathews KyleAMathews added the good first issue Issue that doesn't require previous experience with Gatsby label Jan 15, 2018
@SD10
Copy link
Contributor

SD10 commented May 3, 2018

Automating the synchronization between the monorepo and the starter repos is not trivial but I think it could be done if you're open to setting up a peril instance for the Gatsby org.

Peril allows you to route different GitHub event hooks to a file with some work to be done using the GitHub API. Here is an example of a script we use at Moya to attempt to automatically label issues using keywords in the issue title.

I think it could be achieved with the following workflow:

  1. Listening for a PR closed webhook where the status is merged
  2. Checking if the PR's modified files contain any starter repo files
  3. Create a new branch at the specific starter repo to do work on
    (the parent directory for the modified files would indicate which repo we need to modify)
  4. Download the contents of each of the modified files at the monorepo
  5. Create a commit for the contents of each modified file
  6. Push the commits
  7. Open a PR against the respective starter repo and wait for maintainer to approve/merge

If you are open to using Peril at Gatsby, then this is something I could potentially hack on. And of course, I'm open to simpler workflows if anyone has a better idea.

@KyleAMathews
Copy link
Contributor Author

Sounds great! And is pretty much the algorithm I was thinking of. Except we don't need to open a PR against the starters — they would be read-only copies of the main repo so we should just commit the updates and push them.

@SD10
Copy link
Contributor

SD10 commented May 4, 2018

@KyleAMathews My reasoning for opening a PR was to make sure none of the intermediate commits failed and that the changes are not corrupt. I guess the bot could open an issue on the starter repo for any failures, as part of an error handling mechanism.

So all of this would require a Gatsby organization owner to set up the peril server on Heroku whenever someone has the free time to do so.

It does take a little bit of time to setup but IMO is a worthwhile investment for Gatsby because it would allow you to automate other things as well:

  • Automatically commenting/redirecting users who open PR's against a starter repo
  • Automatically labeling PRs with the documentation label if they only contain changes to .md files
  • Anything else your creative mind thinks of 😆

@jlengstorf
Copy link
Contributor

@SD10 Hey! I've just created a Heroku app and configured it according to the doc you sent over. I'd love to get you up and running with whatever you need to get peril going on the Gatsby org. Please let me know what you need and how I can help. I'll do my best to find resources, etc. quickly.

Do you still have time/interest in tackling this?

Thanks!

@SD10
Copy link
Contributor

SD10 commented May 30, 2018

Hey @jlengstorf,

In addition to the Heroku app, Gatsby would also need a GitHub App and a settings repo to store the scripts. Were you able to set those up? These tasks require Gatsby organization owner permissions.

Aside from getting peril setup, I would probably be ~2 weeks out from being able to build this specific feature as I'm adjusting to a new job. Simpler features could be done before then of course.

I'm open to a Google Hangout or some kind of meeting if you would like to talk in greater detail about the setup process or other specifics. Can also DM me on Twitter @_SD10_

@jlengstorf
Copy link
Contributor

jlengstorf commented May 30, 2018 via email

@jlengstorf jlengstorf added Hacktoberfest help wanted Issue with a clear description that the community can help with. and removed Hacktoberfest good first issue Issue that doesn't require previous experience with Gatsby labels Oct 1, 2018
@m-allanson
Copy link
Contributor

@DSchau ok to close this now that your work in #10310 has been merged?

@DSchau
Copy link
Contributor

DSchau commented Jan 7, 2019

(closing!)

@DSchau DSchau closed this as completed Jan 7, 2019
@m-allanson
Copy link
Contributor

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Issue with a clear description that the community can help with.
Projects
None yet
Development

No branches or pull requests

5 participants