From 74147313cd78b2d87e5c0c157abf7e356e9fa77a Mon Sep 17 00:00:00 2001 From: Shantanu <12621235+hauntsaninja@users.noreply.github.com> Date: Sun, 29 Nov 2020 23:03:42 -0800 Subject: [PATCH] Remove mypy_primer (#4795) Co-authored-by: hauntsaninja <> --- .github/workflows/mypy_primer.yml | 57 ------------------------------- 1 file changed, 57 deletions(-) delete mode 100644 .github/workflows/mypy_primer.yml diff --git a/.github/workflows/mypy_primer.yml b/.github/workflows/mypy_primer.yml deleted file mode 100644 index b8d98504e..000000000 --- a/.github/workflows/mypy_primer.yml +++ /dev/null @@ -1,57 +0,0 @@ -name: Run mypy_primer - -on: - # Only run on PR, since we diff against master - # pull_request_target gives us access to a write token - pull_request_target: - -jobs: - mypy_primer: - name: Run mypy_primer - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - with: - path: typeshed_to_test - fetch-depth: 0 - # pull_request_target checks out the PR base branch by default - ref: refs/pull/${{ github.event.pull_request.number }}/merge - - uses: actions/setup-python@v2 - with: - python-version: 3.8 - - name: Install dependencies - run: | - python -m pip install -U pip - pip install git+https://github.com/hauntsaninja/mypy_primer.git - - name: Run mypy_primer - shell: bash - run: | - cd typeshed_to_test - echo "new commit" - COMMIT=$(git rev-parse HEAD) - git rev-list --format=%s --max-count=1 $COMMIT - git checkout -b upstream_master origin/master - echo "base commit" - git rev-list --format=%s --max-count=1 upstream_master - echo '' - cd .. - ( mypy_primer --new 0.790 --old 0.790 --custom-typeshed-repo typeshed_to_test --new-typeshed $COMMIT --old-typeshed upstream_master -o concise | tee diff.txt ) || [ $? -eq 1 ] - - name: Post comment - uses: actions/github-script@v3 - with: - github-token: ${{secrets.GITHUB_TOKEN}} - script: | - const fs = require('fs').promises; - try { - data = await fs.readFile('diff.txt', 'utf-8') - if (data.trim()) { - await github.issues.createComment({ - issue_number: context.issue.number, - owner: context.repo.owner, - repo: context.repo.repo, - body: 'Diff from [mypy_primer](https://github.com/hauntsaninja/mypy_primer), showing the effect of this PR on open source code:\n```diff\n' + data + '```' - }) - } - } catch (error) { - console.log(error) - }