Skip to content

feat: add flag to bypass the prompt for creating a vscode workspace - #1167

Merged
sweatybridge merged 6 commits into
supabase:mainfrom
nrayburn-tech:feature/init-bypass-vscode-workspace
May 31, 2023
Merged

sweatybridge merged 6 commits into
supabase:mainfrom
nrayburn-tech:feature/init-bypass-vscode-workspace

Conversation

@nrayburn-tech

@nrayburn-tech nrayburn-tech commented May 31, 2023 •

Copy link
Copy Markdown
Contributor

What kind of change does this PR introduce?

Feature, closes #1106.

What is the current behavior?

Users must interact with the prompt to run the init command.

What is the new behavior?

Users can provide a flag to bypass the prompt for the init command. If the flag isn't provided, there isn't any behavior change.

Additional context

Without any argument

nrayburn@nrayburn-macbook cli % go run main.go init                                                                          
Generate VS Code workspace settings? [y/N] y
Open the cli.code-workspace file in VS Code.
Finished supabase init.

With yes/y argument

nrayburn@nrayburn-macbook cli % go run main.go init --create-vscode-workspace=yes                                            
Open the cli.code-workspace file in VS Code.
Finished supabase init.

With no/n argument

nrayburn@nrayburn-macbook cli % go run main.go init --create-vscode-workspace=no 
Finished supabase init.

@nrayburn-tech
nrayburn-tech requested a review from a team as a code owner May 31, 2023 02:40
@coveralls

coveralls commented May 31, 2023 •

Copy link
Copy Markdown

Pull Request Test Coverage Report for Build 5128769591

  • 17 of 21 (80.95%) changed or added relevant lines in 2 files are covered.
  • 7 unchanged lines in 1 file lost coverage.
  • Overall coverage increased (+0.2%) to 63.365%

Changes Missing Coverage Covered Lines Changed/Added Lines %
cmd/init.go 10 12 83.33%
internal/init/init.go 7 9 77.78%
Files with Coverage Reduction New Missed Lines %
internal/gen/keys/keys.go 7 7.94%
Totals Coverage Status
Change from base Build 5118484825: 0.2%
Covered Lines: 4561
Relevant Lines: 7198

💛 - Coveralls

Comment thread cmd/init.go Resolved

@sweatybridge sweatybridge left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for your contribution! Just a minor nitpick to use optional bool value.

Comment thread cmd/init.go Resolved
Comment thread internal/init/init_test.go Resolved
Comment thread internal/init/init_test.go Resolved
Comment thread internal/init/init_test.go Resolved
Comment thread internal/init/init_test.go Resolved
Comment thread internal/init/init_test.go Resolved
@sweatybridge sweatybridge changed the title Add flag to bypass the prompt for creating a vscode workspace feat: add flag to bypass the prompt for creating a vscode workspace May 31, 2023
@sweatybridge
sweatybridge merged commit 029d1ba into supabase:main May 31, 2023
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.

It should be possible to run npx supabase init without human interaction

3 participants