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

feat: protect branch when init github repo #973

Merged
merged 4 commits into from
Aug 10, 2022

Conversation

csonezp
Copy link
Contributor

@csonezp csonezp commented Aug 9, 2022

Signed-off-by: csonezp csonezp@gmail.com

Pre-Checklist

Note: please complete ALL items in the following checklist.

  • I have read through the CONTRIBUTING.md documentation.
  • My code has the necessary comments and documentation (if needed).
  • I have added relevant tests

Description

repo-scaffolding should protect the default main branch.

I'm not used to using ginkgo, so the test cases may not be well designed, If you find any problem please submit some suggestions

Related Issues

Closes #963

New Behavior (screenshots if needed)

When use repo-scaffolding to create destination repo, protected the default branch.

Signed-off-by: csonezp <csonezp@gmail.com>
@csonezp csonezp requested a review from a team as a code owner August 9, 2022 17:44
pkg/util/github/repo.go Outdated Show resolved Hide resolved
pkg/util/github/repo.go Outdated Show resolved Hide resolved
@iyear
Copy link
Member

iyear commented Aug 10, 2022

@csonezp Thank you so much for the contribution, it's an enhancement to github package!

You can change it to close #963 in the Related Issues. When this PR is merged, the corresponding issue will also be closed

@iyear iyear self-assigned this Aug 10, 2022
Signed-off-by: csonezp <csonezp@gmail.com>
@csonezp
Copy link
Contributor Author

csonezp commented Aug 10, 2022

@iyear Issues mentioned in the conversation have been resolved.

pkg/util/github/repo.go Outdated Show resolved Hide resolved
Signed-off-by: csonezp <csonezp@gmail.com>
Signed-off-by: csonezp <csonezp@gmail.com>
Copy link
Member

@iyear iyear left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome feature!

@iyear
Copy link
Member

iyear commented Aug 10, 2022

We advocate combining similar content from one PR into one commit, see our blog post for details.

Of course for initial contributors, this is not required. You can take note of this the next time you submit a PR.

@csonezp
Copy link
Contributor Author

csonezp commented Aug 10, 2022

We advocate combining similar content from one PR into one commit, see our blog post for details.

Of course for initial contributors, this is not required. You can take note of this the next time you submit a PR.

@iyear In other open source projects I have participated in, the step of squashing commits is done by project members who merge PR, and I didn't find any instructions for squash in the contributor guide, so I keep multiple commits to preserve the review context.

We can add this requirement to the contributor guidelines to prevent other contributors from not knowing this information

@iyear
Copy link
Member

iyear commented Aug 10, 2022

@csonezp Thank you for the reminder, I will discuss this matter within members.

@daniel-hutao daniel-hutao merged commit b41c634 into devstream-io:main Aug 10, 2022
@csonezp csonezp deleted the feature/protect_branch branch August 10, 2022 08:15
@iyear iyear mentioned this pull request Aug 11, 2022
3 tasks
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.

🍀 Proposal: repo scaffolding should protect the default main branch
3 participants