Skip to content

Commit

Permalink
Merge pull request misskey-dev#12177 from misskey-dev/develop
Browse files Browse the repository at this point in the history
Release: 2023.11.0
  • Loading branch information
syuilo authored Nov 5, 2023
2 parents 3043b52 + f72228f commit 0c2dd33
Show file tree
Hide file tree
Showing 300 changed files with 9,301 additions and 3,284 deletions.
60 changes: 0 additions & 60 deletions .github/ISSUE_TEMPLATE/01_bug-report.md

This file was deleted.

91 changes: 91 additions & 0 deletions .github/ISSUE_TEMPLATE/01_bug-report.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
name: 🐛 Bug Report
description: Create a report to help us improve
labels: ["⚠️bug?"]

body:
- type: markdown
attributes:
value: |
Thanks for reporting!
First, in order to avoid duplicate Issues, please search to see if the problem you found has already been reported.
Also, If you are NOT owner/admin of server, PLEASE DONT REPORT SERVER SPECIFIC ISSUES TO HERE! (e.g. feature XXX is not working in misskey.example) Please try with another misskey servers, and if your issue is only reproducible with specific server, contact your server's owner/admin first.
- type: textarea
attributes:
label: 💡 Summary
description: Tell us what the bug is
validations:
required: true

- type: textarea
attributes:
label: 🥰 Expected Behavior
description: Tell us what should happen
validations:
required: true

- type: textarea
attributes:
label: 🤬 Actual Behavior
description: |
Tell us what happens instead of the expected behavior.
Please include errors from the developer console and/or server log files if you have access to them.
validations:
required: true

- type: textarea
attributes:
label: 📝 Steps to Reproduce
placeholder: |
1.
2.
3.
validations:
required: false

- type: textarea
attributes:
label: 💻 Frontend Environment
description: |
Tell us where on the platform it happens
DO NOT WRITE "latest". Please provide the specific version.
Examples:
* Model and OS of the device(s): MacBook Pro (14inch, 2021), macOS Ventura 13.4
* Browser: Chrome 113.0.5672.126
* Server URL: misskey.io
* Misskey: 13.x.x
value: |
* Model and OS of the device(s):
* Browser:
* Server URL:
* Misskey:
render: markdown
validations:
required: false

- type: textarea
attributes:
label: 🛰 Backend Environment (for server admin)
description: |
Tell us where on the platform it happens
DO NOT WRITE "latest". Please provide the specific version.
If you are using a managed service, put that after the version.
Examples:
* Installation Method or Hosting Service: docker compose, k8s/docker, systemd, "Misskey install shell script", development environment
* Misskey: 13.x.x
* Node: 20.x.x
* PostgreSQL: 15.x.x
* Redis: 7.x.x
* OS and Architecture: Ubuntu 22.04.2 LTS aarch64
value: |
* Installation Method or Hosting Service:
* Misskey:
* Node:
* PostgreSQL:
* Redis:
* OS and Architecture:
render: markdown
validations:
required: false
12 changes: 0 additions & 12 deletions .github/ISSUE_TEMPLATE/02_feature-request.md

This file was deleted.

11 changes: 11 additions & 0 deletions .github/ISSUE_TEMPLATE/02_feature-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
name: ✨ Feature Request
description: Suggest an idea for this project
labels: ["✨Feature"]

body:
- type: textarea
attributes:
label: Summary
description: Tell us what the suggestion is
validations:
required: true
2 changes: 1 addition & 1 deletion .github/workflows/api-misskey-js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
- run: corepack enable

- name: Setup Node.js
uses: actions/setup-node@v3.8.1
uses: actions/setup-node@v4.0.0
with:
node-version-file: '.node-version'
cache: 'pnpm'
Expand Down
61 changes: 11 additions & 50 deletions .github/workflows/get-api-diff.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: Report API Diff
# this name is used in report-api-diff.yml so be careful when change name
name: Get api.json from Misskey

on:
pull_request:
Expand Down Expand Up @@ -43,7 +44,7 @@ jobs:
version: 8
run_install: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3.8.1
uses: actions/setup-node@v4.0.0
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
Expand Down Expand Up @@ -125,7 +126,7 @@ jobs:
version: 8
run_install: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3.8.1
uses: actions/setup-node@v4.0.0
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
Expand Down Expand Up @@ -171,55 +172,15 @@ jobs:
- name: Kill Misskey Job
run: screen -S misskey -X quit

compare-diff:
save-pr-number:
runs-on: ubuntu-latest
if: success()
needs: [get-base, get-head]
permissions:
pull-requests: write

steps:
- name: Download Artifact
uses: actions/download-artifact@v3
with:
name: api-artifact
path: ./artifacts
- name: Output base
run: cat ./artifacts/api-base.json
- name: Output head
run: cat ./artifacts/api-head.json
- name: Arrange json files
- name: Save PR number
env:
PR_NUMBER: ${{ github.event.number }}
run: |
jq '.' ./artifacts/api-base.json > ./api-base.json
jq '.' ./artifacts/api-head.json > ./api-head.json
- name: Get diff of 2 files
run: diff -u --label=base --label=head ./api-base.json ./api-head.json | cat > api.json.diff
- name: Get full diff
run: diff --label=base --label=head --new-line-format='+%L' --old-line-format='-%L' --unchanged-line-format=' %L' ./api-base.json ./api-head.json | cat > api-full.json.diff
- name: Echo full diff
run: cat ./api-full.json.diff
- name: Upload full diff to Artifact
uses: actions/upload-artifact@v3
echo "$PR_NUMBER" > ./pr_number
- uses: actions/upload-artifact@v3
with:
name: api-artifact
path: api-full.json.diff
- id: out-diff
name: Build diff Comment
run: |
cat <<- EOF > ./output.md
このPRによるapi.jsonの差分
<details>
<summary>差分はこちら</summary>
\`\`\`diff
$(cat ./api.json.diff)
\`\`\`
</details>
[Get diff files from Workflow Page](https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID})
EOF
- name: Write diff comment
uses: thollander/actions-comment-pull-request@v2
with:
comment_tag: show_diff
filePath: ./output.md
path: pr_number
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
with:
version: 8
run_install: false
- uses: actions/setup-node@v3.8.1
- uses: actions/setup-node@v4.0.0
with:
node-version-file: '.node-version'
cache: 'pnpm'
Expand All @@ -46,7 +46,7 @@ jobs:
with:
version: 7
run_install: false
- uses: actions/setup-node@v3.8.1
- uses: actions/setup-node@v4.0.0
with:
node-version-file: '.node-version'
cache: 'pnpm'
Expand All @@ -72,7 +72,7 @@ jobs:
with:
version: 7
run_install: false
- uses: actions/setup-node@v3.8.1
- uses: actions/setup-node@v4.0.0
with:
node-version-file: '.node-version'
cache: 'pnpm'
Expand Down
85 changes: 85 additions & 0 deletions .github/workflows/report-api-diff.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@
name: Report API Diff

on:
workflow_run:
types: [completed]
workflows:
- Get api.json from Misskey # get-api-diff.yml

jobs:
compare-diff:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
permissions:
pull-requests: write

# api-artifact
steps:
- name: Download artifact
uses: actions/github-script@v6
with:
script: |
let allArtifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: context.payload.workflow_run.id,
});
let matchArtifact = allArtifacts.data.artifacts.filter((artifact) => {
return artifact.name == "api-artifact"
})[0];
let download = await github.rest.actions.downloadArtifact({
owner: context.repo.owner,
repo: context.repo.repo,
artifact_id: matchArtifact.id,
archive_format: 'zip',
});
let fs = require('fs');
fs.writeFileSync(`${process.env.GITHUB_WORKSPACE}/api-artifact.zip`, Buffer.from(download.data));
- name: Extract artifact
run: unzip api-artifact.zip -d artifacts
- name: Load PR Number
id: load-pr-num
run: echo "pr-number=$(cat artifacts/pr_number)" >> "$GITHUB_OUTPUT"

- name: Output base
run: cat ./artifacts/api-base.json
- name: Output head
run: cat ./artifacts/api-head.json
- name: Arrange json files
run: |
jq '.' ./artifacts/api-base.json > ./api-base.json
jq '.' ./artifacts/api-head.json > ./api-head.json
- name: Get diff of 2 files
run: diff -u --label=base --label=head ./api-base.json ./api-head.json | cat > api.json.diff
- name: Get full diff
run: diff --label=base --label=head --new-line-format='+%L' --old-line-format='-%L' --unchanged-line-format=' %L' ./api-base.json ./api-head.json | cat > api-full.json.diff
- name: Echo full diff
run: cat ./api-full.json.diff
- name: Upload full diff to Artifact
uses: actions/upload-artifact@v3
with:
name: api-artifact
path: |
api-full.json.diff
api-base.json
api-head.json
- id: out-diff
name: Build diff Comment
run: |
cat <<- EOF > ./output.md
このPRによるapi.jsonの差分
<details>
<summary>差分はこちら</summary>
\`\`\`diff
$(cat ./api.json.diff)
\`\`\`
</details>
[Get diff files from Workflow Page](https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID})
EOF
- uses: thollander/actions-comment-pull-request@v2
with:
pr_number: ${{ steps.load-pr-num.outputs.pr-number }}
comment_tag: show_diff
filePath: ./output.md
2 changes: 1 addition & 1 deletion .github/workflows/test-backend.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
version: 8
run_install: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3.8.1
uses: actions/setup-node@v4.0.0
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
Expand Down
Loading

0 comments on commit 0c2dd33

Please sign in to comment.