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

feat(#3040): gpt code review #3044

Merged
merged 6 commits into from
Apr 8, 2024
Merged

feat(#3040): gpt code review #3044

merged 6 commits into from
Apr 8, 2024

Conversation

h1alexbel
Copy link
Contributor

@h1alexbel h1alexbel commented Apr 3, 2024

closes #3040


PR-Codex overview

This PR focuses on implementing an AI Code Reviewer workflow using ChatGPT for code reviews in GitHub pull requests.

Detailed summary

  • Deleted .github/workflows/ai-code-reviewer.yml
  • Added cr.yml for AI Code Reviewer workflow
  • Defined permissions for reading contents and writing issues/pull requests
  • Triggered on PR open, reopen, and synchronize events
  • Configured job to run on Ubuntu 20.04
  • Utilizes anc95/ChatGPT-CodeReview action for code review
  • Set environment variables for GitHub token, OpenAI API key, language, API endpoint, model, prompt, and parameters

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

@h1alexbel
Copy link
Contributor Author

h1alexbel commented Apr 3, 2024

still occurring the same error:

Error: Resource not accessible by integration
...

I've found this existing issue in https://github.com/anc95/ChatGPT-CodeReview action. Pinged their architect and described my case

@h1alexbel
Copy link
Contributor Author

as well as we don't have OPENAI_API_KEY set inside secrets:

env:
    GITHUB_TOKEN: ***
    OPENAI_API_KEY: 
    LANGUAGE: English
    OPENAI_API_ENDPOINT: https://api.openai.com/v1
    MODEL: gpt-[4](https://github.com/objectionary/eo/actions/runs/8540615489/job/23398023016?pr=3044#step:3:4)
    PROMPT: Please check if there are any confusions or irregularities in the following code diff
    top_p: 1
    temperature: 1
    max_tokens: 10000
    MAX_PATCH_LENGTH: [10](https://github.com/objectionary/eo/actions/runs/8540615489/job/23398023016?pr=3044#step:3:10)000

it's quite strange since we have the same reference for reports-check.yml:

openai_token: ${{ secrets.OPENAI_API_KEY }}

@yegor256 yegor256 merged commit ad2d838 into objectionary:master Apr 8, 2024
17 checks passed
@h1alexbel h1alexbel deleted the 3040 branch April 8, 2024 08:10
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.

Migrate aicode-reviewer action with chatgpt-codereviewer
2 participants