GitHub
GitHub 이슈 및 풀 리퀘스트에서 Dropstone을 사용하세요.
Dropstone은 GitHub 워크플로우와 통합됩니다. 모든 댓글에서 /dropstone을 언급하면 Dropstone이 GitHub Actions 러너 내에서 작업을 실행합니다.
기능
- 이슈 분류: Dropstone에 이슈를 살펴보고 설명해달라고 요청하세요.
- 수정 및 구현: Dropstone에 이슈를 수정하거나 기능을 구현해달라고 요청하세요. 새 브랜치에서 작업하고 모든 변경 사항이 포함된 PR을 제출합니다.
- 보안: Dropstone은 GitHub의 러너 내에서 실행됩니다.
설치
GitHub 저장소에 있는 프로젝트에서 다음 명령을 실행하세요:
dropstone github install
이 명령은 GitHub 앱 설치, 워크플로우 생성 및 시크릿 설정을 안내합니다.
수동 설정
또는 수동으로 설정할 수 있습니다.
-
GitHub 앱 설치
github.com/apps/dropstone-agent로 이동하세요. 대상 저장소에 설치되어 있는지 확인하세요.
-
워크플로우 추가
저장소의
.github/workflows/dropstone.yml에 다음 워크플로우 파일을 추가하세요.env에서 적절한model과 필수 API 키를 설정해야 합니다.name: dropstone on: issue_comment: types: [created] pull_request_review_comment: types: [created] jobs: dropstone: if: contains(github.event.comment.body, '/dropstone') runs-on: ubuntu-latest permissions: id-token: write steps: - name: Checkout repository uses: actions/checkout@v6 with: fetch-depth: 1 persist-credentials: false - name: Run Dropstone uses: blankline-org/dropstone-cli/github@latest env: DROPSTONE_API_KEY: ${{ secrets.DROPSTONE_API_KEY }} with: model: dropstone/dropstone-pro # share: true # github_token: xxxx -
저장소 시크릿에 API 키 저장
조직 또는 저장소 Settings에서 왼쪽의 Secrets and variables를 확장하고 Actions를 선택하세요.
DROPSTONE_API_KEY를 새 저장소 시크릿으로 추가하세요.
구성
-
model: 사용할 Dropstone 티어입니다.dropstone/dropstone-fast,dropstone/dropstone-pro또는dropstone/dropstone-heavy중 하나입니다. 이는 필수입니다. -
agent: 사용할 에이전트입니다. 기본 에이전트여야 합니다. 찾을 수 없으면 config의default_agent또는"build"로 폴백됩니다. -
share: Dropstone 세션을 공유할지 여부입니다. 공개 저장소의 경우 기본값은 true입니다. -
prompt: 기본 동작을 재정의하는 선택적 사용자 정의 프롬프트입니다. 이를 사용하여 Dropstone이 요청을 처리하는 방식을 사용자 정의하세요. -
token: 댓글 생성, 변경 사항 커밋 및 풀 리퀘스트 열기와 같은 작업을 수행하기 위한 선택적 GitHub 액세스 토큰입니다. 기본적으로 Dropstone은 Dropstone GitHub 앱의 설치 액세스 토큰을 사용하므로 커밋, 댓글 및 풀 리퀘스트는 앱에서 오는 것으로 표시됩니다.또는 Dropstone GitHub 앱을 설치하지 않고 GitHub Action 러너의 내장
GITHUB_TOKEN을 사용할 수 있습니다. 워크플로우에서 필수 권한을 부여해야 합니다:permissions: id-token: write contents: write pull-requests: write issues: write필요한 경우 개인 액세스 토큰(PAT)을 사용할 수도 있습니다.
지원되는 이벤트
Dropstone은 다음 GitHub 이벤트로 트리거될 수 있습니다:
| 이벤트 유형 | 트리거 대상 | 세부 정보 |
|---|---|---|
issue_comment | 이슈 또는 PR에 댓글 달기 | 댓글에서 /dropstone을 언급하세요. Dropstone이 컨텍스트를 읽고 브랜치를 생성하거나 PR을 열거나 응답할 수 있습니다. |
pull_request_review_comment | PR의 특정 코드 라인에 댓글 달기 | 코드를 검토하는 동안 /dropstone을 언급하세요. Dropstone이 파일 경로, 라인 번호 및 diff 컨텍스트를 받습니다. |
issues | 이슈 열기 또는 편집 | 이슈가 생성되거나 수정될 때 자동으로 Dropstone을 트리거합니다. prompt 입력이 필요합니다. |
pull_request | PR 열기 또는 업데이트 | PR이 열리거나, 동기화되거나, 다시 열릴 때 자동으로 Dropstone을 트리거합니다. 자동화된 검토에 유용합니다. |
schedule | Cron 기반 일정 | 일정에 따라 Dropstone을 실행합니다. prompt 입력이 필요합니다. 출력은 로그 및 PR로 이동합니다(댓글 달 이슈 없음). |
workflow_dispatch | GitHub UI에서 수동 트리거 | Actions 탭을 통해 요청 시 Dropstone을 트리거합니다. prompt 입력이 필요합니다. 출력은 로그 및 PR로 이동합니다. |
일정 예제
자동화된 작업을 수행하기 위해 일정에 따라 Dropstone을 실행하세요:
name: Scheduled Dropstone Task
on:
schedule:
- cron: "0 9 * * 1" # Every Monday at 9am UTC
jobs:
dropstone:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
pull-requests: write
issues: write
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
persist-credentials: false
- name: Run Dropstone
uses: blankline-org/dropstone-cli/github@latest
env:
DROPSTONE_API_KEY: ${{ secrets.DROPSTONE_API_KEY }}
with:
model: dropstone/dropstone-pro
prompt: |
Review the codebase for any TODO comments and create a summary.
If you find issues worth addressing, open an issue to track them.
예약된 이벤트의 경우 댓글에서 지시사항을 추출할 수 없으므로 prompt 입력이 필수입니다. 예약된 워크플로우는 권한을 확인할 사용자 컨텍스트 없이 실행되므로 Dropstone이 브랜치나 PR을 생성할 것으로 예상되면 워크플로우가 contents: write 및 pull-requests: write를 부여해야 합니다.
풀 리퀘스트 예제
PR이 열리거나 업데이트될 때 자동으로 PR을 검토하세요:
name: dropstone-review
on:
pull_request:
types: [opened, synchronize, reopened, ready_for_review]
jobs:
review:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
pull-requests: read
issues: read
steps:
- uses: actions/checkout@v6
with:
persist-credentials: false
- uses: blankline-org/dropstone-cli/github@latest
env:
DROPSTONE_API_KEY: ${{ secrets.DROPSTONE_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
model: dropstone/dropstone-pro
use_github_token: true
prompt: |
Review this pull request:
- Check for code quality issues
- Look for potential bugs
- Suggest improvements
pull_request 이벤트의 경우 prompt가 제공되지 않으면 Dropstone은 기본적으로 풀 리퀘스트를 검토합니다.
이슈 분류 예제
새 이슈를 자동으로 분류합니다. 이 예제는 스팸을 줄이기 위해 30일 이상 된 계정으로 필터링합니다:
name: Issue Triage
on:
issues:
types: [opened]
jobs:
triage:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: write
pull-requests: write
issues: write
steps:
- name: Check account age
id: check
uses: actions/github-script@v7
with:
script: |
const user = await github.rest.users.getByUsername({
username: context.payload.issue.user.login
});
const created = new Date(user.data.created_at);
const days = (Date.now() - created) / (1000 * 60 * 60 * 24);
return days >= 30;
result-encoding: string
- uses: actions/checkout@v6
if: steps.check.outputs.result == 'true'
with:
persist-credentials: false
- uses: blankline-org/dropstone-cli/github@latest
if: steps.check.outputs.result == 'true'
env:
DROPSTONE_API_KEY: ${{ secrets.DROPSTONE_API_KEY }}
with:
model: dropstone/dropstone-pro
prompt: |
Review this issue. If there's a clear fix or relevant docs:
- Provide documentation links
- Add error handling guidance for code examples
Otherwise, do not comment.
issues 이벤트의 경우 댓글에서 지시사항을 추출할 수 없으므로 prompt 입력이 필수입니다.
사용자 정의 프롬프트
기본 프롬프트를 재정의하여 워크플로우에 맞게 Dropstone의 동작을 사용자 정의하세요.
- uses: blankline-org/dropstone-cli/github@latest
with:
model: dropstone/dropstone-pro
prompt: |
Review this pull request:
- Check for code quality issues
- Look for potential bugs
- Suggest improvements
이는 프로젝트와 관련된 특정 검토 기준, 코딩 표준 또는 초점 영역을 적용하는 데 유용합니다.
예제
GitHub에서 Dropstone을 사용하는 방법의 예제입니다.
-
이슈 설명
GitHub 이슈에 이 댓글을 추가하세요.
/dropstone explain this issueDropstone이 모든 댓글을 포함한 전체 스레드를 읽고 명확한 설명으로 응답합니다.
-
이슈 수정
GitHub 이슈에서 다음과 같이 말하세요:
/dropstone fix thisDropstone이 새 브랜치를 생성하고 변경 사항을 구현한 후 변경 사항이 포함된 PR을 엽니다.
-
PR 검토 및 변경 사항 적용
GitHub PR에 다음 댓글을 남기세요.
/dropstone delete the attachment from S3 when the note is removedDropstone이 요청된 변경 사항을 구현하고 동일한 PR에 커밋합니다.
-
특정 코드 라인 검토
PR의 "Files" 탭에서 코드 라인에 직접 댓글을 남기세요. Dropstone이 자동으로 파일, 라인 번호 및 diff 컨텍스트를 감지하여 정확한 응답을 제공합니다.
[Comment on specific lines in Files tab] /dropstone add error handling here특정 라인에 댓글을 달 때 Dropstone은 다음을 받습니다:
- 검토 중인 정확한 파일
- 특정 코드 라인
- 주변 diff 컨텍스트
- 라인 번호 정보
이를 통해 파일 경로나 라인 번호를 수동으로 지정할 필요 없이 더 정확한 요청을 할 수 있습니다.