Skip to content

Custom pull-request branch prefix is incompatible with fetch-metadata #744

Description

@ruzickap

dependabot.yml content

version: 2
updates:
  - package-ecosystem: "github-actions"
    directory: "/"
    groups:
      dependencies:
        applies-to: version-updates
        update-types:
          - "minor"
          - "patch"
    pull-request-branch-name:
      prefix: "chore"                       ## <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
      word-separator: "-"
      branch-name-case: "lowercase"
    schedule:
      interval: "weekly"

What you expected to see, versus what you actually saw

Dependabot correctly created the update PR using the configured custom branch
prefix:

chore/github-actions/dependencies-fca3083807

I expected dependabot/fetch-metadata to extract the metadata from this
verified Dependabot PR.

Instead, it failed with:

Parsing Dependabot metadata
Error: PR does not contain metadata, nothing to do.

fetch-metadata appears to require the branch name to start with
dependabot.

This conflicts with the supported pull-request-branch-name.prefix
configuration. With the custom chore prefix, the valid commit metadata is
ignored.

  • Expected behavior: metadata extraction should support branch prefixes generated
    through the documented pull-request-branch-name configuration.

  • Actual behavior: fetch-metadata fails because the generated branch does not
    start with dependabot.

Smallest manifest that reproduces the issue

  1. Configure a GitHub Actions update with:
pull-request-branch-name:
  prefix: "chore"
  1. Let Dependabot open an update PR.
  2. Run:
- name: Fetch Dependabot metadata
  uses: dependabot/fetch-metadata@v3

The generated branch starts with chore/, and metadata extraction fails with
PR does not contain metadata, nothing to do.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions