This repository was archived by the owner on Jul 12, 2026. It is now read-only.
Point docs at bittensor.com/docs and surface the supersession notice on PyPI #92
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: PR guard | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| on: | |
| pull_request_target: | |
| types: [ opened, edited, synchronize, reopened ] | |
| jobs: | |
| target-branch: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Comment and fail when targeting main from a non-release branch | |
| if: github.base_ref == 'main' && !startsWith(github.head_ref, 'release') | |
| uses: actions/github-script@v9 | |
| with: | |
| script: | | |
| await github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.issue.number, | |
| body: 'PRs need to be open against staging.', | |
| }); | |
| core.setFailed("PRs need to be open against the 'staging' branch."); | |
| signed-commits: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check that all commits in the PR are signed | |
| uses: actions/github-script@v9 | |
| with: | |
| script: | | |
| const commits = await github.paginate( | |
| github.rest.pulls.listCommits, | |
| { | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| pull_number: context.issue.number, | |
| per_page: 100, | |
| } | |
| ); | |
| const unsigned = commits.filter(c => !c.commit.verification || !c.commit.verification.verified); | |
| if (unsigned.length > 0) { | |
| const list = unsigned.map(c => `- ${c.sha.substring(0, 7)} ${c.commit.message.split('\n')[0]}`).join('\n'); | |
| await github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.issue.number, | |
| body: `PRs must use signed commits.\n\nUnsigned commits:\n${list}`, | |
| }); | |
| core.setFailed("PRs must use signed commits."); | |
| } |