From 1813497f85dce086daf0886a3ca7b3a70a7fcb55 Mon Sep 17 00:00:00 2001 From: Loren Gordon Date: Tue, 4 Jun 2024 07:39:42 -0700 Subject: [PATCH] Uses Credential class to create credential objecct Since https://github.com/dependabot/dependabot-core/pull/8967 in dependabot-core v0.243.0, the credential object is no longer just a hash. It now must be a Credential class. --- update-script.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/update-script.rb b/update-script.rb index b677f95a..b1aecbc4 100644 --- a/update-script.rb +++ b/update-script.rb @@ -4,6 +4,7 @@ # It's used regularly by the Dependabot team to manually debug issues, so should # always be up-to-date. +require "dependabot/credential" require "dependabot/file_fetchers" require "dependabot/file_parsers" require "dependabot/update_checkers" @@ -14,13 +15,14 @@ # GitHub credentials with write permission to the repo you want to update # (so that you can create a new branch, commit and pull request). # If using a private registry it's also possible to add details of that here. -credentials = - [{ +credentials = [ + Dependabot::Credential.new({ "type" => "git_source", "host" => "github.com", "username" => "x-access-token", "password" => "a-github-access-token" - }] + }) +] # Full name of the GitHub repo you want to create pull requests for. repo_name = "github-account/github-repo"