mirror of
https://github.com/crewAIInc/crewAI.git
synced 2026-07-01 13:18:10 +00:00
Switch docs.crewai.com from navigation-only versioning (every version selector entry rendered the same docs/<lang>/* source files) to Mintlify's directory-based versioning so each version selector entry renders its own snapshot. Add an "Edge" channel under docs/edge/<lang>/* that always reflects main HEAD for unreleased work, eliminating pre-release leakage onto frozen release labels. External links to canonical /<lang>/* URLs are preserved via wildcard redirects that always land on the current default version. Layout: - docs/edge/<lang>/* rolling source (you edit here) - docs/edge/enterprise-api.*.yaml - docs/v<X.Y.Z>/<lang>/* frozen, immutable snapshots - docs/v<X.Y.Z>/enterprise-api.*.yaml - docs/images/ shared, append-only - docs/docs.json nav + redirects URLs follow the Mintlify-idiomatic shape: /edge/<lang>/<page> for Edge, /v<X.Y.Z>/<lang>/<page> for every frozen snapshot. The wildcard redirects /<lang>/:slug* -> /<default>/<lang>/:slug* keep stale links working, and every freeze rewrites them (plus all per-section/per-page redirects) so destinations always resolve to the current default without depending on a second redirect hop. Release flow integration (devtools release): - New module crewai_devtools.docs_versioning.freeze() materialises docs/v<X.Y.Z>/ from docs/edge/, rewrites openapi: refs inside the snapshot, inserts the version into every language block in docs.json, and refreshes all redirect destinations. - _update_docs_and_create_pr() in cli.py now calls that freeze during Phase 2 of devtools release. Edge changelogs are updated first (so the snapshot freeze picks them up), then the snapshot is staged alongside docs.json, branched as docs/freeze-v<X.Y.Z>, and the PR is titled [docs-freeze] docs: snapshot and changelog for v<X.Y.Z> — the title prefix the new CI guard reads. - The PR still gates tag, GitHub release, PyPI publish, and the enterprise release as before; no new PRs are added. - Pre-releases (1.X.YaN, 1.X.YbN, ...) skip the snapshot — they ride Edge — and the docs PR title omits the [docs-freeze] prefix. - docs_check (AI-generated docs scaffolding) writes to docs/edge/<lang>/* so newly-generated unreleased docs land in Edge and never accidentally touch a frozen snapshot. Migration scripts (one-shot): - scripts/docs/freeze_historical_versions.py reconstructs all 16 historical snapshots (v1.10.0 .. v1.14.7) from git tags via git archive | tar, rewriting openapi: MDX refs so each snapshot reads its own enterprise-api YAML rather than the live one. - scripts/docs/prefix_version_paths.py one-shot-migrates docs.json: rewrites every page path in 16 versioned blocks to point under docs/v<X.Y.Z>/, inserts a new Edge entry per language, tags v1.14.7 as Latest (default), prunes pages whose target file doesn't exist in the snapshot (e.g. docs/ar/ didn't exist before v1.12.0), and writes the wildcard + per-section redirects. - scripts/docs/freeze_current_edge.py is now a thin CLI wrapper around docs_versioning.freeze for manual one-off freezes (e.g. retroactively snapshotting a forgotten release). CI guards (.github/workflows/docs-snapshots.yml): - Frozen snapshots under docs/v[0-9]*/ are immutable; only PRs whose title contains [docs-freeze] (i.e. release-cut PRs generated by devtools release or the manual wrapper) may modify them. - Images under docs/images/ are append-only since snapshots share a single image directory. Deleting or renaming an image breaks every historical snapshot that still references it. Restored docs/images/crewai-otel-export.png from PR #3673; it was deleted in PR #4908 but v1.10.0 / v1.10.1 snapshots still reference it. Restoring instead of editing the snapshots preserves historical rendering fidelity and validates the new append-only rule retroactively. Tests: - lib/devtools/tests/test_docs_versioning.py covers the freeze: file copy, openapi rewrite, version insertion, default demotion, redirect upserts, per-section redirect rewriting, idempotency, and invalid inputs. Verified locally with mintlify broken-links: 0 broken links across the full site (Edge + 16 frozen versions, 4 locales). AGENTS.md (repo root) is the contributor guide for the new model; RELEASING.md is the release-cut runbook; README's Contribution section links to both. Co-authored-by: Cursor <cursoragent@cursor.com>
333 lines
13 KiB
Plaintext
333 lines
13 KiB
Plaintext
---
|
|
title: GitHub 통합
|
|
description: "CrewAI를 위한 GitHub 통합을 통한 리포지토리 및 이슈 관리."
|
|
icon: "github"
|
|
mode: "wide"
|
|
---
|
|
|
|
## 개요
|
|
|
|
에이전트가 GitHub를 통해 리포지토리, 이슈, 릴리스를 관리할 수 있도록 지원합니다. 이슈를 생성 및 업데이트하고, 릴리스를 관리하고, 프로젝트 개발을 추적하며, AI 기반 자동화를 통해 소프트웨어 개발 워크플로우를 효율화하세요.
|
|
|
|
## 사전 요구 사항
|
|
|
|
GitHub 통합을 사용하기 전에 다음을 확인하세요:
|
|
|
|
- 활성 구독이 있는 [CrewAI AMP](https://app.crewai.com) 계정
|
|
- 해당 리포지토리에 대한 적절한 권한이 있는 GitHub 계정
|
|
- [통합 페이지](https://app.crewai.com/crewai_plus/connectors)를 통해 GitHub 계정 연결 완료
|
|
|
|
## GitHub 연동 설정
|
|
|
|
### 1. GitHub 계정 연결하기
|
|
|
|
1. [CrewAI AMP Integrations](https://app.crewai.com/crewai_plus/connectors)로 이동합니다.
|
|
2. 인증 통합 섹션에서 **GitHub**을 찾습니다.
|
|
3. **Connect**를 클릭하고 OAuth 흐름을 완료합니다.
|
|
4. 리포지토리 및 이슈 관리를 위한 필수 권한을 부여합니다.
|
|
5. [통합 설정](https://app.crewai.com/crewai_plus/settings/integrations)에서 Enterprise Token을 복사합니다.
|
|
|
|
### 2. 필수 패키지 설치
|
|
|
|
```bash
|
|
uv add crewai-tools
|
|
```
|
|
|
|
### 3. 환경 변수 설정
|
|
|
|
<Note>
|
|
`Agent(apps=[])`와 함께 통합을 사용하려면 Enterprise Token으로
|
|
`CREWAI_PLATFORM_INTEGRATION_TOKEN` 환경 변수를 설정해야 합니다.
|
|
</Note>
|
|
|
|
```bash
|
|
export CREWAI_PLATFORM_INTEGRATION_TOKEN="your_enterprise_token"
|
|
```
|
|
|
|
또는 `.env` 파일에 추가하세요:
|
|
|
|
```
|
|
CREWAI_PLATFORM_INTEGRATION_TOKEN=your_enterprise_token
|
|
```
|
|
|
|
## 사용 가능한 작업
|
|
|
|
<AccordionGroup>
|
|
<Accordion title="github/create_issue">
|
|
**설명:** GitHub에 이슈를 생성합니다.
|
|
|
|
**파라미터:**
|
|
- `owner` (string, 필수): 소유자 - 이 이슈와 연관된 저장소의 계정 소유자 이름을 지정합니다. (예시: "abc").
|
|
- `repo` (string, 필수): 저장소 - 이 이슈와 연관된 저장소 이름을 지정합니다.
|
|
- `title` (string, 필수): 이슈 제목 - 생성할 이슈의 제목을 지정합니다.
|
|
- `body` (string, 선택): 이슈 본문 - 생성할 이슈의 본문 내용을 지정합니다.
|
|
- `assignees` (string, 선택): 담당자 - 이 이슈의 담당자 GitHub 로그인을 문자열 배열로 지정합니다. (예시: `["octocat"]`).
|
|
|
|
</Accordion>
|
|
|
|
<Accordion title="github/update_issue">
|
|
**설명:** GitHub에서 이슈를 업데이트합니다.
|
|
|
|
**파라미터:**
|
|
- `owner` (string, 필수): 소유자 - 이 이슈와 연관된 저장소의 계정 소유자 이름을 지정합니다. (예시: "abc").
|
|
- `repo` (string, 필수): 저장소 - 이 이슈와 연관된 저장소 이름을 지정합니다.
|
|
- `issue_number` (string, 필수): 이슈 번호 - 업데이트할 이슈의 번호를 지정합니다.
|
|
- `title` (string, 필수): 이슈 제목 - 업데이트할 이슈의 제목을 지정합니다.
|
|
- `body` (string, 선택): 이슈 본문 - 업데이트할 이슈의 본문 내용을 지정합니다.
|
|
- `assignees` (string, 선택): 담당자 - 이 이슈의 담당자 GitHub 로그인을 문자열 배열로 지정합니다. (예시: `["octocat"]`).
|
|
- `state` (string, 선택): 상태 - 이슈의 변경된 상태를 지정합니다.
|
|
- 옵션: `open`, `closed`
|
|
|
|
</Accordion>
|
|
|
|
<Accordion title="github/get_issue_by_number">
|
|
**설명:** GitHub에서 번호로 이슈를 조회합니다.
|
|
|
|
**파라미터:**
|
|
- `owner` (string, 필수): 소유자 - 이 이슈와 연관된 저장소의 계정 소유자 이름을 지정합니다. (예시: "abc").
|
|
- `repo` (string, 필수): 저장소 - 이 이슈와 연관된 저장소 이름을 지정합니다.
|
|
- `issue_number` (string, 필수): 이슈 번호 - 가져올 이슈의 번호를 지정합니다.
|
|
|
|
</Accordion>
|
|
|
|
<Accordion title="github/lock_issue">
|
|
**설명:** GitHub에서 이슈를 잠급니다.
|
|
|
|
**파라미터:**
|
|
- `owner` (string, 필수): 소유자 - 이 이슈와 연관된 저장소의 계정 소유자 이름을 지정합니다. (예시: "abc").
|
|
- `repo` (string, 필수): 저장소 - 이 이슈와 연관된 저장소 이름을 지정합니다.
|
|
- `issue_number` (string, 필수): 이슈 번호 - 잠글 이슈의 번호를 지정합니다.
|
|
- `lock_reason` (string, 필수): 잠금 사유 - 이슈 또는 풀 리퀘스트 대화에 대한 잠금 이유를 지정합니다.
|
|
- 옵션: `off-topic`, `too heated`, `resolved`, `spam`
|
|
|
|
</Accordion>
|
|
|
|
<Accordion title="github/search_issue">
|
|
**설명:** GitHub에서 이슈를 검색합니다.
|
|
|
|
**파라미터:**
|
|
- `owner` (string, 필수): 소유자 - 이 이슈와 연관된 저장소의 계정 소유자 이름을 지정합니다. (예시: "abc").
|
|
- `repo` (string, 필수): 저장소 - 이 이슈와 연관된 저장소 이름을 지정합니다.
|
|
- `filter` (object, 필수): 불리언 표준형의 필터 - 단일 조건의 AND 그룹의 OR 조합.
|
|
```json
|
|
{
|
|
"operator": "OR",
|
|
"conditions": [
|
|
{
|
|
"operator": "AND",
|
|
"conditions": [
|
|
{
|
|
"field": "assignee",
|
|
"operator": "$stringExactlyMatches",
|
|
"value": "octocat"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
```
|
|
사용 가능한 필드: `assignee`, `creator`, `mentioned`, `labels`
|
|
|
|
</Accordion>
|
|
|
|
<Accordion title="github/create_release">
|
|
**설명:** GitHub에 릴리스를 생성합니다.
|
|
|
|
**파라미터:**
|
|
- `owner` (string, 필수): 소유자 - 이 릴리스와 연관된 저장소의 계정 소유자 이름을 지정합니다. (예시: "abc").
|
|
- `repo` (string, 필수): 저장소 - 이 릴리스와 연관된 저장소 이름을 지정합니다.
|
|
- `tag_name` (string, 필수): 이름 - 생성할 릴리스 태그의 이름을 지정합니다. (예시: "v1.0.0").
|
|
- `target_commitish` (string, 선택): 대상 - 릴리스의 대상을 지정합니다. 브랜치 이름이나 커밋 SHA가 될 수 있으며, 기본값은 메인 브랜치입니다. (예시: "master").
|
|
- `body` (string, 선택): 본문 - 이 릴리스에 대한 설명을 지정합니다.
|
|
- `draft` (string, 선택): 초안 - 생성할 릴리스를 초안(비공개) 릴리스로 지정할지 여부를 지정합니다.
|
|
- 옵션: `true`, `false`
|
|
- `prerelease` (string, 선택): 프리릴리스 - 생성할 릴리스를 프리릴리스로 지정할지 여부를 지정합니다.
|
|
- 옵션: `true`, `false`
|
|
- `discussion_category_name` (string, 선택): 토론 카테고리 이름 - 지정 시, 해당 카테고리의 토론이 생성되어 릴리스와 연결됩니다. 값은 저장소에 이미 존재하는 카테고리여야 합니다.
|
|
- `generate_release_notes` (string, 선택): 릴리스 노트 - 지정한 이름과 본문을 사용하여 릴리스 노트를 자동으로 생성할지 여부를 지정합니다.
|
|
- 옵션: `true`, `false`
|
|
|
|
</Accordion>
|
|
|
|
<Accordion title="github/update_release">
|
|
**설명:** GitHub에서 릴리스를 업데이트합니다.
|
|
|
|
**파라미터:**
|
|
- `owner` (string, 필수): 소유자 - 이 릴리스와 연관된 저장소의 계정 소유자 이름을 지정합니다. (예시: "abc").
|
|
- `repo` (string, 필수): 저장소 - 이 릴리스와 연관된 저장소 이름을 지정합니다.
|
|
- `id` (string, 필수): 릴리스 ID - 업데이트할 릴리스의 ID를 지정합니다.
|
|
- `tag_name` (string, 선택): 이름 - 업데이트할 릴리스 태그의 이름을 지정합니다. (예시: "v1.0.0").
|
|
- `target_commitish` (string, 선택): 대상 - 릴리스의 대상을 지정합니다. 브랜치 이름이나 커밋 SHA가 될 수 있으며, 기본값은 메인 브랜치입니다. (예시: "master").
|
|
- `body` (string, 선택): 본문 - 이 릴리스에 대한 설명을 지정합니다.
|
|
- `draft` (string, 선택): 초안 - 생성할 릴리스를 초안(비공개) 릴리스로 지정할지 여부를 지정합니다.
|
|
- 옵션: `true`, `false`
|
|
- `prerelease` (string, 선택): 프리릴리스 - 생성할 릴리스를 프리릴리스로 지정할지 여부를 지정합니다.
|
|
- 옵션: `true`, `false`
|
|
- `discussion_category_name` (string, 선택): 토론 카테고리 이름 - 지정 시, 해당 카테고리의 토론이 생성되어 릴리스와 연결됩니다. 값은 저장소에 이미 존재하는 카테고리여야 합니다.
|
|
- `generate_release_notes` (string, 선택): 릴리스 노트 - 지정한 이름과 본문을 사용하여 릴리스 노트를 자동으로 생성할지 여부를 지정합니다.
|
|
- 옵션: `true`, `false`
|
|
|
|
</Accordion>
|
|
|
|
<Accordion title="github/get_release_by_id">
|
|
**설명:** GitHub에서 ID로 릴리스를 조회합니다.
|
|
|
|
**파라미터:**
|
|
- `owner` (string, 필수): 소유자 - 이 릴리스와 연관된 저장소의 계정 소유자 이름을 지정합니다. (예시: "abc").
|
|
- `repo` (string, 필수): 저장소 - 이 릴리스와 연관된 저장소 이름을 지정합니다.
|
|
- `id` (string, 필수): 릴리스 ID - 조회할 릴리스의 ID를 지정합니다.
|
|
|
|
</Accordion>
|
|
|
|
<Accordion title="github/get_release_by_tag_name">
|
|
**설명:** GitHub에서 태그 이름으로 릴리스를 조회합니다.
|
|
|
|
**파라미터:**
|
|
- `owner` (string, 필수): 소유자 - 이 릴리스와 연관된 저장소의 계정 소유자 이름을 지정합니다. (예시: "abc").
|
|
- `repo` (string, 필수): 저장소 - 이 릴리스와 연관된 저장소 이름을 지정합니다.
|
|
- `tag_name` (string, 필수): 이름 - 가져올 릴리스의 태그를 지정합니다. (예시: "v1.0.0").
|
|
|
|
</Accordion>
|
|
|
|
<Accordion title="github/delete_release">
|
|
**설명:** GitHub에서 릴리스를 삭제합니다.
|
|
|
|
**파라미터:**
|
|
- `owner` (string, 필수): 소유자 - 이 릴리스와 연관된 저장소의 계정 소유자 이름을 지정합니다. (예시: "abc").
|
|
- `repo` (string, 필수): 저장소 - 이 릴리스와 연관된 저장소 이름을 지정합니다.
|
|
- `id` (string, 필수): 릴리스 ID - 삭제할 릴리스의 ID를 지정합니다.
|
|
|
|
</Accordion>
|
|
</AccordionGroup>
|
|
|
|
## 사용 예시
|
|
|
|
### 기본 GitHub 에이전트 설정
|
|
|
|
```python
|
|
from crewai import Agent, Task, Crew
|
|
|
|
# Create an agent with GitHub capabilities
|
|
github_agent = Agent(
|
|
role="Repository Manager",
|
|
goal="Manage GitHub repositories, issues, and releases efficiently",
|
|
backstory="An AI assistant specialized in repository management and issue tracking.",
|
|
apps=['github']
|
|
)
|
|
|
|
# Task to create a new issue
|
|
create_issue_task = Task(
|
|
description="Create a bug report issue for the login functionality in the main repository",
|
|
agent=github_agent,
|
|
expected_output="Issue created successfully with issue number"
|
|
)
|
|
|
|
# Run the task
|
|
crew = Crew(
|
|
agents=[github_agent],
|
|
tasks=[create_issue_task]
|
|
)
|
|
|
|
crew.kickoff()
|
|
```
|
|
|
|
### 특정 GitHub 도구 필터링
|
|
|
|
```python
|
|
|
|
issue_manager = Agent(
|
|
role="Issue Manager",
|
|
goal="Create and manage GitHub issues efficiently",
|
|
backstory="An AI assistant that focuses on issue tracking and management.",
|
|
apps=['github']
|
|
)
|
|
|
|
# Task to manage issue workflow
|
|
issue_workflow = Task(
|
|
description="Create a feature request issue and assign it to the development team",
|
|
agent=issue_manager,
|
|
expected_output="Feature request issue created and assigned successfully"
|
|
)
|
|
|
|
crew = Crew(
|
|
agents=[issue_manager],
|
|
tasks=[issue_workflow]
|
|
)
|
|
|
|
crew.kickoff()
|
|
```
|
|
|
|
### 릴리즈 관리
|
|
|
|
```python
|
|
from crewai import Agent, Task, Crew
|
|
|
|
release_manager = Agent(
|
|
role="Release Manager",
|
|
goal="Manage software releases and versioning",
|
|
backstory="An experienced release manager who handles version control and release processes.",
|
|
apps=['github']
|
|
)
|
|
|
|
# Task to create a new release
|
|
release_task = Task(
|
|
description="""
|
|
Create a new release v2.1.0 for the project with:
|
|
- Auto-generated release notes
|
|
- Target the main branch
|
|
- Include a description of new features and bug fixes
|
|
""",
|
|
agent=release_manager,
|
|
expected_output="Release v2.1.0 created successfully with release notes"
|
|
)
|
|
|
|
crew = Crew(
|
|
agents=[release_manager],
|
|
tasks=[release_task]
|
|
)
|
|
|
|
crew.kickoff()
|
|
```
|
|
|
|
### 이슈 추적 및 관리
|
|
|
|
```python
|
|
from crewai import Agent, Task, Crew
|
|
|
|
project_coordinator = Agent(
|
|
role="Project Coordinator",
|
|
goal="Track and coordinate project issues and development progress",
|
|
backstory="An AI assistant that helps coordinate development work and track project progress.",
|
|
apps=['github']
|
|
)
|
|
|
|
# Complex task involving multiple GitHub operations
|
|
coordination_task = Task(
|
|
description="""
|
|
1. Search for all open issues assigned to the current milestone
|
|
2. Identify overdue issues and update their priority labels
|
|
3. Create a weekly progress report issue
|
|
4. Lock resolved issues that have been inactive for 30 days
|
|
""",
|
|
agent=project_coordinator,
|
|
expected_output="Project coordination completed with progress report and issue management"
|
|
)
|
|
|
|
crew = Crew(
|
|
agents=[project_coordinator],
|
|
tasks=[coordination_task]
|
|
)
|
|
|
|
crew.kickoff()
|
|
```
|
|
|
|
### 도움 받기
|
|
|
|
<Card
|
|
title="도움이 필요하신가요?"
|
|
icon="headset"
|
|
href="mailto:support@crewai.com"
|
|
>
|
|
GitHub 통합 설정 또는 문제 해결에 대해 지원팀에 문의하세요.
|
|
</Card>
|