- Executes dependency-tree-diff for PRs and reports dependency differences.
- The dependency differences are reported as GitHub Checks.
- Since GitHub Checks have a character limit of 65,535, multiple GitHub Checks will be created if there are many differences.
- If the limit is exceeded for a single project, the output will be truncated. In such cases, the full differences can be viewed by downloading the actions artifact.
- When there are dependency differences, the following feedback is provided (can
be disabled via settings):
- Posts the GitHub Checks URL as a PR comment.
- Adds a PR label.
- Uploads the dependency differences as a text file to the actions artifact.
- Supports Gradle multi-project setups.
Please apply the project-report plugin to the project where you want to obtain the dependency differences.
plugins {
//...
`project-report` // HERE !
}
Start by writing a workflow like the one below. It’s very easy to get started.
name: CI
on:
pull_request:
jobs:
dependencies-diff:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- uses: be-hase/gradle-dependency-diff-action@v1
The appearance of the PR:
The appearance of the Checks:
The HTML report generated in the actions artifact:
Name | Description | Default Value |
---|---|---|
tool-version |
Version of dependency-tree-diff | 1.2.1 |
configurations |
Target dependency configurations. Multiple values can be specified, separated by commas. | runtimeClasspath |
post-pr-comment |
If true, posts a PR comment when there are dependency differences. | true |
update-pr-body |
If true, updates the PR body when there are dependency differences. | false |
assign-label |
If true, adds a PR label when there are dependency differences. | true |
label-name |
Label name used with assign-label. | dependencies-change |
upload-artifact |
If true, uploads the dependency differences as a text file to the actions artifact. | true |
token |
Token used by this action. | ${{ github.token }} |
The error `Task 'dependencyReport' not found in root project 'xxx' and its subprojects` has occurred.
The project-report plugin may not be applied to the base branch of the Pull Request.
# Install the dependencies
npm install
# Run the tests
npm test
# Package the TypeScript for distribution
npm run bundle
# ...etc. See package.json
This template is used as a reference.