Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Add GitHub Actions workflows: code review and assistant #2

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

Open
moyanbro wants to merge 1 commit into QoderAI:main
base: main
Choose a base branch
Loading
from moyanbro:main
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .github/workflows/assistant.yml
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Qoder Assistant

on:
issue_comment:
types: [created]
pull_request_review_comment:
types: [created]

jobs:
qoder-assistant:
if: |
contains(github.event.comment.body, '@qoder') &&
!endsWith(github.event.comment.user.login, '[bot]')
runs-on: ubuntu-latest
permissions:
contents: read
issues: write
pull-requests: write
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Build Arguments
id: build_args
run: |
ARGS="REPO: ${{ github.repository }}
REQUEST_SOURCE: ${{ github.event_name }}
THREAD_ID: ${{ github.event.comment.node_id }}
COMMENT_ID: ${{ github.event.comment.id }}
AUTHOR: ${{ github.event.comment.user.login }}
BODY: ${{ github.event.comment.body }}
URL: ${{ github.event.comment.html_url }}
IS_PR: ${{ github.event.issue.pull_request != null || github.event_name == 'pull_request_review_comment' }}
ISSUE_OR_PR_NUMBER: ${{ github.event.issue.number || github.event.pull_request.number }}"

if [ -n "${{ github.event.comment.pull_request_review_id }}" ]; then
ARGS="$ARGS
REVIEW_ID: ${{ github.event.comment.pull_request_review_id }}"
fi

if [ -n "${{ github.event.comment.in_reply_to_id }}" ]; then
ARGS="$ARGS
REPLY_TO_COMMENT_ID: ${{ github.event.comment.in_reply_to_id }}"
fi

echo "args<<EOF" >> $GITHUB_OUTPUT
echo "$ARGS" >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT

- name: Run Qoder Assistant
uses: QoderAI/qoder-action@v0
with:
qoder_personal_access_token: ${{ secrets.QODER_PERSONAL_ACCESS_TOKEN }}
prompt: |
/assistant
${{ steps.build_args.outputs.args }}
27 changes: 27 additions & 0 deletions .github/workflows/code-review.yml
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Qoder Auto Code Review

on:
pull_request:
types: [opened, synchronize, reopened]

jobs:
qoder-review:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
id-token: write

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Run Qoder Code Review
uses: QoderAI/qoder-action@v0
with:
qoder_personal_access_token: ${{ secrets.QODER_PERSONAL_ACCESS_TOKEN }}
prompt: |
/review-pr
REPO:${{ github.repository }} PR_NUMBER:${{ github.event.pull_request.number }}

AltStyle によって変換されたページ (->オリジナル) /