Skip to content

Commit

Permalink
Merge pull request #391 from kokonect-link/develop
Browse files Browse the repository at this point in the history
Release: 4.5.0
  • Loading branch information
noridev authored Nov 16, 2023
2 parents 40dd8f6 + 7bf3988 commit 72751e4
Show file tree
Hide file tree
Showing 324 changed files with 10,384 additions and 4,050 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 cherrypick.example) Please try with another CherryPick 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: kokonect.link
* CherryPick: 4.x.x (Misskey: 2023.x.x)
value: |
* Model and OS of the device(s):
* Browser:
* Server URL:
* CherryPick:
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, "CherryPick install shell script", development environment
* CherryPick: 4.x.x (Misskey: 2023.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:
* CherryPick:
* 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-cherrypick-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 CherryPick

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 CherryPick Job
run: screen -S cherrypick -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 CherryPick # 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 72751e4

Please sign in to comment.