diff --git a/.github/workflows/check-for-integration-result-comment.yml b/.github/workflows/check-for-integration-result-comment.yml deleted file mode 100644 index 9cbc18195a6..00000000000 --- a/.github/workflows/check-for-integration-result-comment.yml +++ /dev/null @@ -1,75 +0,0 @@ -name: Check for integration result comment - -on: - issue_comment: - types: [created, edited] - -jobs: - # note: this workflow always passes, it does not fail when integration tests are failing - check-for-integration-result-comment: - if: github.event.issue.pull_request - runs-on: ubuntu-latest - steps: - - name: Get integration result comment - uses: actions/github-script@5c56fde4671bc2d3592fb0f2c5b5bab9ddae03b1 - with: - github-token: ${{ secrets.GITHUB_TOKEN }} - script: | - const INTEGRATION_LABEL_NAMES = { - // synced with https://github.com/primer/react/labels?q=integration-tests - skipped: 'integration-tests: skipped manually', - recommended: 'integration-tests: recommended', - failing: 'integration-tests: failing', - passing: 'integration-tests: passing' - }; - - const issue = { - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo - }; - - const { data: currentLabels } = await github.rest.issues.listLabelsOnIssue(issue); - const existingIntegrationLabels = currentLabels - .map(label => label.name) - .filter(label => label.startsWith('integration-tests:')); - - if (existingIntegrationLabels.includes(INTEGRATION_LABEL_NAMES.skipped)) return; - - const result = await github.rest.issues.listComments(issue); - const integrationComments = result.data.filter( - comment => - comment.user.login == 'primer-integration[bot]' && - (comment.body.includes('