diff --git a/.github/workflows/doc-update.yml b/.github/workflows/doc-update.yml index 2385cff..9e752d9 100644 --- a/.github/workflows/doc-update.yml +++ b/.github/workflows/doc-update.yml @@ -30,7 +30,7 @@ on: workflow_call: permissions: - pull-requests: read + pull-requests: write contents: read env: @@ -466,14 +466,14 @@ jobs: echo "target_repo=${{ github.repository }}" >> "$GITHUB_OUTPUT" echo "pr_number=${{ github.event.pull_request.number }}" >> "$GITHUB_OUTPUT" echo "pr_sha=${{ github.event.pull_request.head.sha }}" >> "$GITHUB_OUTPUT" - echo "artifact_name=${{ env.spelling_artifact }}" >> "$GITHUB_OUTPUT" - echo "comment_title=${{ env.spelling_comment_title }}" >> "$GITHUB_OUTPUT" + echo "artifact_name=${{ env.spellcheck_artifact }}" >> "$GITHUB_OUTPUT" + echo "comment_title=${{ env.spellcheck_comment_title }}" >> "$GITHUB_OUTPUT" echo "reactions=confused" >> "$GITHUB_OUTPUT" pr-comment-spelling-report: name: Create or update comment needs: pr-markdown-spelling-report - secrets: inherit + secrets: inherits uses: ./.github/workflows/pr-comment.yml with: run_id: ${{ needs.pr-markdown-spelling-report.outputs.run_id }} diff --git a/.github/workflows/pr-comment.yml b/.github/workflows/pr-comment.yml index 0a36dd4..e1d6657 100644 --- a/.github/workflows/pr-comment.yml +++ b/.github/workflows/pr-comment.yml @@ -113,7 +113,7 @@ jobs: if: ${{ steps.check_pr.outputs.proceed == 'true'}} run: | MESSAGE_FILE="${{ steps.download.outputs.download-path }}/${{ inputs.artifact_name }}" - SIZE=$(wc -c "${MESSAGE_FILE}") + SIZE=$(cat "${MESSAGE_FILE}"|wc -c) if [[ "${SIZE}" -gt "${{ env.MAX_MESSAGE_SIZE }}" ]] ; then # truncate the message up to MAX_MESSAGE_SIZE head -c ${{ env.MAX_MESSAGE_SIZE }} "${MESSAGE_FILE}" > /tmp/truncated @@ -134,13 +134,15 @@ jobs: direction: last token: ${{ secrets.GITHUB_TOKEN }} - - name: Acquire write access to PR - if: ${{ steps.check_pr.outputs.proceed == 'true'}} - id: acquire_write_token - uses: actions/create-github-app-token@v2 - with: - app-id: ${{ secrets.CI_WORKFLOWS_PR_APP_ID }} - private-key: ${{ secrets.CI_WORKFLOWS_PR_APP_PRIVATE_KEY }} + #- name: Acquire write access to PR + # if: ${{ steps.check_pr.outputs.proceed == 'true'}} + # id: acquire_write_token + # uses: actions/create-github-app-token@v2 + # with: + # app-id: ${{ secrets.CI_WORKFLOWS_PR_APP_ID }} + # private-key: ${{ secrets.CI_WORKFLOWS_PR_APP_PRIVATE_KEY }} + # owner: go-openapi + # repo: ${{ inputs.target_repo }} - name: Create or update PR comment if: ${{ steps.check_pr.outputs.proceed == 'true'}} @@ -152,7 +154,7 @@ jobs: reactions-edit-mode: replace body-path: ${{ steps.download.outputs.download-path }}/${{ inputs.artifact_name }} edit-mode: replace - token: ${{ steps.acquire_write_token.outputs.token }} + token: ${{ secrets.GITHUB_TOKEN }} - name: Notify run: | diff --git a/ALL.md b/ALL.md index 2a01e42..f148d87 100644 --- a/ALL.md +++ b/ALL.md @@ -1,3 +1,5 @@ +This is a test of the spellcheck dictionary + # Swagger 2.0 specification schema This folder contains the Swagger 2.0 specification schema files maintained here: