Fix Promotion Workflow #9
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: Show Quick Help on PR Creation | |
on: | |
pull_request: | |
types: [opened] | |
permissions: | |
issues: write | |
pull-requests: write | |
jobs: | |
debug: | |
uses: ./.github/workflows/debug-workflow.yml | |
with: | |
debug_enabled: false # Will still run if vars.DEBUG_WORKFLOW is true | |
show-quick-help: | |
if: github.event_name == 'pull_request' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Show Quick Reference | |
uses: actions/github-script@v7 | |
with: | |
script: | | |
try { | |
console.log('Creating quick reference message...'); | |
const helpMessage = [ | |
'# 🚀 Quick Review App Commands', | |
'', | |
'Welcome! Here are the commands you can use in this PR:', | |
'', | |
'### `/deploy-review-app`', | |
'Deploy your PR branch for testing', | |
'', | |
'### `/delete-review-app`', | |
'Remove the review app when done', | |
'', | |
'### `/help`', | |
'Show detailed instructions, environment setup, and configuration options.', | |
'', | |
'---' | |
].join('\n'); | |
await github.rest.issues.createComment({ | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
issue_number: context.issue.number, | |
body: helpMessage | |
}); | |
console.log('Quick reference posted successfully'); | |
} catch (error) { | |
console.error('Error posting quick reference:', error); | |
core.setFailed(`Failed to post quick reference: ${error.message}`); | |
} |