chore(deps-dev): bump the vitest group with 4 updates #1876
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: status-checks | |
| on: | |
| issue_comment: | |
| types: [created] | |
| pull_request: | |
| types: [labeled, opened, reopened, synchronize] | |
| merge_group: | |
| branches: | |
| - main | |
| types: [checks_requested] | |
| permissions: | |
| issues: write | |
| pull-requests: write | |
| jobs: | |
| github-ui: | |
| runs-on: ubuntu-latest | |
| if: "${{ (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'integration-tests: skipped manually')) || github.event_name == 'merge_group' || (github.event_name == 'issue_comment' && github.event.issue.pull_request != null) }}" | |
| steps: | |
| - name: Generate token for primer | |
| id: generate_primer_token | |
| uses: actions/create-github-app-token@29824e69f54612133e76f7eaac726eef6c875baf # v2.2.1 | |
| with: | |
| app-id: 902635 | |
| owner: 'primer' | |
| repositories: 'react' | |
| private-key: ${{ secrets.PRIMER_INTEGRATION_APP_PRIVATE_KEY }} | |
| permission-statuses: 'write' | |
| # Support for reporting on required github-ui status checks on pull requests | |
| - name: Override status checks for pull request | |
| if: "${{ github.event_name == 'pull_request' }}" | |
| run: | | |
| # Get the timeline event ID for the label being added | |
| EVENT_ID=$(gh api "/repos/primer/react/issues/$PR_NUMBER/timeline" \ | |
| --jq '.[] | select(.event == "labeled" and .label.name == "integration-tests: skipped manually") | .id' \ | |
| | tail -n 1) | |
| # Construct the HTML URL from the event ID | |
| if [ -n "$EVENT_ID" ]; then | |
| TARGET_URL="${{ github.event.pull_request.html_url }}#event-$EVENT_ID" | |
| else | |
| TARGET_URL="${{ github.event.pull_request.html_url }}" | |
| fi | |
| gh api -X POST "/repos/primer/react/statuses/$SHA" \ | |
| -f state='success' \ | |
| -f context='github-ui / ci' \ | |
| -f description='Skipped' \ | |
| -f target_url="$TARGET_URL" | |
| gh api -X POST "/repos/primer/react/statuses/$SHA" \ | |
| -f state='success' \ | |
| -f context='github-ui / projects' \ | |
| -f description='Skipped' \ | |
| -f target_url="$TARGET_URL" | |
| gh api -X POST "/repos/primer/react/statuses/$SHA" \ | |
| -f state='success' \ | |
| -f context='github-ui / vrt' \ | |
| -f description='Skipped' \ | |
| -f target_url="$TARGET_URL" | |
| env: | |
| GH_TOKEN: ${{ steps.generate_primer_token.outputs.token }} | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| SHA: ${{ github.event.pull_request.head.sha }} | |
| # Support for reporting on required github-ui status checks in merge queues | |
| - name: Override status checks for merge queue | |
| if: "${{ github.event_name == 'merge_group' }}" | |
| run: | | |
| gh api -X POST "/repos/primer/react/statuses/${{ github.event.merge_group.head_sha }}" \ | |
| -f state='success' \ | |
| -f context='github-ui / ci' \ | |
| -f description='Skipped' | |
| gh api -X POST "/repos/primer/react/statuses/${{ github.event.merge_group.head_sha }}" \ | |
| -f state='success' \ | |
| -f context='github-ui / projects' \ | |
| -f description='Skipped' | |
| gh api -X POST "/repos/primer/react/statuses/${{ github.event.merge_group.head_sha }}" \ | |
| -f state='success' \ | |
| -f context='github-ui / vrt' \ | |
| -f description='Skipped' | |
| env: | |
| GH_TOKEN: ${{ steps.generate_primer_token.outputs.token }} | |
| # Support for reporting on required github-ui status checks via issue comment, useful for Pull Requests from forks | |
| - name: Issue comment command | |
| if: ${{ github.event_name == 'issue_comment' }} | |
| id: command | |
| uses: github/command@3442f3fa1efe01bdb024b157083c337902d17372 # v2.0.3 | |
| with: | |
| command: '.skip-integration-checks' | |
| allowed_contexts: pull_request | |
| # Note: this permission step is _critical_ to make sure only maintainers can run the command | |
| permissions: 'write,admin' | |
| allow_forks: true | |
| - name: Override status checks for issue comment | |
| if: ${{ github.event_name == 'issue_comment' && steps.command.outputs.continue == 'true' }} | |
| run: | | |
| SHA=$(gh pr view $NUMBER --json headRefOid --jq '.headRefOid') | |
| if [ -z "$SHA" ]; then | |
| echo "No pull request found for issue #$NUMBER, or gh pr view failed." | |
| exit 1 | |
| fi | |
| gh api -X POST "/repos/primer/react/statuses/$SHA" \ | |
| -f state='success' \ | |
| -f context='github-ui / ci' \ | |
| -f description='Manual override' \ | |
| -f target_url="$COMMENT_URL" | |
| gh api -X POST "/repos/primer/react/statuses/$SHA" \ | |
| -f state='success' \ | |
| -f context='github-ui / projects' \ | |
| -f description='Manual override' \ | |
| -f target_url="$COMMENT_URL" | |
| gh api -X POST "/repos/primer/react/statuses/$SHA" \ | |
| -f state='success' \ | |
| -f context='github-ui / vrt' \ | |
| -f description='Manual override' \ | |
| -f target_url="$COMMENT_URL" | |
| env: | |
| COMMENT_URL: ${{ github.event.comment.html_url }} | |
| GH_TOKEN: ${{ steps.generate_primer_token.outputs.token }} | |
| NUMBER: ${{ github.event.issue.number }} |