advanced-security / maven-dependency-submission-action

GitHub Action for submitting Maven dependencies
MIT License
48 stars 24 forks source link

Submitting snapshot fails on PRs #60

Open Napfton opened 10 months ago

Napfton commented 10 months ago

I have setup the maven-dependecy-submission-action and it works well on the development branch, but fails on any PR from another branch into development with this errors:

Error: Cannot read properties of null (reading 'toString')
Error: TypeError: Cannot read properties of null (reading 'toString')
    at /__w/_actions/advanced-security/maven-dependency-submission-action/v3/node_modules/@github/dependency-submission-toolkit/dist/index.js:506:1
    at Generator.next (<anonymous>)
    at fulfilled (/__w/_actions/advanced-security/maven-dependency-submission-action/v3/node_modules/@github/dependency-submission-toolkit/dist/index.js:395:1)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

/__w/_actions/advanced-security/maven-dependency-submission-action/v3/node_modules/@github/dependency-submission-toolkit/dist/index.js:395
        function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
^
Error: Failed to submit snapshot: TypeError: Cannot read properties of null (reading 'toString')
    at /__w/_actions/advanced-security/maven-dependency-submission-action/v3/node_modules/@github/dependency-submission-toolkit/dist/index.js:520:1
    at Generator.next (<anonymous>)
    at fulfilled (/__w/_actions/advanced-security/maven-dependency-submission-action/v3/node_modules/@github/dependency-submission-toolkit/dist/index.js:395:1)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)

I already set permissions contents: write which was missing before (worked anyways) but to no avail.

VOVELEE commented 10 months ago

I am hitting the same

peter-murray commented 7 months ago

What version of the action are you using? The error is coming out of the dependency-submission-toolkit so I need that information to track into the library as to what is not resolving here.

It might be that the commit SHA is pointing to the merged result in the PR or there is a mismatch between the SHA and the ref? Can you provide any additional details on the workflow, trigger and the inputs being provided to the action?