Closed muiriswoulfe closed 1 year ago
✔ Thanks for keeping your pull request small. ✔ Thanks for adding tests. | Lines | |
---|---|---|
Product Code | 54 | |
Test Code | 205 | |
Subtotal | 259 | |
Ignored Code | 199 | |
Total | 458 |
Metrics computed by PR Metrics. Add it to your Azure DevOps and GitHub PRs!
Summary
Motivation
The Pull Request ID is required for calling Azure DevOps and GitHub APIs.
For GitHub, this is coming from the variable
GITHUB_REF
. But the variable is only validly set when usingpull_request
as the build trigger according to https://docs.github.com/actions/learn-github-actions/variables.It is beneficial as per #382 to better flag this error and provide guidance as to how to remediate the issue.
Technical
Updating the code to fail gracefully when the Pull Request ID is unavailable. The message will provide instructions as to the correct course of action to take.
Additional documentation is being added to the
README
to provide further assistance.Note that, unfortunately, it is not possible to support the
pull_request_target
trigger as the Pull Request ID is unavailable when using this.The update also updates all dependencies.
Resolves #382.
Testing
Test Types
Unit Test Coverage
100%