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

Dependabot PR includes changes from custom PRs - Need to exclude non-main branch changes #1427

Open
ahmetgul93 opened this issue Oct 24, 2024 · 0 comments

Comments

@ahmetgul93
Copy link

Describe the bug

I would like Dependabot to only base its pull requests on the changes in the main branch and not include any changes from other open PRs or branches. This behavior is causing conflicts and making it difficult to review the dependencies independently from other feature or custom changes.

PR created by dependabot takes changes from other open PRs as well. I want dependabot to create PRs only based on MAIN. I have found rebase-strategy and set it disabled but it didn't work as well

Could you please help me how can I do this?

dependabot.yml;

version: 2
registries:
  azure-artifacts:
    type: nuget-feed
    key: "aaaa"
    url: "xxxxx"
    token: PAT:${{ TOKEN}}
updates:
  - package-ecosystem: "nuget"
    directories: [ '/aa/bb/*' ]
    allow:
      - dependency-name: "AA.BB"
    target-branch: main
    registries:
      - azure-artifacts
    schedule:
      interval: "daily"
    rebase-strategy: "disabled"
    commit-message:
      prefix: "test"
    open-pull-requests-limit: 3
  - package-ecosystem: "nuget"
    directories: [ '/cc/dd/*' ]
    allow:
      - dependency-name: "AA.CC"
    target-branch: main
    registries:
      - azure-artifacts
     schedule:
      interval: "daily"
    rebase-strategy: "disabled"
    commit-message:
      prefix: "test"
    open-pull-requests-limit: 3

azure devops pipeline;

stages:
  - stage: DependencyChecking
    jobs:
      - job: Dependabot
        displayName: 'Dependabot'
        steps:
          - task: dependabot@2
            displayName: 'Dependabot'
            inputs:
              useUpdateScriptvNext: true
            env:
              TOKEN: $(System.AccessToken)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant