dependabot / api-docs

[Deprecated] Documentation for Dependabot Preview's API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Question about Notify Dependabot of a private dependency release

Ramon-Balaguer opened this issue · comments

Hello,
I've been trying push a notification following the directions on this link.

We are using the following call

{"name":"Voxel.ObjectStorage:Platform","version":"1.1.19207.1","package-manager":"nuget"}

Assuming that for the name parameter, we are using our nuget's ID and Owner as GroupId and ArtifactId, respectively

<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd">
  <metadata>
    <id>Voxel.ObjectStorage</id>
    <version>1.1.19206.31962</version>
    <authors>Platform</authors>
    <owners>Platform</owners>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <description>Wraper de la librería de AmazonS3 para acceder a un ObjectStorage</description>
    <copyright>Copyright © Voxel Media 2007-2019</copyright>
    <repository type="git" url="https://github.com/VoxelGroup/Voxel.ObjectStorage.git" />
    <dependencies>
      <group targetFramework=".NETStandard2.0">
        <dependency id="AWSSDK.S3" version="3.3.104.2" exclude="Build,Analyzers" />
      </group>
    </dependencies>
  </metadata>
</package>

However, we do not obtain a response, or any PR on our repository, as expected.
What could be the error?

Thanks!

The name here should just be Voxel.ObjectStorage.

Are you definitely making the request with an access token that has access to the VoxelGroup organisation? Dependabot hits https://api.github.com/user/orgs with the access token to determine which orgs it has access to.

I can use the same token with this link: https://api.github.com/user/orgs
With this headers: "Authorization: token OAUTH-TOKEN" and it works correctly.

We received:

[
    {
        "login": "VoxelGroup",
        "id": XXXXX,
        "node_id": "XXXXXX",
        "url": "https://api.github.com/orgs/VoxelGroup",
        "repos_url": "https://api.github.com/orgs/VoxelGroup/repos",
        "events_url": "https://api.github.com/orgs/VoxelGroup/events",
        "hooks_url": "https://api.github.com/orgs/VoxelGroup/hooks",
        "issues_url": "https://api.github.com/orgs/VoxelGroup/issues",
        "members_url": "https://api.github.com/orgs/VoxelGroup/members{/member}",
        "public_members_url": "https://api.github.com/orgs/VoxelGroup/public_members{/member}",
        "avatar_url": "https://avatars1.githubusercontent.com/u/34061716?v=4",
        "description": ""
    }
]

In your API I don't receive any authentication error.

Just dug into this a bit more on our side and it looks like there's some name-normalisation that's causing problems here. I'll get that fixed...

Thank you! we will wait.

Deploying now - will be out in ~5 minutes.

Deployed!

image

Thanks, but we continue with the same problem

Have had to jump on a couple of calls. Will try to get back to this. Not sure what could be causing it now though...

(The 204 response is expected btw - it's just that you should be getting a PR!)

Ah, hang on - it looks like an update job is now being successfully triggered, but that Dependabot can't find the updated version when it looks for it in the update job. Do you have a NuGet.config committed, or have you set a config variable in Dependabot, with details of your private registry? This endpoint is only to get Dependabot to kick off an update run - Dependabot still needs to be able to find the version on your registry.

That is the problem, our Nuget server is private and we thought that from our "nuget continous integration flow" we could make push notifications to dependabot.

OK, in that case I'm going to close this as we're not planning to denormalise private registry contents in Dependabot (it would be a lot of work on our side). Thanks for talking it through with me, though.