-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Save the full diff as a file #116
Conversation
Thanks! Am I right to assume it makes some sense to expose the file path as an action output, to make it more explicit? The suggested approach someone finds this file can be consumed later on, right? 👀 |
Okay, that's what I did in #117 - uses: actions/upload-artifact@v4
with:
name: dependency-tree-diff-output
path: ${{ steps.dependency-diff.outputs.file-diff }} |
@mateuszkwiecinski we actually wanted to upload all 3 files (only 2 found, 3rd in this PR), because it might help to look at the full context if there's something strange in the diff. Having all 3 available from CI means there's no need to get the branch and run the command, saving a bit of time + the CI environment might be configured differently so it could also help debug that. Exposing the outputs might make sense, consider doing them all then. You might want to change the file names (which might break some), but but |
Thanks for more context, it totally makes sense 👍 Sooo, my proposal (merged already to the main branch) is: - uses: actions/upload-artifact@v4
with:
name: dependency-tree-diff-output
path: |
${{ steps.dependency-diff.outputs.dependencies-previous }}
${{ steps.dependency-diff.outputs.dependencies-current }}
${{ steps.dependency-diff.outputs.file-diff }} They should point at files named:
(although, I consider these names an implementation detail, so I wouldn't rely on them.) I'm not fully satisfied with the names (dependencies-previous & dependencies-current), but I couldn't figure out anything fitting better (some of alternatives I considered: |
For consistency consider:
also to disambiguate between
re old/new prev/curr this/base, when I wrote a similar tool, I used
Consider that since there wasn't a public API (step output) before this, people might've hardcoded the old file names, and you could break them. (We'll definitely need to adjust our usage.) |
Thanks for all the feedback 🙇 All the changes should be included with 2.1.0 release 👍 |
This is useful to be able to easily upload the inputs and the diff as an artifact.
We could do a manual diff, but it's simpler to do it here as it's already calculated.