-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
97 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
--- | ||
name: "\U0001F6A7問題回報" | ||
about: 請詳細描述你遇到的問題協助我們排除問題 | ||
title: "[問題回報] " | ||
labels: 錯誤 | ||
assignees: '' | ||
|
||
--- | ||
|
||
### ✍🏻 描述詳細情況 | ||
* 預期效果: | ||
* 實際效果: | ||
|
||
### 📑 相關資訊 | ||
* 版本: | ||
|
||
### 👨🏻🔧 還有什麼我們需要知道的嗎? | ||
* 補充說明: | ||
|
||
#### 此檔案由 ExpTech.tw 設計製作 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- | ||
name: "\U0001F50C想法補充" | ||
about: 快來說說你的想法吧 | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
### 🌟想法補充 | ||
* 補充說明: | ||
|
||
#### 此檔案由 ExpTech.tw 設計製作 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Auto PR to infos folder | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
create-pr: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout source repository | ||
uses: actions/checkout@v4 | ||
with: | ||
path: source-repo | ||
|
||
- name: Get filename from info.json | ||
id: get-filename | ||
run: | | ||
cd source-repo | ||
BASE_NAME=$(jq -r '.name' info.json) | ||
FILENAME="${BASE_NAME}.json" | ||
echo "filename=$FILENAME" >> $GITHUB_OUTPUT | ||
echo "branch_name=update-file-$(date +%s)" >> $GITHUB_OUTPUT | ||
cp info.json ../target.json | ||
- name: Checkout target repository | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ExpTechTW/TREM-Plugins | ||
token: ${{ secrets.PAT_TOKEN }} | ||
path: target-repo | ||
|
||
- name: Copy and commit file | ||
run: | | ||
mkdir -p target-repo/infos | ||
mv target.json "target-repo/infos/${{ steps.get-filename.outputs.filename }}" | ||
cd target-repo | ||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
git config --global user.name "github-actions[bot]" | ||
BRANCH_NAME="${{ steps.get-filename.outputs.branch_name }}" | ||
git checkout -b $BRANCH_NAME | ||
git add infos | ||
if ! git diff --cached --quiet; then | ||
git commit -m "Update ${{ steps.get-filename.outputs.filename }}" | ||
git push origin $BRANCH_NAME | ||
else | ||
echo "No changes to commit." | ||
exit 0 | ||
fi | ||
- name: Create Pull Request | ||
if: success() | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }} | ||
run: | | ||
pr_url=$(gh pr create \ | ||
--repo ExpTechTW/TREM-Plugins \ | ||
--base main \ | ||
--head ${{ steps.get-filename.outputs.branch_name }} \ | ||
--title "Update ${{ steps.get-filename.outputs.filename }}" \ | ||
--body "Automated update from plugin repository" \ | ||
--label "auto-merge") | ||
echo "Created PR: $pr_url" |