Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Improve integration tests #19

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

Merged

Conversation

@MichaelCurrin
Copy link
Contributor

@MichaelCurrin MichaelCurrin commented Aug 7, 2020
edited
Loading

I noticed running the tests locally that the two .txt files get added to the main repo incorrectly, which messes with the repo.

With this fix, the VS Code window opens in the temp directory and commits are made there. You can see this in the directory name of the open window.

As an extra fix, I added mkdir -p flag for pretest so it does not log an error if the directory exists.

nitayneeman reacted with thumbs up emoji
Copy link
Contributor Author

MichaelCurrin commented Aug 7, 2020
edited
Loading

Also if you don't mind a further refactor, the pretest step can be done in one line:

git init test-temp --quiet

That dir will be created if it does not exist and it can be run repeatedly (it does not erase commits, just resets things like hooks).

Then the scripts directory could be deleted and package.json can be like this.

{
 "scripts" {
 "pretest": "git init test-temp --quiet"
 }
}

Copy link
Contributor Author

Also, thanks for making this repo. I use the extension sometimes and I've used it as a starter for my own extension, which auto generates a commit message based on the files changed. I like your button and pop-up in the source control tab so I am using that for mine.

Copy link
Owner

@nitayneeman nitayneeman left a comment

Choose a reason for hiding this comment

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

Thank you for your contribution, appreciated.

Also, it's very nice to hear that this repository is useful for you both as an extension and a starter kit - that's ok you're using it for your extension. 😊

Copy link
Owner

Also if you don't mind a further refactor, the preset step can be done in one line:

git init test-temp --quiet

That dir will be created if it does not exist and it can be run repeatedly (it does not erase commits, just resets things like hooks).

Then the scripts directory could be deleted and package.json can be like this.

{
 "scripts" {
 "pretest": "git init test-temp --quiet"
 }
}

Sounds great - feel free to open another PR :)

@nitayneeman nitayneeman merged commit 67600ba into nitayneeman:master Aug 9, 2020
@MichaelCurrin MichaelCurrin deleted the improve-integration-tests branch August 12, 2020 09:35
Copy link
Contributor Author

Thanks for merging. Sure, I'll make another PR.

I ended up using a few other packages and extensions and put them together. I gave your extension a mention in my license section, describing which parts I used.

https://github.com/MichaelCurrin/auto-commit-msg/blob/master/README.md#license

nitayneeman reacted with thumbs up emoji

MichaelCurrin added a commit to MichaelCurrin/vscode-git-semantic-commit that referenced this pull request Aug 13, 2020
* fix: Update path to be relative to repo root and not the test dir
* fix: Prevent error logged when dir exists
MichaelCurrin added a commit to MichaelCurrin/vscode-git-semantic-commit that referenced this pull request Aug 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@nitayneeman nitayneeman nitayneeman approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /