Skip to content

Commit

Permalink
Adjust failure wording
Browse files Browse the repository at this point in the history
  • Loading branch information
emilypgoogle committed Jun 6, 2024
1 parent 8706b80 commit a692339
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions .github/workflows/check-api-changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Check API Changes
on: pull_request

jobs:
check-format:
check-api-changes:
runs-on: ubuntu-latest
steps:
- name: Checkout branch
Expand All @@ -17,7 +17,3 @@ jobs:
- name: Run API versioning check
run: |
if ! test -d .changes || ! git diff --quiet HEAD^..HEAD .changes ; then ./gradlew warnVersionBump ; else exit 0 ; fi
- name : Log errors
if: failure()
run: |
echo "PR contains a Major or Minor API bump without an associated changelog entry. Either generate a changelog entry for the change or revert the API changes."
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ abstract class WarnVersionBumpTask : DefaultTask() {
val diff = LinesChanged.fromFile(changesFile.asFile.get())

if (diff.bump == MAJOR || diff.bump == MINOR) {
throw TaskExecutionException(this, Exception("Changes are ${diff.bump}, higher than PATCH"))
throw TaskExecutionException(this, Exception("Changes are ${diff.bump}, higher than PATCH. If this is intended, add a changelog entry. Otherwise, revert the changes."))
}
}
}

0 comments on commit a692339

Please sign in to comment.