fix: detect lockfile changes in GitHub PRs#73
Merged
Conversation
Adding the $GITHUB_WORKSPACE as a safe directory in `git` is necessary to ensure the GitHub Container action will function properly with the git repository checked out on the runner. However, the recommended workaround was applied too late in the class initialization. The parent class sets the instance predicate attribute for `is_lockfile_changed` in the `__init__` method. Therefore, the workaround needs to be applied in the child class *prior* to this. Closes #72
Phylum OSS Supply Chain Risk Analysis - SUCCESSThe Phylum risk analysis is complete and did not identify any issues. |
Contributor
Author
|
^ This comment is what we don't want. This PR did not change the project lockfile and so Phylum dependency analysis should not have even been performed. Swapping reviewers in an attempt to wrap this up before I go on leave... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adding the
$GITHUB_WORKSPACEas a safe directory ingitis necessary to ensure the GitHub Container action will function properly with the git repository checked out on the runner. However, this recommended workaround was applied too late in the class initialization. The parent class sets the instance predicate attribute foris_lockfile_changedin the__init__method. Therefore, the workaround needs to be applied in the child class prior to this.Closes #72
Checklist
closes #<issueNum>in description above)?Have you created sufficient tests?Testing was performed manually, with a Docker image created from the changes in this PR and pushed to
maxrake/phylum-ci:GHAon Docker Hub. This test image was used in a throwaway branch for the action,phylum-dev/phylum-analyze-pr-action@fix_access, and ultimately used in the test runs to show the error is no longer present and the action correctly identifies when the lockfile has not changed: