dependabot-script icon indicating copy to clipboard operation
dependabot-script copied to clipboard

[Gitlab] Merge requests on to a different branch

Open michaelgracious opened this issue 5 years ago • 6 comments

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?

michaelgracious avatar Sep 13 '19 14:09 michaelgracious

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.

greysteil avatar Sep 13 '19 15:09 greysteil

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

michaelgracious avatar Sep 13 '19 15:09 michaelgracious

That should do it, yep. It'll be picked up by this line in Dependabot Core.

greysteil avatar Sep 13 '19 15:09 greysteil

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

michaelgracious avatar Sep 13 '19 15:09 michaelgracious

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 avatar Sep 17 '19 08:09 michaelgracious

@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",
  )

zimmicz avatar Mar 15 '21 07:03 zimmicz