Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/usefulness/dependency-tree-diff-action
Github Action wrapper for the Jake Wharton's dependency-tree-diff tool
https://github.com/usefulness/dependency-tree-diff-action
dependency dependency-tree-diff diff github-actions gradle pull-request tree wharton
Last synced: about 1 month ago
JSON representation
Github Action wrapper for the Jake Wharton's dependency-tree-diff tool
- Host: GitHub
- URL: https://github.com/usefulness/dependency-tree-diff-action
- Owner: usefulness
- License: mit
- Created: 2020-08-27T19:28:10.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-11-20T20:54:44.000Z (about 1 month ago)
- Last Synced: 2024-11-20T21:42:55.577Z (about 1 month ago)
- Topics: dependency, dependency-tree-diff, diff, github-actions, gradle, pull-request, tree, wharton
- Language: Shell
- Homepage: https://medium.com/@cycki/surfacing-pull-request-hidden-changes-but-for-lazy-people-196d825519c9
- Size: 589 KB
- Stars: 12
- Watchers: 2
- Forks: 7
- Open Issues: 1
-
Metadata Files:
- Readme: Readme.md
- License: LICENSE
Awesome Lists containing this project
README
# Dependency Tree Diff - Github Action
![.github/workflows/main.yml](https://github.com/usefulness/dependency-tree-diff-action/workflows/.github/workflows/main.yml/badge.svg)
Simple Github Action wrapper for Jake Wharton's [Dependency Tree Diff](https://github.com/JakeWharton/dependency-tree-diff) tool.
## Usage
The action only exposes _output_ containing the diff, so to effectively consume its output it is highly recommended to use other Github Actions to customize your experience.#### Create Pull Request comment on dependency change
[See it in action!](https://github.com/mateuszkwiecinski/github_browser/pull/31)
Create `.github/workflows/dependency_diff.yml````yml
name: Generate dependency diffon:
pull_request:jobs:
generate-diff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21
- uses: gradle/actions/setup-gradle@v4- id: dependency-diff
name: Generate dependency diff
uses: usefulness/dependency-tree-diff-action@v2- uses: peter-evans/find-comment@v3
id: find_comment
with:
issue-number: ${{ github.event.pull_request.number }}
body-includes: Dependency diff- uses: peter-evans/create-or-update-comment@v4
if: ${{ steps.dependency-diff.outputs.text-diff != null || steps.find_comment.outputs.comment-id != null }}
with:
body: |
Dependency diff (customize your message here):
```diff
${{ steps.dependency-diff.outputs.text-diff }}
```
edit-mode: replace
comment-id: ${{ steps.find_comment.outputs.comment-id }}
issue-number: ${{ github.event.pull_request.number }}
token: ${{ secrets.GITHUB_TOKEN }}
```## Customization
All inputs with their default values:
```yml
- id: dependency-diff
uses: usefulness/dependency-tree-diff-action@v2
with:
configuration: 'releaseRuntimeClasspath'
project: 'app'
build-root-directory: .
additional-gradle-arguments: ''
lib-version: 'latest'
```- **`configuration`** - Selected Gradle configuration, passed to `./gradlew dependencies --configuration xxx`.
Should correspond to output artifact that is considered output of the project.
- **`project`** - Gradle project which dependency tree diff should be generated for.
Dependency diff for root projects can be configured using `project: ''`.
For Android projects use the one that has `com.android.application` plugin applied.
- **`build-root-directory`** - Relative path to folder containing gradle wrapper.
Example usage: `build-root-directory: library`
- **`additional-gradle-arguments`** - Additional arguments passed to internal Gradle invocation. Example: `"--no-configuration-cache"` or `"--stacktrace"`
- **`lib-version`** - Overrides [dependency-tree-diff](https://github.com/JakeWharton/dependency-tree-diff) dependency version. Example: `"1.2.1"`, `"1.1.0"`, `"latest"`🙏 Praise 🙏 be 🙏 to 🙏 Wharton 🙏