Skip to main content

이 버전의 GitHub Enterprise는 다음 날짜에 중단되었습니다. 2026-04-09. 중요한 보안 문제에 대해서도 패치 릴리스가 이루어지지 않습니다. 더 뛰어난 성능, 향상된 보안, 새로운 기능을 위해 최신 버전의 GitHub Enterprise Server로 업그레이드합니다. 업그레이드에 대한 도움말은 GitHub Enterprise 지원에 문의하세요.

Dependabot에서 어떤 종속성이 업데이트되는지 제어하기

사용자가 정의하는 방식으로 지정한 dependabot.yml 패키지를 자동으로 업데이트하도록 파일을 구성하는 Dependabot 방법을 알아봅니다.

누가 이 기능을 사용할 수 있나요?

Users with write access

          Dependabot 구성을 필요에 맞게 사용자 지정하려면 `dependabot.yml` 파일에 옵션을 추가할 수 있습니다. 예를 들어, Dependabot가 올바른 패키지 매니페스트 파일을 사용하고, 유지 관리하려는 종속성만 업데이트하도록 할 수 있습니다.

이 문서에서는 유용할 수 있는 사용자 지정 옵션을 정리합니다.

매니페스트 파일에 대한 여러 위치 정의

여러 위치에 저장된 매니페스트 파일에 대해 Dependabot version updates을(를) 사용 가능하도록 설정하려면, directory 대신 directories을(를) 사용할 수 있습니다. 예를 들어 이 구성은 서로 다른 디렉터리에 저장된 매니페스트 파일에 대해 두 가지 다른 업데이트 일정을 설정합니다.

YAML
# Specify the locations of the manifest files to update for each package manager
# using both `directories` and `directory`

version: 2
updates:
  - package-ecosystem: "bundler"
    # Update manifest files stored in these directories weekly
    directories:
      - "/frontend"
      - "/backend"
      - "/admin"
    schedule:
      interval: "weekly"
  - package-ecosystem: "bundler"
    # Update manifest files stored in the root directory daily
    directory: "/"
    schedule:
      interval: "daily"
  • 패턴을 사용하여 디렉터리 범위를 지정하려면

    YAML
    # Specify the root directory and directories that start with "lib-",
    # using globbing, for locations of manifest files
    
    version: 2
    updates:
      - package-ecosystem: "composer"
        directories:
          - "/"
          - "/lib-*"
        schedule:
          interval: "weekly"
    
  • 현재 디렉터리 및 재귀 하위 디렉터리에서 매니페스트를 지정하려면

    YAML
    # Specify all directories from the current layer and below recursively,
    # using globstar, for locations of manifest files
    
    version: 2
    updates:
      - package-ecosystem: "composer"
        directories:
          - "**/*"
        schedule:
          interval: "weekly"
    

특정 종속성 무시

프로젝트의 특정 종속성에서 변경 내용을 채택할 준비가 되지 않은 경우 버전 업데이트 및 보안 업데이트에 대한 끌어오기 요청을 열 때 해당 종속성을 무시하도록 구성할 Dependabot 수 있습니다. 다음 방법 중 하나를 사용하여 이 작업을 수행할 수 있습니다.

  • ignore 옵션을 dependabot.yml 파일의 종속성에 대해 구성합니다.
    • 이를 사용하여 특정 종속성, 버전과 업데이트 유형에 대한 업데이트를 무시할 수 있습니다.
    • 자세한 내용은 ignore에서 Dependabot 옵션 참조를 참조하세요.
  • 버전 업데이트 및 보안 업데이트를 위한 @dependabot ignore 끌어오기 요청에 주석 명령을 사용합니다Dependabot.

다음 예제는 ignore을(를) 사용하여 업데이트되는 종속성을 사용자 지정하는 방법을 보여줍니다.

  • 특정 버전 이외의 업데이트 무시

    YAML
    ignore:
      - dependency-name: "lodash:*"
        # Ignore versions of Lodash that are equal to or greater than 1.0.0
        versions: [ ">=1.0.0" ]
    
    YAML
    ignore:
      - dependency-name: "sphinx"
        versions: [ "[1.1,)" ]
    
  • 패치 업데이트 무시

    YAML
    ignore:
      - dependency-name: "@types/node"
        # Ignore patch updates for Node
        update-types: ["version-update:semver-patch"]
    
  • 특정 버전이나 버전 범위를 무시하려면 특정 버전이나 버전 범위 무시를 참조하세요.

종속성이나 무시 조건 무시하기를 취소하려면 dependabot.yml 파일에서 무시 조건을 삭제하거나 끌어오기 요청을 다시 열 수 있습니다.

그룹화된 업데이트에 대한 끌어오기 요청의 경우 @dependabot unignore 댓글 명령을 사용할 수도 있습니다. @dependabot unignore 주석 명령 사용 시 Dependabot 풀 리퀘스트에 주석을 달아 다음 작업을 수행할 수 있습니다.

  • 특정 무시 조건 무시하기 취소
  • 특정 종속성 무시하기 취소
  • Dependabot 끌어오기 요청의 모든 종속성에 대한 무시 조건을 모두 취소하십시오.

자세한 내용은 종속성 업데이트에 대한 끌어오기 요청 관리을(를) 참조하세요.

특정 종속성을 업데이트할 수 있도록 허용

유지하려는 종속성에 대해 Dependabot에게 알려주기 위해 allow를 사용할 수 있습니다. allow은(는) 일반적으로 ignore과(와) 함께 사용됩니다.

자세한 내용은 allow에서 Dependabot 옵션 참조를 참조하세요.

기본적으로 Dependabot 매니페스트(direct 종속성)에 명시적으로 정의된 종속성에 대해서만 버전 업데이트 끌어오기 요청을 만듭니다. 이 구성은 allow를 사용하여 Dependabot가 all의 각종 종속성 유형을 유지하도록 지시하는 데 활용됩니다. 즉, direct 종속성 및 해당 종속성(간접 종속성, 하위 종속성 또는 일시적인 종속성이라고도 함)입니다. 또한 구성은 패턴 Dependabot 과 일치하는 이름의 모든 종속성을 무시하도록 지시 org.xwiki.* 합니다. 이러한 종속성을 유지 관리하는 프로세스는 서로 다르기 때문입니다.

          Dependabot 모든 **허용된** 종속성을 확인한 후, **무시된** 종속성을 걸러냅니다. 종속성이 **allow** 및 **ignore** 문과 일치하면 무시됩니다.
YAML
version: 2
registries:
  # Helps find updates for non Maven Central dependencies
  maven-xwiki-public:
    type: maven-repository
    url: https://nexus.xwiki.org/nexus/content/groups/public/
    username: ""
    password: ""
  # Required to resolve xwiki-common SNAPSHOT parent pom
  maven-xwiki-snapshots:
    type: maven-repository
    url: https://maven.xwiki.org/snapshots
    username: ""
    password: ""
updates:
  - package-ecosystem: "maven"
    directory: "/"
    registries:
      - maven-xwiki-public
      - maven-xwiki-snapshots
    schedule:
      interval: "weekly"
    allow:
      # Allow both direct and indirect updates for all packages.
      - dependency-type: "all"
    ignore:
      # Ignore XWiki dependencies. We have a separate process for updating them
      - dependency-name: "org.xwiki.*"
    open-pull-requests-limit: 15

특정 버전 또는 버전 범위 무시

          `versions`을(를) `ignore`과(와) 함께 사용하면 특정 버전이나 버전 범위를 무시할 수 있습니다.

자세한 내용은 versions에서 Dependabot 옵션 참조를 참조하세요.

  • 특정 버전을 무시하려면

    YAML
    ignore:
      - dependency-name: "django*"
        # Ignore version 11
        versions: [ "11" ]
    
  • 버전 범위를 무시하려면

    YAML
        ignore:
          - dependency-name: "@types/node"
            versions: ["15.x", "14.x", "13.x"]
          - dependency-name: "xdg-basedir"
            # 5.0.0 has breaking changes as they switch to named exports
            # and convert the module to ESM
            # We can't use it until we switch to ESM across the project
            versions: ["5.x"]
          - dependency-name: "limiter"
            # 2.0.0 has breaking changes
            # so we want to delay updating.
            versions: ["2.x"]
    

무시할 시맨틱 버전 수준 지정

          `update-types`
          `ignore`를 사용하여 무시할 하나 이상의 의미 체계 버전 관리(SemVer) 수준을 지정할 수 있습니다.

자세한 내용은 update-types에서 Dependabot 옵션 참조를 참조하세요.

이 예제에서는 Dependabot가 Node의 패치 버전을 무시합니다.

YAML
version: 2
updates:
  - package-ecosystem: "npm"
    directory: "/"
    schedule:
      interval: "daily"
    ignore:
      - dependency-name: "express"
        # For Express, ignore all updates for version 4 and 5
        versions: ["4.x", "5.x"]
        # For Lodash, ignore all updates
      - dependency-name: "lodash"
      - dependency-name: "@types/node"
        # For Node types, ignore any patch versions
        update-types: ["version-update:semver-patch"]

버전 관리 전략 정의

기본적으로 Dependabot 앱으로 식별되는 종속성에 대한 최소 버전 요구 사항을 늘리고, 라이브러리로 식별되는 종속성에 대한 새 버전과 이전 버전을 모두 포함하도록 허용된 버전 요구 사항을 확장합니다.

이 기본 전략을 변경할 수 있습니다. 자세한 내용은 versioning-strategy에서 Dependabot 옵션 참조를 참조하세요.

이 예제 Dependabot 에서는 앱 및 라이브러리의 새 버전과 일치하도록 최소 버전 요구 사항을 늘입니다.

YAML
version: 2
updates:
  - package-ecosystem: npm
    directory: "/"
    schedule:
      interval: daily
    # Increase the minimum version for all npm dependencies
    versioning-strategy: increase

이 예제 Dependabot 에서는 원래 제약 조건이 새 버전을 허용하지 않는 경우에만 최소 버전 요구 사항을 증가합니다.

YAML
version: 2
updates:
- package-ecosystem: pip
  directory: "/"
  schedule:
    interval: daily
  open-pull-requests-limit: 20
  rebase-strategy: "disabled"
  # Increase the version requirements for pip
  # only when required
  versioning-strategy: increase-if-necessary

공급업체 종속성 업데이트

특정 벤더 종속성을 업데이트할 때 Dependabot에 지시할 수 있습니다.

          Dependabot 는 Go 모듈에 대한 공급업체 종속성을 자동으로 유지 관리하며, 공급업체 종속성도 업데이트하도록 Bundler를 구성할 수 있습니다.

자세한 내용은 vendor에서 Dependabot 옵션 참조를 참조하세요.

이 예제에서는 Bundler에 vendor 대해 설정됩니다. 즉true, Dependabot 리포지토리의 공급업체/캐시 디렉터리에 저장된 Bundler에 대한 종속성도 유지 관리합니다.

YAML
version: 2
updates:
- package-ecosystem: bundler
  directory: "/"
  # Vendoring Bundler
  vendor: true
  schedule:
    interval: weekly
    day: saturday
  open-pull-requests-limit: 10