4242 with :
4343 fetch-depth : 0
4444
45- # - name: Setup Git to use GitHub Actions bot
46- # run: |
47- # git config user.name "github-actions[bot]"
48- # git config user.email "github-actions[bot]@users.noreply.github.com"
49-
50- # - name: Create a new branch
51- # run: |
52- # git checkout -b ${{ github.event.pull_request.head.ref }}-docs
53-
5445 - name : Generate go docs
5546 shell : bash
5647 env :
6152 export PATH
6253 # TODO check why this flag is needed, if it has a default!
6354 # 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
55+ generate-go-function-docs diff -b ${{ github.event.pull_request.base.sha }} -c ${{ github.event.pull_request.head.sha }} -g chatgpt -f ./seth --goModLocation ./seth/go.mod
6556
6657 - name : Make sure code still compiles
6758 run : |
@@ -70,12 +61,12 @@ jobs:
7061 go mod tidy
7162 go build ./...
7263
73- - name : Setup branch names
74- id : branch-names
75- shell : bash
76- run : |
77- echo "base_branch=${{ github.head_ref }}" >> $GITHUB_OUTPUT
78- echo "new_branch=${{ github.head_ref }}-docs" >> $GITHUB_OUTPUT
64+ # - name: Export branch names
65+ # id: branch-names
66+ # shell: bash
67+ # run: |
68+ # echo "base_branch=${{ github.head_ref }}" >> $GITHUB_OUTPUT
69+ # echo "new_branch=${{ github.head_ref }}-docs" >> $GITHUB_OUTPUT
7970
8071 - name : Setup GitHub Token for creating a new PR
8172 id : setup-github-token-write
@@ -85,35 +76,12 @@ jobs:
8576 aws-lambda-url : ${{ secrets.GATI_LAMBDA_TT_URL }}
8677 aws-region : ${{ secrets.AWS_REGION }}
8778
88- # - name: Checkout new branch
89- # uses: peterjgrainger/action-create-branch@10c7d268152480ae859347db45dc69086cef1d9c # v3.0.0
90- # env:
91- # GITHUB_TOKEN: ${{ steps.setup-github-token-write.outputs.access-token }}
92- # with:
93- # branch: ${{ steps.branch-names.outputs.new_branch }}
94-
95- # - name: Commit changes
96- # uses: planetscale/ghcommit-action@13a844326508cdefc72235201bb0446d6d10a85f # v0.1.6
97- # with:
98- # commit_message: "[Bot] Add automatically generated go documentation"
99- # repo: ${{ github.repository }}
100- # branch: ${{ steps.branch-names.outputs.new_branch }}
101- # # TODO we need a way to determine which modules have changes and run this command for all of them
102- # file_pattern: "seth/*"
103- # env:
104- # GITHUB_TOKEN: ${{ steps.setup-github-token-write.outputs.access-token }}
105-
106- # - name: Fetch repository changes
107- # uses: actions/checkout@v3
108- # with:
109- # fetch-depth: 0
110-
11179 - name : Create a new PR targeting current PR
112- uses : peter-evans/create-pull-request@v7
80+ uses : peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7.0.5
11381 with :
11482 token : ${{ steps.setup-github-token-write.outputs.access-token }}
115- branch : ${{ steps.branch-names.outputs.new_branch }}
116- base : ${{ steps.branch-names.outputs.base_branch }}
83+ branch : ${{ github.head_ref }}-docs
84+ base : ${{ github.head_ref }}
11785 title : " Go docs for PR#${{ github.event.pull_request.number }}"
11886 body : " This PR contains automatically generated go documentation for the PR#${{ github.event.pull_request.number }}. Please review the changes."
11987 commit-message : " [Bot] Add automatically generated go documentation"
0 commit comments