File tree Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Expand file tree Collapse file tree 3 files changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name: Commit Check
22
33on :
44 pull_request :
5- branches : ' main'
5+ branches : [ 'main' ]
66 workflow_dispatch :
77
88jobs :
Original file line number Diff line number Diff line change @@ -48,7 +48,8 @@ inputs:
4848runs :
4949 using : " composite"
5050 steps :
51- - name : Install dependencies and run commit-check
51+ - id : run
52+ name : Install dependencies and run commit-check
5253 shell : bash
5354 run : |
5455 if [[ "$RUNNER_OS" == "Linux" ]]; then
8485 DRY_RUN : ${{ inputs.dry-run }}
8586 JOB_SUMMARY : ${{ inputs.job-summary }}
8687 PR_COMMENTS : ${{ inputs.pr-comments }}
88+
89+ outputs :
90+ pr_comments :
91+ description : The formatted PR comment body containing commit-check results
92+ value : ${{ steps.run.outputs.pr_comments }}
Original file line number Diff line number Diff line change @@ -169,8 +169,8 @@ def add_pr_comments() -> int:
169169 pull_request .create_comment (body = pr_comments )
170170
171171 # output pr_comments to $GITHUB_OUTPUT
172- with open (os .environ ["GITHUB_OUTPUT" ], "a" , encoding = "utf-8" ) as env_file :
173- env_file .write (f"pr_comments={ pr_comments } \n " )
172+ with open (os .environ ["GITHUB_OUTPUT" ], "a" , encoding = "utf-8" ) as output_file :
173+ output_file .write (f"pr_comments={ pr_comments } \n " )
174174
175175 return 0 if result_text is None else 1
176176 except Exception as e :
You can’t perform that action at this time.
0 commit comments