diff --git a/changelog/unreleased/changelog-fix.md b/changelog/unreleased/changelog-fix.md new file mode 100644 index 0000000000..0e7d7c833d --- /dev/null +++ b/changelog/unreleased/changelog-fix.md @@ -0,0 +1,3 @@ +Bugfix: Run changelog check only if there are changes in the code + +https://github.com/cs3org/reva/pull/1385 diff --git a/tests/acceptance/expected-failures-on-OWNCLOUD-storage.txt b/tests/acceptance/expected-failures-on-OWNCLOUD-storage.txt index eee0289ba8..d3872f3500 100644 --- a/tests/acceptance/expected-failures-on-OWNCLOUD-storage.txt +++ b/tests/acceptance/expected-failures-on-OWNCLOUD-storage.txt @@ -1456,7 +1456,6 @@ apiWebdavEtagPropagation1/moveFileFolder.feature:62 apiWebdavEtagPropagation1/moveFileFolder.feature:78 apiWebdavEtagPropagation1/moveFileFolder.feature:79 apiWebdavEtagPropagation1/moveFileFolder.feature:98 -apiWebdavEtagPropagation1/moveFileFolder.feature:99 apiWebdavEtagPropagation1/moveFileFolder.feature:146 apiWebdavEtagPropagation1/moveFileFolder.feature:147 apiWebdavEtagPropagation1/moveFileFolder.feature:174 diff --git a/tools/check-changelog/main.go b/tools/check-changelog/main.go index 45892119cf..2accea1ae1 100644 --- a/tools/check-changelog/main.go +++ b/tools/check-changelog/main.go @@ -70,11 +70,22 @@ func main() { if *repo != "" { branch = *repo + "/master" } - cmd := exec.Command("git", "diff-index", branch, "--", "changelog/unreleased") + + cmd := exec.Command("git", "diff-index", branch, "--", ".") out, err := cmd.Output() if err != nil { log.Fatal(err) } + // Return successfully if there are no changes + if len(out) == 0 { + return + } + + cmd = exec.Command("git", "diff-index", branch, "--", "changelog/unreleased") + out, err = cmd.Output() + if err != nil { + log.Fatal(err) + } mods := strings.Split(string(out), "\n") for _, m := range mods {