Skip to content

Enhance GitHub Actions workflows for pull request and issue managemen… #19

Enhance GitHub Actions workflows for pull request and issue managemen…

Enhance GitHub Actions workflows for pull request and issue managemen… #19

name: Add Comment on PR Creation

Check failure on line 1 in .github/workflows/add-comment-on-pr-creation.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/add-comment-on-pr-creation.yml

Invalid workflow file

Invalid `steps` value - steps should be list of `uses` or `run` items
on:
pull_request:
types: [opened]
jobs:
add-comment:
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
name: Add GitHub Comment for review app instructions
uses: actions/github-script@v7
with:
script: |
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
body: [
"Hi 👋 Here are the commands available for this PR:",
"",
"- `/deploy-review-app`: Deploy your changes to a review environment",
"- `/delete-review-app`: Clean up the review environment when you're done",
"- `/help`: Show detailed information about all commands",
"",
"Use `/help` to see full documentation, including configuration options."
].join("\n")
});