github / branch-deploy

Enabling Branch Deployments through IssueOps with GitHub Actions - If you find this project useful, give it a star! ⭐️
https://github.com/marketplace/actions/branch-deploy
MIT License
364 stars 44 forks source link

Bug: Reference does not exist #249

Closed GrantBirki closed 5 months ago

GrantBirki commented 5 months ago

When running the .unlock command when there is no lock, an error is returned.

##[debug]comment body does not start with trigger: .deploy
##[debug]comment body does not start with trigger: .noop
##[debug]comment body does not start with trigger: .lock
✅ comment body starts with trigger: .unlock
##[debug]comment body does not start with trigger: .help
##[debug]comment body does not start with trigger: .wcid
##[debug]using default environment for unlock request
Error: Error: HttpError: Reference does not exist - https://docs.github.com/rest/git/refs#delete-a-reference
    at unlock (/home/runner/work/_actions/github/branch-deploy/v9.1.0/src/functions/unlock.js:185:1)
    at processTicksAndRejections (node:internal/process/task_queues:95:5)
    at run (/home/runner/work/_actions/github/branch-deploy/v9.1.0/src/main.js:410:1)
Error: HttpError: Reference does not exist - https://docs.github.com/rest/git/refs#delete-a-reference

Image

GrantBirki commented 5 months ago

This bug exists in tag v9.1.0 but not v9.0.0

GrantBirki commented 5 months ago

Perhaps octokit dependency updates broken something here: https://github.com/github/branch-deploy/compare/v9.0.0...v9.1.0#diff-053150b640a7ce75eff69d1a22cae7f0f94ad64ce9a855db544dda0929316519R2800-R2873

GrantBirki commented 5 months ago

It looks like that is indeed where the problem lives. The error message now include a link to the docs (which is awesome), but it breaks some of the checks this project does on error messages.