From 161be7e7c04c90df128b0194915cdb7455e63897 Mon Sep 17 00:00:00 2001 From: Richard van der Hoff Date: Tue, 1 Mar 2022 17:38:24 +0000 Subject: [PATCH] remove github magic irrelevant to matrix-spec-proposals --- .github/FUNDING.yml | 2 - .github/ISSUE_TEMPLATE/clarification.md | 13 -- .github/ISSUE_TEMPLATE/config.yaml | 8 - .github/ISSUE_TEMPLATE/cosmetic-bug.md | 13 -- .github/ISSUE_TEMPLATE/idea.md | 12 -- .github/ISSUE_TEMPLATE/spec-bug.md | 16 -- .../PULL_REQUEST_TEMPLATE/ready-proposal.md | 19 -- .github/PULL_REQUEST_TEMPLATE/spec-change.md | 16 -- .github/PULL_REQUEST_TEMPLATE/wip-proposal.md | 20 -- .github/_typos.toml | 12 -- .github/workflows/main.yml | 191 ------------------ .github/workflows/netlify.yaml | 70 ------- .github/workflows/spell-check.yaml | 15 -- 13 files changed, 407 deletions(-) delete mode 100644 .github/FUNDING.yml delete mode 100644 .github/ISSUE_TEMPLATE/clarification.md delete mode 100644 .github/ISSUE_TEMPLATE/config.yaml delete mode 100644 .github/ISSUE_TEMPLATE/cosmetic-bug.md delete mode 100644 .github/ISSUE_TEMPLATE/idea.md delete mode 100644 .github/ISSUE_TEMPLATE/spec-bug.md delete mode 100644 .github/PULL_REQUEST_TEMPLATE/ready-proposal.md delete mode 100644 .github/PULL_REQUEST_TEMPLATE/spec-change.md delete mode 100644 .github/PULL_REQUEST_TEMPLATE/wip-proposal.md delete mode 100644 .github/_typos.toml delete mode 100644 .github/workflows/main.yml delete mode 100644 .github/workflows/netlify.yaml delete mode 100644 .github/workflows/spell-check.yaml diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml deleted file mode 100644 index afc29f01..00000000 --- a/.github/FUNDING.yml +++ /dev/null @@ -1,2 +0,0 @@ -patreon: matrixdotorg -liberapay: matrixdotorg diff --git a/.github/ISSUE_TEMPLATE/clarification.md b/.github/ISSUE_TEMPLATE/clarification.md deleted file mode 100644 index 1aaa35c6..00000000 --- a/.github/ISSUE_TEMPLATE/clarification.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -name: Clarity problem -about: Report an area of the spec that is unclear. -title: '' -labels: 'clarification' -assignees: '' - ---- - -**Link to problem area**: - -**Issue** -What is wrong? How can we improve? diff --git a/.github/ISSUE_TEMPLATE/config.yaml b/.github/ISSUE_TEMPLATE/config.yaml deleted file mode 100644 index 79bc995d..00000000 --- a/.github/ISSUE_TEMPLATE/config.yaml +++ /dev/null @@ -1,8 +0,0 @@ -blank_issues_enabled: true -contact_links: - - name: Matrix Spec Discussion - url: "https://matrix.to/#/#matrix-spec:matrix.org" - about: Questions about the spec and proposal process can be asked here. - - name: Matrix Security Policy - url: https://www.matrix.org/security-disclosure-policy/ - about: Learn more about our security disclosure policy. diff --git a/.github/ISSUE_TEMPLATE/cosmetic-bug.md b/.github/ISSUE_TEMPLATE/cosmetic-bug.md deleted file mode 100644 index 1012302b..00000000 --- a/.github/ISSUE_TEMPLATE/cosmetic-bug.md +++ /dev/null @@ -1,13 +0,0 @@ ---- -name: Cosmetic issue -about: Report an issue with how the spec looks. -title: '' -labels: 'aesthetic' -assignees: '' - ---- - -**Link to problem area**: - -**Issue** -What is wrong? What can we do to improve? diff --git a/.github/ISSUE_TEMPLATE/idea.md b/.github/ISSUE_TEMPLATE/idea.md deleted file mode 100644 index 028012a5..00000000 --- a/.github/ISSUE_TEMPLATE/idea.md +++ /dev/null @@ -1,12 +0,0 @@ ---- -name: Spec idea -about: Suggest a future MSC idea. -title: '' -labels: 'improvement' -assignees: '' - ---- - -**Suggestion** -What would you like to see in Matrix? If your idea is vaguely complete enough, we -recommend submitting [an MSC](https://matrix.org/docs/spec/proposals) instead. diff --git a/.github/ISSUE_TEMPLATE/spec-bug.md b/.github/ISSUE_TEMPLATE/spec-bug.md deleted file mode 100644 index 590234ca..00000000 --- a/.github/ISSUE_TEMPLATE/spec-bug.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -name: Documentation error -about: Report an issue with the spec itself (incorrect text). -title: '' -labels: 'spec-bug' -assignees: '' - ---- - -**Link to problem area**: - -**Issue** -What is wrong? - -**Expected behaviour** -How can the issue be fixed? Links to implementations/documents which prove the spec is wrong are appreciated. diff --git a/.github/PULL_REQUEST_TEMPLATE/ready-proposal.md b/.github/PULL_REQUEST_TEMPLATE/ready-proposal.md deleted file mode 100644 index afa808b8..00000000 --- a/.github/PULL_REQUEST_TEMPLATE/ready-proposal.md +++ /dev/null @@ -1,19 +0,0 @@ ---- -name: Proposal ready for review -about: A proposal that is ready for review by the core team and community. -title: '' -labels: proposal, proposal-in-review -assignees: '' - ---- - - - -### Pull Request Checklist - - - -* [ ] Pull request includes a [changelog file](https://github.com/matrix-org/matrix-doc/blob/master/CONTRIBUTING.rst#adding-to-the-changelog) -* [ ] Pull request includes a [sign off](https://github.com/matrix-org/matrix-doc/blob/master/CONTRIBUTING.rst#sign-off) -* [ ] Pull request includes ['Rendered' link](https://matrix.org/docs/spec/proposals#process) above. -* [ ] Pull request title and file name include this PR's number as the MSC number. diff --git a/.github/PULL_REQUEST_TEMPLATE/spec-change.md b/.github/PULL_REQUEST_TEMPLATE/spec-change.md deleted file mode 100644 index d2f6e874..00000000 --- a/.github/PULL_REQUEST_TEMPLATE/spec-change.md +++ /dev/null @@ -1,16 +0,0 @@ ---- -name: Spec clarification/not a proposal -about: A change that's not a spec proposal, such as a clarification to the spec itself. -title: '' -labels: '' -assignees: '' - ---- - -### Pull Request Checklist - - - -* [ ] Pull request includes a [changelog file](https://github.com/matrix-org/matrix-doc/blob/master/CONTRIBUTING.rst#adding-to-the-changelog) -* [ ] Pull request includes a [sign off](https://github.com/matrix-org/matrix-doc/blob/master/CONTRIBUTING.rst#sign-off) -* [ ] Pull request is classified as ['other changes'](https://github.com/matrix-org/matrix-doc/blob/master/CONTRIBUTING.rst#other-changes) diff --git a/.github/PULL_REQUEST_TEMPLATE/wip-proposal.md b/.github/PULL_REQUEST_TEMPLATE/wip-proposal.md deleted file mode 100644 index 34e26187..00000000 --- a/.github/PULL_REQUEST_TEMPLATE/wip-proposal.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -name: WIP Proposal -about: A proposal that isn't quite ready for formal review yet. -title: '[WIP] Your Proposal Title' -labels: proposal -assignees: '' - ---- - - - -### Pull Request Checklist - - - -* [ ] Pull request includes a [changelog file](https://github.com/matrix-org/matrix-doc/blob/master/CONTRIBUTING.rst#adding-to-the-changelog) -* [ ] Pull request includes a [sign off](https://github.com/matrix-org/matrix-doc/blob/master/CONTRIBUTING.rst#sign-off) -* [ ] A ['Rendered' link](https://matrix.org/docs/spec/proposals#process) above. -* [ ] Update the title and file name of your proposal to match this PR's number (after opening). -* [ ] Ask in [#matrix-spec:matrix.org](https://matrix.to/#/#matrix-spec:matrix.org) to get this marked as ready for review, once it is ready for review. diff --git a/.github/_typos.toml b/.github/_typos.toml deleted file mode 100644 index 4aff005f..00000000 --- a/.github/_typos.toml +++ /dev/null @@ -1,12 +0,0 @@ -[files] -extend-exclude = ["/themes", "/attic", "/data-definitions", "*.css", "package-lock.json"] - -[default] -check-filename = true - -[default.extend-identifiers] -au1ba7o = "au1ba7o" - -[default.extend-words] -Appy = "Appy" -fo = "fo" diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index 916ec5d0..00000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,191 +0,0 @@ -name: "Spec" -on: - push: - branches: - - main - tags: - - v* - # don't bother with this workflow if only proposals are changed - paths-ignore: - - proposals - pull_request: - paths-ignore: - - proposals - workflow_dispatch: - -jobs: - validate-openapi: - name: "🔎 Validate OpenAPI specifications" - runs-on: ubuntu-latest - steps: - - name: "📥 Source checkout" - uses: actions/checkout@v2 - - name: "➕ Setup Node" - uses: actions/setup-node@v2 - with: - node-version: '14' - - name: "⚙️ npm" - working-directory: "./scripts" - run: | - npm install - - name: "🔎 Run validator" - working-directory: "./scripts" - run: | - node validator.js -s "../data/api/application-service" - node validator.js -s "../data/api/client-server" - node validator.js -s "../data/api/push-gateway" - - check-examples: - name: "🔎 Check Event schema examples" - runs-on: ubuntu-latest - container: uhoreg/matrix-doc-build - steps: - - name: "📥 Source checkout" - uses: actions/checkout@v2 - - name: "🔎 Run validator" - run: | - /env/bin/python scripts/check-event-schema-examples.py - - calculate-baseurl: - name: "⚙️ Calculate baseURL for later jobs" - runs-on: ubuntu-latest - outputs: - baseURL: "${{ steps.set-baseurl.outputs.baseURL }}" - steps: - # For PRs, set the baseURL to `/`. - # For releases, set the baseURL to `/$tag` (eg: `/v1.2`). - # Otherwise, set it to `/unstable`. - - name: "⚙️ Calculate baseURL" - id: set-baseurl - # Double brackets on the elif to avoid auto-escaping refs/tags/* because we need - # the asterisk matching behaviour, not the literal string. - run: | - if [ "${GITHUB_EVENT_NAME}" == "pull_request" ]; then - echo ::set-output name=baseURL::/ - elif [[ "${GITHUB_REF}" == refs/tags/* ]]; then - echo ::set-output name=baseURL::"/${GITHUB_REF/refs\/tags\//}" - else - echo ::set-output name=baseURL::/unstable - fi - - build-openapi: - name: "🐍 Build OpenAPI definitions" - runs-on: ubuntu-latest - container: "python:3.9" - needs: [calculate-baseurl] - steps: - - name: "📥 Source checkout" - uses: actions/checkout@v2 - - name: "📦 Asset creation" - run: | - python3 -m venv env && . env/bin/activate - pip install -r scripts/requirements.txt - # The output path matches the final deployment path at spec.matrix.org - scripts/dump-swagger.py \ - --base-url "https://spec.matrix.org${{ needs.calculate-baseurl.outputs.baseURL }}" \ - --api application-service \ - -o spec/application-service-api/api.json - scripts/dump-swagger.py \ - --base-url "https://spec.matrix.org${{ needs.calculate-baseurl.outputs.baseURL }}" \ - --api client-server \ - -o spec/client-server-api/api.json - scripts/dump-swagger.py \ - --base-url "https://spec.matrix.org${{ needs.calculate-baseurl.outputs.baseURL }}" \ - --api push-gateway \ - -o spec/push-gateway-api/api.json - tar -czf openapi.tar.gz spec - - name: "📤 Artifact upload" - uses: actions/upload-artifact@v2 - with: - name: openapi-artifact - path: openapi.tar.gz - - build-spec: - name: "📖 Build the spec" - runs-on: ubuntu-latest - needs: [calculate-baseurl, build-openapi] - steps: - - name: "➕ Setup Node" - uses: actions/setup-node@v2 - with: - node-version: '14' - - name: "➕ Setup Hugo" - uses: peaceiris/actions-hugo@c03b5dbed22245418539b65eb9a3b1d5fdd9a0a6 - with: - hugo-version: '0.85.0' - extended: true - - name: "📥 Source checkout" - uses: actions/checkout@v2 - with: - submodules: 'recursive' - - name: "⚙️ npm" - run: | - npm i - npm run get-proposals - - name: "⚙️ hugo" - run: hugo --baseURL "${{ needs.calculate-baseurl.outputs.baseURL }}" -d "spec" - - # We manually unpack the spec OpenAPI definition JSON to the website tree - # to make it available to the world in a canonical place: - # https://spec.matrix.org/latest/client-server-api/api.json - # Works for /unstable/ and /v1.1/ as well. - - name: "📥 Spec definition download" - uses: actions/download-artifact@v2 - with: - name: openapi-artifact - - name: "📝 Unpack the OpenAPI definitions in the right location" - run: | - tar -xzf openapi.tar.gz - - - name: "📦 Tarball creation" - run: tar -czf spec.tar.gz spec - - name: "📤 Artifact upload" - uses: actions/upload-artifact@v2 - with: - name: spec-artifact - path: spec.tar.gz - - build-historical-spec: - name: "📖 Build the historical backup spec" - runs-on: ubuntu-latest - needs: [build-openapi] - if: ${{ startsWith(github.ref, 'refs/tags/') }} - steps: - - name: "➕ Setup Node" - uses: actions/setup-node@v2 - with: - node-version: '14' - - name: "➕ Setup Hugo" - uses: peaceiris/actions-hugo@c03b5dbed22245418539b65eb9a3b1d5fdd9a0a6 - with: - hugo-version: '0.85.0' - extended: true - - name: "📥 Source checkout" - uses: actions/checkout@v2 - with: - submodules: 'recursive' - - name: "⚙️ npm" - run: | - npm i - npm run get-proposals - - name: "⚙️ hugo" - # Create a baseURL like `/v1.2` out of the `v1.2` tag - run: | - echo -e '[params.version]\nstatus="historical"' > historical.toml - hugo --config config.toml,historical.toml --baseURL "/${GITHUB_REF/refs\/tags\//}" -d "spec" - - - name: "📥 Spec definition download" - uses: actions/download-artifact@v2 - with: - name: openapi-artifact - - name: "📝 Unpack the OpenAPI definitions in the right location" - run: | - tar -xzf openapi.tar.gz - - - name: "📦 Tarball creation" - run: tar -czf spec-historical.tar.gz spec - - name: "📤 Artifact upload" - uses: actions/upload-artifact@v2 - with: - name: spec-historical-artifact - path: spec-historical.tar.gz diff --git a/.github/workflows/netlify.yaml b/.github/workflows/netlify.yaml deleted file mode 100644 index 83b6bec5..00000000 --- a/.github/workflows/netlify.yaml +++ /dev/null @@ -1,70 +0,0 @@ -# GHA workflow which publishes previews of spec PRs to netlify. -# -# We keep this in a separate workflow to the main spec build, because it -# requires access to the Netlify secret. By having it run on `workflow_run`, we -# will only use the workflow definition file on the default branch, so we can -# ensure that the secret can't be exfiltrated. -# - -name: Upload Preview Build to Netlify -on: - workflow_run: - workflows: [Spec] - types: [completed] - -jobs: - build: - runs-on: ubuntu-latest - if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event == 'pull_request' - steps: - - name: "dump context data" - run: | - jq . < $GITHUB_EVENT_PATH - - - name: "🔍 Read PR number" - id: readctx - # we need to find the PR number that corresponds to the branch, which we do by - # searching the GH API - run: | - head_branch='${{github.event.workflow_run.head_repository.owner.login}}:${{github.event.workflow_run.head_branch}}' - echo "head branch: $head_branch" - pulls_uri="https://api.github.com/repos/${{ github.repository }}/pulls?head=$(jq -Rr '@uri' <<<$head_branch)" - pr_number=$(curl -H 'Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}' "$pulls_uri" | - jq -r '.[] | .number') - echo "PR number: $pr_number" - echo "::set-output name=prnumber::$pr_number" - - - name: '📥 Download artifact' - uses: dawidd6/action-download-artifact@af92a8455a59214b7b932932f2662fdefbd78126 # v2.15.0 - with: - workflow: main.yaml - run_id: ${{ github.event.workflow_run.id }} - name: spec-artifact - - - name: "📦 Extract Artifacts" - run: tar -xzvf spec.tar.gz && rm spec.tar.gz - - - name: "📤 Deploy to Netlify" - id: netlify - # v1.2.2 - uses: nwtgck/actions-netlify@f517512ae75beec8896aa7b027c1c72f01816200 - with: - publish-dir: spec - deploy-message: "Deploy from GitHub Actions" - enable-pull-request-comment: false - enable-commit-comment: false - alias: pr${{ steps.readctx.outputs.prnumber }} - env: - NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} - NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} - timeout-minutes: 1 - - - name: "📝 Edit PR Description" - # v1.0.1 - uses: Beakyn/gha-comment-pull-request@2167a7aee24f9e61ce76a23039f322e49a990409 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - with: - pull-request-number: ${{ steps.readctx.outputs.prnumber }} - description-message: | - Preview: ${{ steps.netlify.outputs.deploy-url }} diff --git a/.github/workflows/spell-check.yaml b/.github/workflows/spell-check.yaml deleted file mode 100644 index e8a2a99e..00000000 --- a/.github/workflows/spell-check.yaml +++ /dev/null @@ -1,15 +0,0 @@ -name: Spell Check -on: [pull_request] - -jobs: - run: - name: Spell Check with Typos - runs-on: ubuntu-latest - steps: - - name: Checkout Actions Repository - uses: actions/checkout@v2 - - - name: Check spelling of proposals - uses: crate-ci/typos@master - with: - config: ${{github.workspace}}/.github/_typos.toml \ No newline at end of file