본문으로 바로가기 본문 바로가기
WIKI 기술 지식 베이스

저장소 비활성화

원문 보기 위키 갱신

저장소 비활성화 (Repo Disable)

Drone REST API의 저장소 비활성화 엔드포인트를 설명하는 문서예요. 저장소를 비활성화하고 소스 컨트롤 관리 시스템의 웹훅도 함께 끕니다.

출처: Drone CI Docs

본문

이름이 지정된 저장소를 Drone에서 비활성화하고, 소스 컨트롤 관리 시스템(예: GitHub)의 웹훅도 비활성화해요. 이 API는 해당 저장소에 대한 관리자 권한을 필요로 한다는 점에 유의하세요.

DELETE /api/repos/{owner}/{repo}

응답 본문 예시:

{
    "id": 42,
    "uid": "16607898",
    "user_id": 2,
    "namespace": "octocat",
    "name": "octocat",
    "slug": "octocat/hello-world",
    "scm": "git",
    "git_http_url": "https://github.com/octocat/hello-world.git",
    "git_ssh_url": "git@github.com:octocat/hello-world.git",
    "link": "https://github.com/octocat/hello-world",
    "default_branch": "master",
    "private": false,
    "visibility": "public",
    "active": false,
    "config_path": ".drone.yml",
    "trusted": false,
    "protected": false,
    "ignore_forks": false,
    "ignore_pull_requests": false,
    "timeout": 60,
    "counter": 185,
    "synced": 1542160374,
    "created": 1542160374,
    "updated": 1542160374,
    "version": 187
}

위에서 언급했듯이 이 엔드포인트는 저장소를 비활성화만 할 뿐 삭제하지는 않아요. 데이터베이스에서 저장소를 삭제하려면 remove 쿼리 파라미터를 사용하세요. 소스 컨트롤 관리 시스템에 저장소가 여전히 존재한다면, 다음 동기화 작업을 수행할 때 저장소가 데이터베이스에 자동으로 다시 추가될 수 있다는 점에 유의하세요.

DELETE /api/repos/{owner}/{repo}?remove=true