Skip to content

Commit f0fbcf8

Browse files
committed
post no-docs comment only the first time
1 parent 22e4624 commit f0fbcf8

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

.github/workflows/generate-go-docs.yaml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,10 @@ jobs:
176176
177177
- name: Create comment in the original PR to notify about no new docs
178178
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4.0.0
179-
if: steps.create-pr.outputs.pull-request-number == ''
179+
# we want to post this warning only, if it is the first time we are running this action on the PR
180+
# it is entirely valid to have (some) subsequent commits without new docs as long as at least
181+
# one commit introduced changes to public functions without existing comments
182+
if: steps.create-pr.outputs.pull-request-number == '' && steps.fc.outputs.comment-id == 0
180183
with:
181184
token: ${{ steps.setup-github-token-write.outputs.access-token }}
182185
issue-number: ${{ github.event.pull_request.number }}

tools/breakingchanges/cmd/main.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ const (
2020
Reset = "\033[0m"
2121
)
2222

23+
func SuchABreakingChange() {
24+
fmt.Println("This is a breaking change")
25+
}
26+
2327
func findGoModDirs(rootFolder, subDir string) ([]string, error) {
2428
var goModDirs []string
2529

0 commit comments

Comments
 (0)