From e87f5e08c9aca4d1e40512a783b549dc15913f4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Josef=20=C5=A0im=C3=A1nek?= Date: Fri, 3 Dec 2021 00:49:41 +0100 Subject: [PATCH] Make update-script.rb generic. --- update-script.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/update-script.rb b/update-script.rb index b677f95a..1fa7520b 100644 --- a/update-script.rb +++ b/update-script.rb @@ -19,19 +19,19 @@ "type" => "git_source", "host" => "github.com", "username" => "x-access-token", - "password" => "a-github-access-token" + "password" => ENV["GITHUB_ACCESS_TOKEN"] # A GitHub access token with read access to public repos }] -# Full name of the GitHub repo you want to create pull requests for. -repo_name = "github-account/github-repo" +# Full name of the repo you want to create pull requests for. +repo_name = ENV["PROJECT_PATH"] # namespace/project # Directory where the base dependency files are. -directory = "/" +directory = ENV["DIRECTORY_PATH"] || "/" # Name of the dependency you'd like to update. (Alternatively, you could easily # modify this script to loop through all the dependencies returned by # `parser.parse`.) -dependency_name = "rails" +dependency_name = ENV["DEPENDENCY_NAME"] || "rails" # Name of the package manager you'd like to do the update for. Options are: # - bundler @@ -49,7 +49,7 @@ # - submodules # - docker # - terraform -package_manager = "npm_and_yarn" +package_manager = ENV["PACKAGE_MANAGER"] || "bundler" source = Dependabot::Source.new( provider: "github",