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

build: refactor codebase and improve security #168

Merged
merged 1 commit into from
May 13, 2024
Merged

build: refactor codebase and improve security #168

merged 1 commit into from
May 13, 2024

Conversation

appleboy
Copy link
Owner

  • Add a new .golangci.yml configuration file with a list of linters and a 3-minute timeout setting
  • Refactor commit.go to improve readability by breaking long lines of flag definitions
  • Replace the OpenAI client initialization in commit.go with a call to a new function NewOpenAI
  • Change file permission in commit.go from 644 to 600 when writing the outputFile
  • Fix a typo in an error message in hepler.go (should be helper.go)
  • Create a new openai.go file to handle OpenAI client initialization
  • Remove OpenAI client initialization from review.go and replace it with a call to NewOpenAI
  • Refactor review.go to improve readability by breaking long lines of flag definitions
  • Update error messages in git.go to remove periods at the end
  • Change file permission in git.go from 755 to 600 when writing the hook file

- Add a new `.golangci.yml` configuration file with a list of linters and a 3-minute timeout setting
- Refactor `commit.go` to improve readability by breaking long lines of flag definitions
- Replace the OpenAI client initialization in `commit.go` with a call to a new function `NewOpenAI`
- Change file permission in `commit.go` from `644` to `600` when writing the `outputFile`
- Fix a typo in an error message in `hepler.go` (should be `helper.go`)
- Create a new `openai.go` file to handle OpenAI client initialization
- Remove OpenAI client initialization from `review.go` and replace it with a call to `NewOpenAI`
- Refactor `review.go` to improve readability by breaking long lines of flag definitions
- Update error messages in `git.go` to remove periods at the end
- Change file permission in `git.go` from `755` to `600` when writing the hook file

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
@appleboy appleboy merged commit 3197819 into main May 13, 2024
6 of 8 checks passed
@appleboy appleboy deleted the refactor branch May 13, 2024 03:27
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.

None yet

1 participant