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: Adding SCM option for init command #2342

Merged
merged 12 commits into from
Oct 26, 2024

Conversation

alvgaona
Copy link
Contributor

@alvgaona alvgaona commented Oct 23, 2024

I'm sorry for my boldness. I sometimes work with multiple SCMs and found that this command lacked this feature. Let me know if it's aligned with the project. Feel free to close this PR, otherwise. 😄

@alvgaona alvgaona changed the title Adding SCM option for init command feat: Adding SCM option for init command Oct 23, 2024
@alvgaona
Copy link
Contributor Author

I tested in the 3 SCMs here and works just fine. Let me know if unit tests would be needed for this.

Copy link
Contributor

@ruben-arts ruben-arts left a comment

Choose a reason for hiding this comment

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

Hi, thanks for your input!

Could you add it to the CLI documentation and add some tests? I would like to make sure it is as user friendly as possible by making it auto completing.

src/cli/init.rs Outdated Show resolved Hide resolved
src/cli/init.rs Outdated Show resolved Hide resolved
@alvgaona
Copy link
Contributor Author

Added the use of GitAttributes directly in the scm arg. Now looking to support upper and lowercase for the input strings.

@alvgaona
Copy link
Contributor Author

@ruben-arts would you also like to ignore case in --format?

@ruben-arts
Copy link
Contributor

@ruben-arts would you also like to ignore case in --format?

Yes please!

@alvgaona alvgaona requested a review from ruben-arts October 25, 2024 19:21
}

#[test]
fn test_invalid_scm_values() {
Copy link
Contributor Author

@alvgaona alvgaona Oct 25, 2024

Choose a reason for hiding this comment

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

Not sure how much value this test adds but it doesn't hurt to have an extra test case.

Copy link
Contributor

@ruben-arts ruben-arts left a comment

Choose a reason for hiding this comment

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

Lovely

@ruben-arts ruben-arts merged commit c79cb70 into prefix-dev:main Oct 26, 2024
43 checks passed
@alvgaona alvgaona deleted the scm-option branch October 26, 2024 13:57
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