Skip to content

Commit

Permalink
Feat: ET-1375: Update README to include Quickstart (#5)
Browse files Browse the repository at this point in the history
* chore: ET-1375: update package version to 1.0.0-beta and update Azure configuration in README.md

* feat: ET-1375: Update package lock

---------

Co-authored-by: Matthew Salter <[email protected]>
  • Loading branch information
mattsalt123 and Matthew Salter authored Nov 3, 2023
1 parent 9a1e4c3 commit aba0790
Show file tree
Hide file tree
Showing 3 changed files with 38 additions and 7 deletions.
39 changes: 35 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,42 @@
## DVLA Usage
# DVLA Usage
This is a fork of [OpenCommit](https://github.com/di-sukharev/opencommit).
- It includes functionality to use Azure OpenAPI service as a backend originating from this [pull request](https://github.com/di-sukharev/opencommit/pull/167).
- The package has been renamed to `@dvla/opencommit` for internal use.
- The MIT License still applies and references the contribution from the original author `Dima Sukharev`.

&nbsp;
&nbsp;
## Quickstart

1) Create a file `~/.opencommit` with the following contents:
```
OCO_OPENAI_API_KEY=<your Azure API token>
OCO_OPENAI_BASE_PATH=<azure path for example: https://EXAMPLE.openai.azure.com/>
OCO_OPENAI_API_TYPE=azure
OCO_AZURE_DEPLOYMENT=turbo-613
OCO_AZURE_API_VERSION=2023-07-01-preview
OCO_ISSUE_ENABLED=true
OCO_ISSUE_PREFIX=ET-
```

2) Download the latest release .tgz file from [OpenCommit Releases](https://github.com/dvla/opencommit/releases)

3) Install OpenCommit globally to use in any repository using the latest release file:
```
npm install -g /PATH-TO-FILE
```
4) You can then call OpenCommit directly to generate a commit message for your staged changes in your project:

```sh
git add <files...>
opencommit
```

You can also use the `oco` shortcut:

```sh
git add <files...>
oco
```

&nbsp;
&nbsp;

Expand Down Expand Up @@ -98,7 +129,7 @@ OCO_MODEL=<either 'gpt-4', 'gpt-3.5-turbo-16k' (default), 'gpt-3.5-turbo-0613' o
#### Azure Config

```env
OCO_OPENAI_API_TYPE='azure'
OCO_OPENAI_API_TYPE=azure
OCO_OPENAI_API_KEY=<your Azure API token>
OCO_OPENAI_BASE_PATH=<azure path for example: https://EXAMPLE.openai.azure.com/>
OCO_AZURE_DEPLOYMENT=<azure deployment name>
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@dvla/opencommit",
"version": "1.0.0-alpha",
"version": "1.0.0-beta",
"description": "Auto-generate impressive commits in 1 second. Killing lame commits with AI 🤯🔫",
"keywords": [
"git",
Expand Down

0 comments on commit aba0790

Please sign in to comment.