diff --git a/.github/workflows/deploy-to-control-plane-review-app.yml b/.github/workflows/deploy-to-control-plane-review-app.yml index a4f51642..50fee9d4 100644 --- a/.github/workflows/deploy-to-control-plane-review-app.yml +++ b/.github/workflows/deploy-to-control-plane-review-app.yml @@ -5,7 +5,7 @@ run-name: Deploy PR Review App - PR #${{ github.event.pull_request.number || git # Controls when the workflow will run on: pull_request: - types: [opened, synchronize, reopened] + types: [synchronize, reopened] issue_comment: types: [created] workflow_dispatch: @@ -366,40 +366,3 @@ jobs: comment_id: ${{ steps.create-comment.outputs.comment-id }}, body: isSuccess ? successMessage : failureMessage }); - - - name: Show Quick Reference - if: github.event_name == 'pull_request' && github.event.action == 'opened' - 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}`); - } diff --git a/.github/workflows/deploy-to-control-plane-staging.yml b/.github/workflows/deploy-to-control-plane-staging.yml index 807fac0d..de2c0207 100644 --- a/.github/workflows/deploy-to-control-plane-staging.yml +++ b/.github/workflows/deploy-to-control-plane-staging.yml @@ -22,10 +22,6 @@ concurrency: cancel-in-progress: true jobs: - debug: - uses: ./.github/workflows/debug-workflow.yml - with: - debug_enabled: false validate-branch: runs-on: ubuntu-latest diff --git a/.github/workflows/review-app-help.yml b/.github/workflows/review-app-help.yml new file mode 100644 index 00000000..027330a8 --- /dev/null +++ b/.github/workflows/review-app-help.yml @@ -0,0 +1,49 @@ +name: Show Quick Help on PR Creation + +on: + pull_request: + types: [opened] + +permissions: + issues: write + pull-requests: write + +jobs: + show-quick-help: + 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}`); + }