Skip to content
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

Run changelog check only if there are changes in the code #1385

Merged
merged 2 commits into from
Jan 4, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions changelog/unreleased/changelog-fix.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Bugfix: Run changelog check only if there are changes in the code

https://github.com/cs3org/reva/pull/1385
Original file line number Diff line number Diff line change
Expand Up @@ -1456,7 +1456,6 @@ apiWebdavEtagPropagation1/moveFileFolder.feature:62
apiWebdavEtagPropagation1/moveFileFolder.feature:78
apiWebdavEtagPropagation1/moveFileFolder.feature:79
apiWebdavEtagPropagation1/moveFileFolder.feature:98
apiWebdavEtagPropagation1/moveFileFolder.feature:99
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a surprising change - but CI passed, so I guess that scenario is passing now.

apiWebdavEtagPropagation1/moveFileFolder.feature:146
apiWebdavEtagPropagation1/moveFileFolder.feature:147
apiWebdavEtagPropagation1/moveFileFolder.feature:174
Expand Down
13 changes: 12 additions & 1 deletion tools/check-changelog/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down