question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Mismatch between Dependabot API and Azure DevOps API - Pull request cannot be activated

See original GitHub issue

Hi Guys,

Thanks for making this extension, I’d really like to use it in our Azure DevOps tenant. Unfortunately I cannot get the build step running because dependabot is not able to find my traget branch (master).

Pull Request creation failed with status 400. Message: TF401398: The pull request cannot be activated because the source and/or the target branch no longer exists, or the requested refs are not branches (StandardError)

I think this is related to the Azure DevOps REST API, expecting branch names being prefixed with refs/heads. At least thats what I suppose based on this thread

Once I change my target branch to have that prefix, e.g. refs/heads/master, dependabot itself fails way earlier with the following error message: rescue in commit': Dependabot::BranchNotFound (Dependabot::BranchNotFound)

I thought this is related to #64 but I didnt see how my problem is similar to the one of that issue, except for the error message

My pipeline looks like this:

variables:
  DEPENDABOT_EXTRA_CREDENTIALS: '[{"type":"npm_registry","token":"$(System.AccessToken)","registry":"pkgs.dev.azure.com/tapioone/_packaging/NpmFeed/npm/registry"}]' # put the credentials for private registries and feeds

jobs:
  - job: Dependabot
    # pool:
    #   name: Tapio VS 2019
      # demands:
      #   - Agent.ComputerName -equals build-vs2019-03 # pin to 03 agent for testing
    steps:
      - task: dependabot@1
        inputs:
          packageManager: 'npm'
          directory: 'Source/Frontend/packages/twinio.mobile'
          versioningStrategy: 'auto'
          targetBranch: 'master'

Don’t know if this is relevant, but we’re in the scope of a monorepo, thats managing multiple npm packages using yarn workspaces.

Thanks in advance

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
eimerreiscommented, Jun 6, 2021

@mburumaxwell saw it afterwards that the docs already contain that link, so shame on me for that one 😂

0reactions
mburumaxwellcommented, May 27, 2021

@eimerreis glad to hear you solved the problem. Maybe you can do a PR for the particular docs?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Build agent with full access still requires PAT · Issue #40
First of all, great initiative wrapping this for Azure DevOps. ... Message TF401398: The pull request cannot be activated because the source ...
Read more >
TF401398: The pull request cannot be activated because ...
This issue got fixed by prefixing a refs/heads/ to the branch sourceBranch:= "refs/heads/feature-test" targetBranch:= "refs/heads/main" pr.
Read more >
Pull Requests - Update - REST API (Azure DevOps Git)
Update a pull request These are the properties that can be updated with the API: Status Title Description (up to 4000 characters) CompletionOptions ......
Read more >
Using Dependabot with Azure DevOps - sanderh.dev
Dependabot pulls down your dependency files and looks for any outdated or insecure requirements. If any of your dependencies are out-of-date, ...
Read more >
Configuration Options - Renovate Docs
If enabled, Renovate raises a pull request when it needs to migrate the Renovate config file. Renovate only performs configMigration on .json and...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found