Skip to content

Conversation

jakecoffman
Copy link
Member

@jakecoffman jakecoffman commented Aug 6, 2025

fixes #456

The Dependabot CLI accepts arguments to make it easy to try out on your repo, but it didn't work for hosts other than github.com. You would have to use an input file for that.

This adds support for different hosts by accepting a URL (or SSH style URL) like so

$ dependabot update go_modules git@example.com:dependabot/cli.git
$ dependabot update go_modules https://example.com/dependabot/cli.git

Additionally if you have $LOCAL_GITHUB_ACCESS_TOKEN set, it will automatically inject that credential into the input.

This is equivalent to:

    job:
        package-manager: go_modules
        allowed-updates:
            - update-type: all
        source:
            provider: github
            repo: dependabot/cli
            hostname: example.com
            api-endpoint: https://example.com/api/v3
    credentials:
        - host: example.com
          password: $LOCAL_GITHUB_ACCESS_TOKEN
          type: git_source
          username: x-access-token

@jakecoffman jakecoffman marked this pull request as ready for review August 6, 2025 15:53
@jakecoffman jakecoffman requested review from a team as code owners August 6, 2025 15:53
Copy link
Member

@jurre jurre left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉

@jakecoffman jakecoffman added this pull request to the merge queue Aug 6, 2025
Merged via the queue into main with commit 503d98b Aug 6, 2025
80 of 84 checks passed
@jakecoffman jakecoffman deleted the add-url-support-to-update branch August 6, 2025 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

make dependabot CLI work with internal GitHub repositories - ex. git.ourcompany.com (GitHub Enterprise Server)
2 participants