Bump peter-evans/create-issue-from-file from b4f9ee0a9d4abbfc6986601d9b1a4f8f8e74c77e to 80631bcd8b38dcda80612c7b1f8b929f36283159 #2237
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Add review template | |
# **What it does**: When a specific label is added to a PR, adds the contents of .github/review-template.md as a comment in the PR | |
# **Why we have it**: To help Docs Content team members ensure that their PR is ready for review | |
# **Who does it impact**: docs-internal maintainers and contributors | |
on: | |
pull_request: | |
types: | |
- labeled | |
jobs: | |
comment-that-approved: | |
name: Add review template | |
runs-on: ubuntu-latest | |
if: github.event.label.name == 'add-review-template' && github.repository == 'github/docs-internal' | |
steps: | |
- name: Download the template file | |
uses: Bhacaz/checkout-files@c8f01756bfd894ba746d5bf48205e19000b0742b | |
with: | |
files: .github/review-template.md | |
token: ${{ secrets.GITHUB_TOKEN }} | |
# Jump through some hoops to work with a multi-line file | |
- name: Store review template in variable | |
run: | | |
TEMPLATE=$(cat .github/review-template.md) | |
echo "TEMPLATE<<EOF" >> $GITHUB_ENV | |
echo "$TEMPLATE" >> $GITHUB_ENV | |
echo "EOF" >> $GITHUB_ENV | |
- name: Comment on the PR | |
run: | | |
gh pr comment $PR --body "$TEMPLATE" | |
env: | |
GITHUB_TOKEN: ${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }} | |
PR: ${{ github.event.pull_request.html_url }} | |
TEMPLATE: ${{ env.TEMPLATE }} |