Skip to content

Commit

Permalink
Cleaned up dev deps and added gpt-review and squash-merge-to-prod git…
Browse files Browse the repository at this point in the history
…hub actions
  • Loading branch information
jkbhagatio committed Aug 27, 2023
1 parent 4948775 commit 747777b
Show file tree
Hide file tree
Showing 3 changed files with 83 additions and 8 deletions.
56 changes: 56 additions & 0 deletions .github/workflows/gpt_pr_review.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: gpt_pr_review
permissions:
contents: read
pull-requests: write
on:
pull_request:
branches: [ main ]
types: [opened, reopened, synchronize]
pull_request_review_comment:
branches: [ main ]
types: [created]
concurrency:
group: >
${{ github.repository }}-${{ github.event.number || github.head_ref || github.sha }}-${{
github.workflow }}-${{ github.event_name == 'pull_request_review_comment' && 'pr_comment' || 'pr' }}
cancel-in-progress: ${{ github.event_name != 'pull_request_review_comment' }}
jobs:
gpt_pr_review:
runs-on: ubuntu-latest
steps:
- uses: coderabbitai/ai-pr-reviewer@latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
with:
system_message: >
Your purpose is to act as a highly experienced
software engineer and provide a thorough review of the code hunks
and suggest code snippets to improve key areas such as:
- Logic
- Security
- Performance
- Data races
- Consistency
- Error handling
- Maintainability
- Modularity
- Complexity
- Optimization
- Best practices: DRY, SOLID, KISS
Identify and resolve significant concerns to improve overall code
quality while deliberately disregarding minor issues.
summarize: >
Provide your final response in markdown with the following content:
- **Walkthrough**: A high-level summary of the overall change instead of
specific files within 100 words.
- **Changes**: A markdown table of files and their summaries. Group files
with similar changes together into a single row to save space.
Avoid additional commentary as this summary will be added as a comment on the
GitHub pull request. Use the titles "Walkthrough" and "Changes" and they must be H2.
summarize_release_notes: >
Craft concise release notes for the pull request.
Focus on the purpose and user impact, categorizing changes as New Feature, Bug Fix,
Documentation, Refactor, Style, Test, Chore, or Revert. Provide a bullet-point list,
e.g. "- New Feature: Added search functionality to the UI." Limit your response to 50-100 words
and emphasize features visible to the end-user while omitting code-level details.
24 changes: 24 additions & 0 deletions .github/workflows/squash_merge_to_prod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: squash_merge_to_prod
on:
push:
branches: [ main ]
jobs:
squash_merge_to_prod:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Configure Git
run: |
git config user.name "Jai Bhagat"
git config user.email "[email protected]"
- name: Merge and squash to prod
run: |
git checkout prod
# Get the latest commit message from the 'main' branch
COMMIT_MSG=$(git log main -1 --pretty=format:%s)
git merge --squash main
git commit -m "$COMMIT_MSG"
git push origin prod
11 changes: 3 additions & 8 deletions env_config/env_dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,15 @@ channels:
- conda-forge
- defaults
dependencies:
- bandit
- black
- flake8
- flake8-bugbear
- flake8-docstrings
- flake8-pyproject
- gh
- ipdb
- isort
- mypy
- pre-commit
- pydantic
- pydantic
- pyright
- pytest
- pytest-cov
- ruff
- sphinx
- tox
- pip:
Expand Down

0 comments on commit 747777b

Please sign in to comment.