@@ -60,18 +60,26 @@ jobs:
6060 PATH=$PATH:$(go env GOPATH)/bin
6161 export PATH
6262 # TODO check why this flag is needed, if it has a default!
63- generate-go-function-docs diff -b ${{ github.event.pull_request.base.sha }} -c ${{ github.event.pull_request.head.sha }} -g fake_slash -f .
63+ # TODO we need a way to determine which modules have changes and run this command for all of them
64+ generate-go-function-docs diff -b ${{ github.event.pull_request.base.sha }} -c ${{ github.event.pull_request.head.sha }} -g fake_slash -f ./seth --goModLocation ./seth/go.mod
6465
6566 - name : Make sure code still compiles
6667 run : |
68+ # TODO we need a way to determine which modules have changes and run this command for all of them
69+ cd seth
6770 go mod tidy
6871 go build ./...
6972
70- - name : Commit changes
71- run : |
72- git add .
73- git commit -m "Add automatically generated go documentation"
74- git push origin ${{ github.event.pull_request.head.ref }}-docs
73+ - name : Commit changes
74+ uses : planetscale/ghcommit-action@13a844326508cdefc72235201bb0446d6d10a85f # v0.1.6
75+ with :
76+ commit_message : " [Bot] Add automatically generated go documentation"
77+ repo : ${{ github.repository }}
78+ branch : ${{ github.head_ref }}-docs
79+ # TODO we need a way to determine which modules have changes and run this command for all of them
80+ file_pattern : " seth/*"
81+ env :
82+ GITHUB_TOKEN : ${{ steps.get-gh-token.outputs.access-token }}
7583
7684 - name : Setup GitHub Token for creating a new PR
7785 id : setup-github-token-write
8593 uses : peter-evans/create-pull-request@v7
8694 with :
8795 token : ${{ secrets.GITHUB_TOKEN }}
88- base : ${{ github.event.pull_request.head.ref }}
89- branch : ${{ github.event.pull_request.head.ref }}-docs
96+ base : ${{ github.head_ref }}
97+ branch : ${{ github.head_ref }}-docs
9098 title : " Go docs for PR#${{ github.event.pull_request.number }}"
9199 body : " This PR contains automatically generated go documentation for the PR#${{ github.event.pull_request.number }}. Please review the changes."
0 commit comments