Skip to content

Commit 7299d3f

Browse files
committed
[add] Volunteer pxm168168
[fix] Activity issue label, project & file URI
1 parent 4aa9f11 commit 7299d3f

File tree

6 files changed

+28
-9
lines changed

6 files changed

+28
-9
lines changed

.github/ISSUE_TEMPLATE/new_activity.yml renamed to .github/ISSUE_TEMPLATE/new-activity.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ description: 自动生成新活动的 pull request
33
title: 【新活动】(替换此处为活动主题)
44
labels:
55
- Activity
6+
projects:
7+
- FreeCodeCamp-Chengdu/5
68
assignees:
79
- TechQuery
810
body:
@@ -35,6 +37,7 @@ body:
3537
options:
3638
- online
3739
- offline
40+
multiple: true
3841
validations:
3942
required: true
4043
- type: input
@@ -93,6 +96,7 @@ body:
9396
id: partners
9497
attributes:
9598
label: 合办方、场地方、赞助方
99+
description: 合作方 ID 详见:https://github.com/FreeCodeCamp-Chengdu/Wiki/tree/master/_posts/Partner
96100
placeholder: 多个则用英文逗号隔开
97101
- type: textarea
98102
id: photos

.github/ISSUE_TEMPLATE/translation.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ title: (译文中文标题)
44
labels:
55
- Article
66
- Translation
7+
projects:
8+
- FreeCodeCamp-Chengdu/4
79
body:
810
- type: input
911
id: page_link

.github/settings.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ labels:
1616
color: "#d73a4a"
1717
description: auto download an Outer Article to translate
1818

19+
- name: Activity
20+
color: "#f9d0c4"
21+
description: 活动一级分类
22+
1923
- name: Salon
2024
color: "#d7f797"
2125
description: 小型分享会、讲座

.github/workflows/save-activity.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,25 @@ on:
55
- labeled
66
jobs:
77
generate-markdown:
8-
if: contains(github.event.issue.labels.*.name, 'Salon') || contains(github.event.issue.labels.*.name, 'Workshop') || contains(github.event.issue.labels.*.name, 'Conference')
8+
if: contains(github.event.issue.labels.*.name, 'Activity')
99
runs-on: ubuntu-latest
1010
permissions:
11+
contents: write
1112
pull-requests: write
1213
steps:
1314
- uses: actions/checkout@v4
1415

1516
- id: issue-parser
1617
uses: stefanbuck/github-issue-parser@v3
1718
with:
18-
template-path: ".github/ISSUE_TEMPLATE/new_activity.yml"
19+
template-path: ".github/ISSUE_TEMPLATE/new-activity.yml"
1920

2021
- name: Generate Markdown file
2122
env:
2223
CATEGORY: ${{ steps.issue-parser.outputs.issueparser_category }}
2324
TYPE: ${{ steps.issue-parser.outputs.issueparser_type }}
25+
PHOTOS: ${{ steps.issue-parser.outputs.issueparser_photos }}
26+
FILES: ${{ steps.issue-parser.outputs.issueparser_files }}
2427
run: |
2528
cat <<EOF > _posts/Activity/$CATEGORY/${{ steps.issue-parser.outputs.issueparser_file_name }}.md
2629
---
@@ -34,18 +37,18 @@ jobs:
3437
end: ${{ steps.issue-parser.outputs.issueparser_end }}
3538
address: "${{ steps.issue-parser.outputs.issueparser_address }}"
3639
links:
37-
报名: ${{ steps.issue-parser.outputs.issueparser_links }}
40+
报名: ${{ steps.issue-parser.outputs.issueparser_register_link }}
3841
mentors: [${{ steps.issue-parser.outputs.issueparser_mentors }}]
3942
workers: [${{ steps.issue-parser.outputs.issueparser_workers }}]
4043
partners: [${{ steps.issue-parser.outputs.issueparser_partners }}]
41-
photos: [${{ steps.issue-parser.outputs.issueparser_photos }}]
42-
files: [${{ steps.issue-parser.outputs.issueparser_files }}]
44+
photos: [$(echo $PHOTOS | grep -oE 'https?://[^ \)]+' | tr '\n' ',' | sed 's/,$//')]
45+
files: [$(echo $FILES | grep -oE 'https?://[^ \)]+' | tr '\n' ',' | sed 's/,$//')]
4346
---
4447
4548
${{ steps.issue-parser.outputs.issueparser_content }}
4649
EOF
4750
48-
- uses: peter-evans/create-pull-request@v6
51+
- uses: peter-evans/create-pull-request@v7
4952
with:
5053
title: "[add] ${{ github.event.issue.title }} activity"
5154
body: "closes #${{ github.event.issue.number }}"

.github/workflows/save-article.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,20 @@ jobs:
88
if: contains(github.event.issue.labels.*.name, 'Article')
99
runs-on: ubuntu-latest
1010
permissions:
11+
contents: write
1112
pull-requests: write
1213
steps:
1314
- uses: actions/checkout@v4
1415

1516
- id: issue-parser
1617
uses: stefanbuck/github-issue-parser@v3
1718
with:
18-
template-path: ".github/ISSUE_TEMPLATE/new_article.yml"
19+
template-path: ".github/ISSUE_TEMPLATE/new-article.yml"
1920

2021
- name: Generate Markdown file
2122
env:
2223
CATEGORIES: ${{ steps.issue-parser.outputs.issueparser_categories }}
24+
THUMBNAIL: ${{ steps.issue-parser.outputs.issueparser_thumbnail }}
2325
run: |
2426
cat <<EOF > _posts/$(echo $CATEGORIES | tr ',' '/')/${{ steps.issue-parser.outputs.issueparser_file_name }}.md
2527
---
@@ -31,13 +33,13 @@ jobs:
3133
authors: [${{ steps.issue-parser.outputs.issueparser_authors }}]
3234
original: ${{ steps.issue-parser.outputs.issueparser_original }}
3335
toc: true
34-
thumbnail: ${{ steps.issue-parser.outputs.issueparser_thumbnail }}
36+
thumbnail: $(echo $THUMBNAIL | grep -oE 'https?://[^ \)]+' | head -n 1)
3537
---
3638
3739
${{ steps.issue-parser.outputs.issueparser_content }}
3840
EOF
3941
40-
- uses: peter-evans/create-pull-request@v6
42+
- uses: peter-evans/create-pull-request@v7
4143
with:
4244
title: "[add] ${{ github.event.issue.title }} article"
4345
body: "closes #${{ github.event.issue.number }}"

_data/volunteer.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,3 +174,7 @@
174174
title: dEthan3
175175
URL: https://github.com/dethan3
176176
logo: https://avatars.githubusercontent.com/u/33822639?s=96
177+
- name: Helen168168
178+
title: pxm168168
179+
URL: https://github.com/Helen168168
180+
logo: https://avatars.githubusercontent.com/u/13129790?s=96

0 commit comments

Comments
 (0)