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 no commit to main rule #1393

Merged
merged 2 commits into from
Sep 11, 2024
Merged

Add no commit to main rule #1393

merged 2 commits into from
Sep 11, 2024

Conversation

hnyls2002
Copy link
Collaborator

Motivation

Modifications

Checklist

  • Format your code according to the Contributor Guide.
  • Add unit tests as outlined in the Contributor Guide.
  • Update documentation as needed, including docstrings or example tutorials.

@hnyls2002 hnyls2002 requested a review from zhyncs September 11, 2024 21:25
Copy link
Member

@zhyncs zhyncs left a comment

Choose a reason for hiding this comment

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

What’s the motivation?

@hnyls2002
Copy link
Collaborator Author

What’s the motivation?

To prevent accidentally push to main

- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: no-commit-to-branch
Copy link
Member

Choose a reason for hiding this comment

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

Shall we specify the branch args?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The default branch args is main and master

@zhyncs zhyncs merged commit 4462137 into main Sep 11, 2024
1 check passed
@zhyncs zhyncs deleted the no-commit-to-main branch September 11, 2024 21:40
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.

2 participants