From 5153bdb29ea8d22668822f032eec335276894865 Mon Sep 17 00:00:00 2001 From: Joachim Jablon Date: Sun, 23 Jul 2023 18:13:10 +0200 Subject: [PATCH] Unrelated doc improvements --- README.md | 5 +++++ action.yml | 9 ++++++--- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index cacf7149..875c35e5 100644 --- a/README.md +++ b/README.md @@ -115,6 +115,11 @@ jobs: path: python-coverage-comment-action.txt ``` +The "Store Pull Request comment to be posted" step as well as the file below +are only needed in contexts where some contributors don't have write access to +the repository. In closed-source context, it's likely that all contributors +have write-access (i.e. nobody uses forks), you can remove both. + ```yaml # .github/workflows/coverage.yml name: Post coverage comment diff --git a/action.yml b/action.yml index dc35fe2f..d7eb9f13 100644 --- a/action.yml +++ b/action.yml @@ -80,7 +80,7 @@ inputs: default: false ANNOTATION_TYPE: description: > - Only needed if ANNOTATE_MISSING_LINES is set to true. This parameter allows you to choose between + Only relevant if ANNOTATE_MISSING_LINES is set to true. This parameter allows you to choose between notice, warning and error as annotation type. For more information look here: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#setting-a-notice-message default: warning @@ -91,8 +91,10 @@ inputs: outputs: COMMENT_FILE_WRITTEN: description: > - If "true", a comment file was written to COMMENT_FILENAME. If "false", - no comment file was written (because the comment was already posted). + Only set when running in PR mode. If "true", a comment file was written + to COMMENT_FILENAME and you'll need to run the action in workflow_run + mode to post it. If "false", no comment file was written (because the + comment was already posted to the PR). runs: using: docker image: Dockerfile @@ -104,6 +106,7 @@ runs: COVERAGE_PATH: ${{ inputs.COVERAGE_PATH }} COMMENT_ARTIFACT_NAME: ${{ inputs.COMMENT_ARTIFACT_NAME }} COMMENT_FILENAME: ${{ inputs.COMMENT_FILENAME }} + SUBPROJECT_ID: ${{ inputs.SUBPROJECT_ID }} MINIMUM_GREEN: ${{ inputs.MINIMUM_GREEN }} MINIMUM_ORANGE: ${{ inputs.MINIMUM_ORANGE }} MERGE_COVERAGE_FILES: ${{ inputs.MERGE_COVERAGE_FILES }}