From b059a73ff48a5920fdc6c9a9ddfd32589fcf0907 Mon Sep 17 00:00:00 2001 From: Judah Meek Date: Tue, 29 Apr 2025 20:12:03 -0500 Subject: [PATCH 1/2] again --- .github/workflows/deploy-to-control-plane-staging.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/deploy-to-control-plane-staging.yml b/.github/workflows/deploy-to-control-plane-staging.yml index 807fac0d..89dd3c09 100644 --- a/.github/workflows/deploy-to-control-plane-staging.yml +++ b/.github/workflows/deploy-to-control-plane-staging.yml @@ -21,12 +21,6 @@ concurrency: group: deploy-staging cancel-in-progress: true -jobs: - debug: - uses: ./.github/workflows/debug-workflow.yml - with: - debug_enabled: false - validate-branch: runs-on: ubuntu-latest outputs: From 442a10bfeabf0b306c4ea2a861c34be8ecf801f1 Mon Sep 17 00:00:00 2001 From: Judah Meek Date: Wed, 30 Apr 2025 01:25:44 -0500 Subject: [PATCH 2/2] fixes --- .../deploy-to-control-plane-review-app.yml | 39 +-------------- .../deploy-to-control-plane-staging.yml | 2 + .github/workflows/review-app-help.yml | 49 +++++++++++++++++++ 3 files changed, 52 insertions(+), 38 deletions(-) create mode 100644 .github/workflows/review-app-help.yml 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 89dd3c09..de2c0207 100644 --- a/.github/workflows/deploy-to-control-plane-staging.yml +++ b/.github/workflows/deploy-to-control-plane-staging.yml @@ -21,6 +21,8 @@ concurrency: group: deploy-staging cancel-in-progress: true +jobs: + validate-branch: runs-on: ubuntu-latest outputs: 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}`); + }