chore(deps-dev): bump posthog-js from 1.335.2 to 1.336.1 #861
Workflow file for this run
This file contains hidden or 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: Deploy Review App | |
| on: | |
| pull_request: | |
| types: [labeled, unlabeled, closed] | |
| jobs: | |
| manage-review-app: | |
| runs-on: ubuntu-latest | |
| if: | | |
| (github.event.action == 'labeled' && github.event.label.name == 'review-app') || | |
| (github.event.action == 'unlabeled' && github.event.label.name == 'review-app') || | |
| (github.event.action == 'closed' && contains(github.event.pull_request.labels.*.name, 'review-app')) | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Check if user is a contributor | |
| if: github.event.action == 'labeled' && github.event.label.name == 'review-app' | |
| uses: actions/github-script@v7 | |
| with: | |
| script: | | |
| try { | |
| const labelCreator = context.actor; | |
| console.log(`Label creator: ${labelCreator}`); | |
| const { data: permission } = await github.rest.repos.getCollaboratorPermissionLevel({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| username: labelCreator | |
| }); | |
| console.log(`Permission level: ${permission.permission}`); | |
| const validPermissions = ['write', 'admin', 'maintain']; | |
| const isContributor = validPermissions.includes(permission.permission); | |
| if (!isContributor) { | |
| core.setFailed(`User ${labelCreator} does not have contributor access`); | |
| } | |
| } catch (error) { | |
| core.setFailed(`Failed to check contributor status: ${error.message}`); | |
| } | |
| - name: Manage Heroku Review App | |
| uses: fastruby/manage-heroku-review-app@v1.3 | |
| with: | |
| action: ${{ (github.event.action == 'labeled' && github.event.label.name == 'review-app' && 'create') || 'destroy' }} | |
| env: | |
| HEROKU_API_TOKEN: ${{ secrets.HEROKU_API_TOKEN }} | |
| HEROKU_PIPELINE_ID: ${{ secrets.HEROKU_PIPELINE_ID }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |