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 fork workflow functionality #135

Merged
merged 4 commits into from
Dec 11, 2021
Merged

Conversation

xanjohns
Copy link
Contributor

@xanjohns xanjohns commented Nov 20, 2021

Adds the option of a "fork and pull request" workflow.

Can be enabled by specifying which user/bot account contains the forks, using the FORK input, defaulted to false.

  • Changes to the cloned repository are pushed to the fork, instead of back upstream
  • Pull requests' head is changed to the new branch on the forked repository

The advantage of this style is no write access is required to upstream repositories. This also means, however, that adding labels/assignees is not possible, so that has to be disabled if FORK is specified.

Note: This setup assumes the forks have already been created.

@xanjohns
Copy link
Contributor Author

After having though about it a little more, I think it would make the most sense to include the step of actually forking repositories in this action as well, since we have already parsed the file containing the list of external repositories we are working with. I've added another commit to include the few lines needed to fork.

@xanjohns xanjohns marked this pull request as draft November 23, 2021 22:19
@BetaHuhn
Copy link
Owner

After having though about it a little more, I think it would make the most sense to include the step of actually forking repositories in this action as well

Yeah, makes sense.

Still marked as a draft, is it ready to review?

@xanjohns xanjohns marked this pull request as ready for review December 2, 2021 15:13
@xanjohns
Copy link
Contributor Author

xanjohns commented Dec 2, 2021

Apologies for the slow response, but yes!

src/config.js Outdated Show resolved Hide resolved
@BetaHuhn BetaHuhn changed the base branch from master to develop December 4, 2021 15:55
@BetaHuhn
Copy link
Owner

BetaHuhn commented Dec 4, 2021

Other than the small change, everything looks good to me.

Could you add the FORK input to the end of the Action Inputs table and add an example on how to use it to the examples section in the README?

Will merge it after that.

@xanjohns
Copy link
Contributor Author

I've added FORK to the Action Inputs table and provided an example/description.

@BetaHuhn BetaHuhn changed the title Add basic fork workflow functionality ✨ Add fork workflow functionality Dec 11, 2021
@BetaHuhn BetaHuhn merged commit 80e77fd into BetaHuhn:develop Dec 11, 2021
@BetaHuhn
Copy link
Owner

Thanks!

@BetaHuhnBot
Copy link
Collaborator

🎉 This PR is included in version 1.16.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants