dependabot-script
dependabot-script copied to clipboard
[Gitlab] Merge requests on to a different branch
I've been trying to get the script to use the "develop" branch to check and make merge requests to. and not "master". I have tried to use the .dependabot/config.yaml file, but this does not seem to work for some reason.
Is this a bug? intended? am i doing something wrong?
Dependabot Script doesn't use the .dependabot/config.yaml
file. You can tell it to target a specific branch by specifying that branch when setting up the Source
though.
you mean like this?
source = Dependabot::Source.new( provider: "gitlab", hostname: gitlab_hostname, api_endpoint: "https://#{gitlab_hostname}/api/v4", repo: repo_name, directory: directory, branch: ENV["GITLAB_SRC_BRANCH"] || "master", )
Because im currently using the generic update script
That should do it, yep. It'll be picked up by this line in Dependabot Core.
It does not seem to work, it's still making MR's on master. I'll try to debug this a bit more after the weekend and get back to you on it.
warning: parser/current is loading parser/ruby26, which recognizes warning: 2.6.3-compliant syntax, but you are running 2.6.2. warning: please see https://github.com/whitequark/parser#compatibility-with-ruby-mri. Fetching composer dependency files for Bax-music/api/api-catalog Parsing dependencies information ERROR: Job failed: command terminated with exit code 137
I haven't been able to determine how or why it keeps referring to the 'master' branch. Maybe it's something im doing wrong, maybe it's a bug :(
@michaelgracious I made that work using this:
source = Dependabot::Source.new(
provider: "gitlab",
hostname: gitlab_hostname,
api_endpoint: "https://#{gitlab_hostname}/api/v4",
repo: repo_name,
directory: directory,
branch: "develop",
)