Skip to content

๐Ÿ’ก ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค 42888 - ์˜คํ”ˆ์ฑ„ํŒ…๋ฐฉ #49

๐Ÿ’ก ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค 42888 - ์˜คํ”ˆ์ฑ„ํŒ…๋ฐฉ

๐Ÿ’ก ํ”„๋กœ๊ทธ๋ž˜๋จธ์Šค 42888 - ์˜คํ”ˆ์ฑ„ํŒ…๋ฐฉ #49

Workflow file for this run

# PR ์ƒ์„ฑ๊ณผ ๋ผ๋ฒจ๋ง, ์ฝ”๋“œ๋ฆฌ๋ทฐ๋ฅผ ์œ„ํ•œ ์›Œํฌํ”Œ๋กœ์šฐ
name: PR WorkFlow
on:
push:
branches: [upload]
paths:
- "Baekjoon/**"
- "Leetcode/**"
- "Programmers/**"
pull_request:
types: [opened, reopened, ready_for_review, synchronize]
branches: [main]
issue_comment:
concurrency:
group: pr-${{ github.event.pull_request.number || 'push' }}
cancel-in-progress: false
env:
TZ: Asia/Seoul
MERGE_METHOD: rebase
jobs:
create-pr:
name: Create new PR from upload to main
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push'}}
permissions:
contents: read
pull-requests: write
env:
BASE_BRANCH: main
HEAD_BRANCH: upload
GH_TOKEN: ${{ secrets.ASSISTANT_GITHUB_TOKEN }}
steps:
- name: Check existing PR (upload -> main)
id: find-pr
uses: actions/github-script@v8
with:
script: |
const { owner, repo } = context.repo;
const headRef = `${owner}:${process.env.HEAD_BRANCH}`;
const baseRef = process.env.BASE_BRANCH;
const prs = await github.rest.pulls.list({
owner,
repo,
state: 'open',
head: headRef,
base: baseRef,
per_page: 1,
});
core.setOutput('exists', (prs.data.length > 0).toString());
- name: Checkout (shallow)
if: steps.find-pr.outputs.exists != 'true'
uses: actions/checkout@v4
with:
fetch-depth: 1
- name: Today(KST)
if: steps.find-pr.outputs.exists != 'true'
run: echo "TODAY=$(date +'%Y-%m-%d')" >> "$GITHUB_ENV"
- name: Create PR
if: steps.find-pr.outputs.exists != 'true'
env:
GH_TOKEN: ${{ secrets.ASSISTANT_GITHUB_TOKEN }}
run: |
gh pr create \
--head ${{ env.HEAD_BRANCH }} \
--base ${{ env.BASE_BRANCH }} \
--title "${TODAY} ๋ฌธ์ œ ํ’€์—ˆ์–ด์š”" \
--body "์˜ค๋Š˜๋„ ๋ฉ‹์ ธ์š” ๐Ÿ‘โœจ"
pr-agent:
name: PR Review (Claude)
if: ${{ (github.event_name == 'pull_request' && github.event.sender.type != 'Bot') || (github.event_name == 'issue_comment' && github.event.issue.pull_request && github.event.sender.type != 'Bot') }}
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
contents: write
steps:
- name: PR Agent
uses: qodo-ai/pr-agent@main
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ANTHROPIC.KEY: ${{ secrets.ANTHROPIC_KEY }}
github_action_config.auto_review: "true"
github_action_config.auto_describe: "true"
github_action_config.auto_improve: "true"
github_action_config.pr_actions: '["opened","reopened","ready_for_review","review_requested"]'
labeler:
name: PR labeler
if: ${{ github.event_name == 'pull_request' && github.event.action != 'labeled' }}
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- uses: actions/labeler@v6
with:
repo-token: ${{ secrets.ASSISTANT_GITHUB_TOKEN }}
sync-labels: true