123 Commits

Author SHA1 Message Date
di-sukharev
58369e4df9 1.1.24 v1.1.24 2023-03-28 11:32:17 +08:00
di-sukharev
3d50a67ece 1.1.23 v1.1.23 2023-03-28 11:32:13 +08:00
di-sukharev
a2d03e054c 🔀 chore(CommandsEnum.ts): reorder COMMANDS enum values
🐛 fix(config.ts): add missing new lines
🐛 fix(githook.ts): capitalize OpenCommit and fix grammar
The COMMANDS enum values were reordered to improve readability and consistency. In config.ts, missing new lines were added to improve code readability. In githook.ts, OpenCommit was capitalized and grammar was fixed to improve clarity.
2023-03-28 11:31:42 +08:00
di-sukharev
1c113c2901 style(commit.ts): add question mark to confirm message
feat(commit.ts): add support for pushing to selected remote instead of default remote
refactor(commit.ts): extract push command to a function and reuse it for both default and selected remote
2023-03-28 11:22:57 +08:00
di-sukharev
18dcb8e8c2 docs(CONTRIBUTING.md): fix typo in Contacts section
chore(package.json): change license from ISC to MIT
2023-03-28 11:20:09 +08:00
jessicakuijer
8b17b5e906 fix(commit.ts): add --verbose flag to git push command (#43)
* 🐛 fix(commit.ts): add --verbose flag to git push command
The --verbose flag is added to the git push command to provide more detailed output. This helps with debugging and identifying any issues that may arise during the push process.
2023-03-28 11:18:34 +08:00
Dang Quang Linh
284604f6a4 feat(i18n): add support for Vietnamese (Vietnam) language (vi_VN) (#51)
Co-authored-by: Sukharev <57486732+di-sukharev@users.noreply.github.com>
2023-03-28 11:16:17 +08:00
Esmerlin Joel Mieses
bdce94f2ac [FEAT](i18n): Add support for Spanish language (es_ES) (#58)
<3
2023-03-28 11:15:17 +08:00
Moret84
a3fade4d42 refactor(git.ts): use git rev-parse to get the root directory of the repository (#46)
The function getStagedFiles has been refactored to use git rev-parse to
get the root directory of the repository. This improves the reliability
of the function as it will work regardless of the current working
directory. The root directory is then passed to the git diff command to
get the list of staged files. With only the --relative flag, staged
diff(s) on files in a different same level directory as the current
working one would not be found by the command.
2023-03-24 10:11:50 +08:00
di-sukharev
83906fc704 docs(CONTRIBUTING.md): update branch name in step 6 from master to dev 2023-03-21 18:23:38 +08:00
di-sukharev
e7f7bfc2bd 1.1.22 v1.1.22 2023-03-21 15:52:54 +08:00
di-sukharev
3885ae5893 1.1.21 v1.1.21 2023-03-21 15:52:50 +08:00
di-sukharev
b8e05a5852 refactor(cli.ts): comment out checkIsLatestVersion function call
chore(checkIsLatestVersion.ts): add import for chalk library
2023-03-21 15:52:32 +08:00
di-sukharev
677b7ecad9 1.1.20 v1.1.20 2023-03-21 15:36:20 +08:00
di-sukharev
6ab06f9db3 1.1.19 v1.1.19 2023-03-21 15:36:16 +08:00
di-sukharev
38ac20612b feat(cli.ts): check if the latest version of opencommit is being used on startup
feat(api.ts): add function to get the latest version of opencommit from unpkg.com

feat(commit.ts): add support for pushing to multiple remotes and prompt user to choose which remote to push to

feat(i18n): add support for Portuguese (Brazil) language and translation for commit messages in pt_br.json

feat(utils): add checkIsLatestVersion function to check if the current version is the latest version
fix(git.ts): add --relative flag to getStagedFiles function to return relative paths
2023-03-21 15:36:05 +08:00
di-sukharev
54b8ba7419 chore(package.json): update version to 1.1.18
refactor(commit.ts): rename getStagedGitDiff to getChangedFiles and remove unused import of generateCommitMessageWithChatCompletion
refactor(commit.ts): reformat import statements for better readability

refactor(commit.ts): reformat code for better readability
feat(commit.ts): add support for selecting remote to push to when multiple remotes are available

refactor(commit.ts): remove unnecessary code and fix formatting
feat(commit.ts): add support for extraArgs parameter in generateCommitMessageFromGitDiff function

chore(checkIsLatestVersion.ts): update console message for clarity and readability
fix(git.ts): handle empty output from git command
fix(git.ts): add -- argument to git diff command to handle file names with leading hyphens
refactor(mergeStrings.ts): remove unnecessary whitespace and add missing semicolon
2023-03-21 15:35:04 +08:00
jessicakuijer
ff81d7e1ca feat(commit.ts) : Suggestion for the user to help how to choose where to push code on remotes (#20)
* 🔨 refactor(commit.ts): rename function to getGitRemotes and improve comments
This commit renames the function to getGitRemotes to better reflect its purpose. Additionally, the comments have been improved to better explain the function's behavior.

🚀 chore(commit.ts): add support for pushing to selected remote
This commit adds support for pushing to the selected remote. The user is prompted to choose a remote from the list of available remotes, and the selected remote is used to push the changes. The push command is run with the selected remote as an argument.

🐛 fix(commit.ts): fix formatting and add missing newline at end of file
This commit fixes the formatting of the code and adds a missing newline at the end of the file. The changes do not affect the functionality of the code.

* 🐛 fix(commit.ts): fix push command to include remote name
 feat(commit.ts): add support for multiple remotes
The push command was not including the remote name, which caused the push to fail. This has been fixed. Support for multiple remotes has been added, allowing the user to choose which remote to push to. If there is only one remote, the push command will automatically use that remote.
2023-03-21 15:14:13 +08:00
Nader Zouaoui
a6ccdb5f77 feature request: telling user when new version is available (#35)
*  feat(cli.ts): add checkIsLatestVersion function

This commit adds a new function that checks if the current version of OpenCommit is the latest version. The function uses the getOpenCommitLatestVersion function from the api module to get the latest version of OpenCommit. If the current version is not the latest version, a warning message is printed to the console, informing the user to update to the latest version to get the latest features and bug fixes.
2023-03-21 15:11:48 +08:00
Adriel Bento
fef8027959 feat(i18n): add support for Portuguese (Brazil) language (pt_br) (#34)
* feat(i18n): add support for Portuguese (Brazil) language (pt_br)
2023-03-21 15:09:48 +08:00
Moret84
0f48cc616e fix(git.ts): add relative flag to git diff command (#37)
The relative flag has been added to the git diff command in the
getStagedFiles function. This flag makes the output of the command
relative to the current working directory, which makes it easier to work
with the file paths and enables executing opencommit from anywhere in
the repository, not just from the root.
2023-03-21 15:08:46 +08:00
di-sukharev
b54ff02930 1.1.18 v1.1.18 2023-03-21 15:06:47 +08:00
di-sukharev
7fb46de105 1.1.17 v1.1.17 2023-03-21 15:06:43 +08:00
di-sukharev
2f6e98dc30 style(commit.ts): format code with prettier
refactor(commit.ts): add types to commit function parameters
fix(git.ts): handle empty string returned from getStagedFiles function

refactor(mergeStrings.ts): remove unnecessary blank line and add missing semicolon
2023-03-21 15:06:30 +08:00
di-sukharev
2aa6582c52 Merge remote-tracking branch 'origin/dev' 2023-03-21 14:51:44 +08:00
openefit
2acf833cd0 fix(generateCommitMessageFromGitDiff.ts): remove unnecessary character at the end of the line (#36) 2023-03-19 16:04:06 +08:00
Stuart van Beek
3f7025d50a feat: add support for .opencommitignore file (#22)
* feat: add support for .opencommitignore
2023-03-19 16:01:57 +08:00
Nader Zouaoui
d793bf1340 feat: Add support for extra args to be passed to the git commit command (#17)
* feat: Add support for extra args to be passed to the git commit command
2023-03-19 15:58:21 +08:00
di-sukharev
0092e92061 1.1.16 v1.1.16 2023-03-17 17:51:42 +08:00
di-sukharev
0f33b74942 1.1.15 v1.1.15 2023-03-17 17:51:36 +08:00
di-sukharev
8f0a32275e 1.1.14 v1.1.14 2023-03-17 17:50:39 +08:00
di-sukharev
b3509e34d0 1.1.13 v1.1.13 2023-03-17 14:20:51 +08:00
di-sukharev
5449d5cd61 1.1.12 v1.1.12 2023-03-17 14:20:39 +08:00
di-sukharev
b0d27e62ba Merge remote-tracking branch 'origin/master' into dev 2023-03-17 14:19:23 +08:00
openefit
5ae52cd8bb 🚀 i18n: add internationalization support (#31)
* 🚀  i18n: add internationalization support
2023-03-17 13:57:26 +08:00
Sukharev
57baedd0b0 Feature: add staged files multiple selection (#6) (#27)
* feat: add staged files multiple selection (#6)
2023-03-17 13:53:22 +08:00
di-sukharev
d4fc651fec refactor(git.ts): remove unused code and simplify getDiff function
feat(git.ts): add message for excluded lock files in getDiff function
2023-03-16 23:41:08 +08:00
di-sukharev
04d40b5379 refactor(git.ts): rename someFilesExcludedMessage to showSomeFilesExcludedMessage
feat(git.ts): replace text prompt with outro prompt in showSomeFilesExcludedMessage function
feat(git.ts): add support for showing excluded files message in getStagedFiles, getChangedFiles, gitAdd and getDiff functions
2023-03-16 23:28:47 +08:00
di-sukharev
ec2e4c628c fix(commit.ts): fix typo in outro message
feat(commit.ts): add support for staging all files and generating commit message when no files are staged
feat(commit.ts): add support for committing changes when no files are staged and some files are changed but not staged
2023-03-16 23:15:56 +08:00
di-sukharev
c787329710 chore(README.md): fix capitalization of OpenCommit in setup and usage sections
docs(README.md): fix typo in Git hook section
2023-03-16 23:14:29 +08:00
Vladyslav Kapkan
0d1f72bdec Feature: add staged files multiple selection (#6)
* chore(package.json): add "@bdsqqq/try" dependency
* refactor(api.ts): remove unnecessary whitespace
* refactor(cli.ts): remove unused imports and variables

* refactor(commit.ts): rename getStagedGitDiff to getDif
* refactor(commit.ts): add getStagedFiles and getChangedFiles functions
* feat(commit.ts): add multiselect prompt to select files to stage
* feat(commit.ts): add gitAdd function to stage selected files
* feat(commit.ts): add trytm function to handle errors
* feat(commit.ts): add exitProgram function to exit the program with an error message if an error occurs during execution

* refactor(commit.ts): refactor commit function to handle unstaged files
* feat(commit.ts): add multiselect prompt to select files to add to commit when there are unstaged files

* feat(git.ts): add getStagedFiles function to get list of staged files
* feat(git.ts): add getChangedFiles function to get list of changed files
* feat(git.ts): add gitAdd function to add files to commit
* feat(git.ts): add getDif function to get diff of staged files

* refactor(commit.ts): replace exitProgram function with process.exit(1) to exit the program

* refactor(commit.ts): change message prompt to English in multiselect function

* chore(package.json): add prettier to format code
* refactor(api.ts): remove unnecessary whitespace and comments

* refactor(commit.ts): add missing semicolons and fix formatting
* feat(commit.ts): add support for selecting files to add to the commit when there are changed files but no staged files

* refactor(commit.ts): add isStageAllFlag parameter to commit function
* refactor(commit.ts): add whitespace to getDif function call
* refactor(commit.ts): add whitespace to generateCommitMessageFromGitDiff function call

* refactor(git.ts): reformat code for better readability
* chore(git.ts): add semicolons to the end of each statement

* chore(package.json): remove "@bdsqqq/try" dependency
* refactor(commit.ts): move trytm function to utils/trytm.ts
* refactor(commit.ts): add isStageAllFlag parameter to gitAdd function call in commit function
* refactor(commit.ts): remove getStagedGitDiff function call and use getStagedFiles function call instead
* refactor(commit.ts): add error handling to generateCommitMessageFromGitDiff function call in commit function

* refactor(prepare-commit-msg-hook.ts): rename getStagedGitDiff to getStagedFiles
* feat(prepare-commit-msg-hook.ts): add gitAdd function to stage changes before generating commit message
* refactor(prepare-commit-msg-hook.ts): use getDif function to get staged changes diff instead of staged.diff
* refactor(prepare-commit-msg-hook.ts): remove unnecessary if statement and return statement

* refactor(git.ts): remove StagedDiff interface and getStagedGitDiff function
* feat(git.ts): add support for untracked files in getChangedFiles function
* refactor(git.ts): rename stdout variable in getChangedFiles function
* refactor(git.ts): add excludeBigFilesFromDiff to getDif function
* feat(trytm.ts): add trytm utility function for handling promises with try-catch block

* fix(commit.ts): add missing function call parentheses in return statement

* refactor(commit.ts): remove unused variable generateCommitResponse
* refactor(commit.ts): exit process with code 0 after successful commit

* fix(commit.ts): add check for no changes detected before opening commit prompt

* fix(commit.ts): fix typo in function name from getDif to getDiff
* fix(prepare-commit-msg-hook.ts): fix typo in function name from getDif to getDiff
* refactor(git.ts): rename getDif function to getDiff for consistency and clarity

* chore(git.ts): add excludeBigFilesFromDiff option to getStagedFiles function

* chore(git.ts): import text function from @clack/prompts package

* refactor(git.ts): remove excludeBigFilesFromDiff constant and filter out .lock files from getStagedFiles and getChangedFiles functions
* feat(git.ts): add error message when all staged files are .lock files
* feat(git.ts): add error message when all changed files are .lock files
* feat(git.ts): add warning message when some files are .lock files and excluded from git add and git diff

* refactor(git.ts): add filter to remove empty strings from returned array in getStagedFiles and getChangedFiles functions

* refactor(commit.ts): pass isStageAllFlag to getChangedFiles function
* fix(commit.ts): handle errorStagedFiles and errorChangedFiles variables

* fix(git.ts): filter out empty strings from excludedFiles array
* feat(git.ts): add isStageAllFlag parameter to getChangedFiles function to handle git add --all command

* refactor(git.ts): remove console.log statement from getChangedFiles function and refactor code to improve readability

* refactor(commit.ts): remove unnecessary parameter from getChangedFiles function call
* refactor(git.ts): remove isStageAllFlag parameter from getChangedFiles function and add check for .lock files in the returned files list

* refactor(commit.ts): remove unnecessary line breaks and whitespace
* refactor(commit.ts): remove unnecessary parentheses in function calls

* feat(git.ts): add someFilesExcludedMessage function to display excluded files message
* refactor(git.ts): use someFilesExcludedMessage function instead of text function in getChangedFiles, gitAdd, and getDiff functions

* refactor(git.ts): extract someFilesExcludedMessage function to handle excluded files message
* fix(git.ts): use someFilesExcludedMessage function instead of throwing an error when all staged files are excluded files

* refactor(git.ts): pad excluded files list with 5 spaces

* refactor(git.ts): remove unnecessary padStart method call in someFilesExcludedMessage function
* chore(git.ts): update someFilesExcludedMessage function to improve readability

---------

Co-authored-by: Sukharev <57486732+di-sukharev@users.noreply.github.com>
2023-03-16 22:41:21 +08:00
di-sukharev
5d0c69e849 1.1.11 v1.1.11 2023-03-16 11:48:42 +08:00
di-sukharev
9754442efa chore(README.md): update Twitter handle in header 2023-03-16 11:48:31 +08:00
di-sukharev
a619cd1f78 docs(README.md): update payment information to include GPT-4 cost comparison 2023-03-15 17:35:25 +08:00
di-sukharev
1fc4a6b6c0 1.1.10 v1.1.10 2023-03-15 17:33:55 +08:00
di-sukharev
798bddba81 docs(README.md): remove outdated information about minimum supported version of Node.js 2023-03-15 17:33:43 +08:00
di-sukharev
42ed2a31f4 fix(commit.ts): remove '-u' and 'origin' arguments from git push command to push to the current branch 2023-03-15 14:51:26 +08:00
di-sukharev
571e1e9d8f chore(TODO.md): mark batch small files in one request as completed
refactor(TODO.md): rephrase optimize prompt TODO to suggest exploring cleaner alternatives to prompt
2023-03-15 14:49:38 +08:00
di-sukharev
bd8de7a8ea feat(commit.ts): add '-u origin HEAD' flag to 'git push' command to set upstream branch and push current branch to it 2023-03-15 14:46:15 +08:00
di-sukharev
913bcd379f 1.1.9 v1.1.9 2023-03-14 18:51:06 +08:00