Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make update-script.rb generic. #712

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions update-script.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Copy link
Member

@jeffwidman jeffwidman May 24, 2022

Choose a reason for hiding this comment

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

I'd like to rename this to something more generic than GITHUB_ACCESS_TOKEN since this is really the "repo that you want to update"... and we've got users of this script running it on gitlab, azure devops, bitbucket, etc.

But not quite sure what's best... calling it "source" vs "target" doesn't clarify that this is the repo that's getting updated by Dependabot...

Thoughts?

}]

# 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
Expand All @@ -49,7 +49,7 @@
# - submodules
# - docker
# - terraform
package_manager = "npm_and_yarn"
package_manager = ENV["PACKAGE_MANAGER"] || "bundler"

source = Dependabot::Source.new(
provider: "github",
Expand Down