1111 options :
1212 - approve-prs
1313 - merge-prs
14+ week :
15+ description : ' Week number to filter (optional, e.g., "1")'
16+ required : false
17+ type : string
18+ default : " "
1419 exclude_prs :
1520 description : ' PR numbers to exclude (comma-separated, e.g., "1972,1973")'
1621 required : false
@@ -40,11 +45,20 @@ jobs:
4045 excludes="[$(echo "$exclude_input" | sed 's/,/, /g')]"
4146 fi
4247
48+ # Parse week input
49+ week_input="${{ inputs.week }}"
50+ if [ -z "$week_input" ]; then
51+ week_param=""
52+ else
53+ week_param=", \"week\": $week_input"
54+ fi
55+
56+ echo "์ฃผ์ฐจ ํํฐ: ${week_input:-์ ์ฒด}"
4357 echo "์ ์ธํ PR: $excludes"
4458
4559 response=$(curl -s -X POST "https://github.dalestudy.com/approve-prs" \
4660 -H "Content-Type: application/json" \
47- -d "{\"repo_name\": \"${{ github.event.repository.name }}\", \"excludes\": $excludes}")
61+ -d "{\"repo_name\": \"${{ github.event.repository.name }}\", \"excludes\": $excludes$week_param }")
4862
4963 echo "response=$response" >> $GITHUB_OUTPUT
5064 echo "$response" | jq '.'
5569
5670 success=$(echo "$response" | jq -r '.success // false')
5771 total=$(echo "$response" | jq -r '.total_open_prs // 0')
72+ week_filter=$(echo "$response" | jq -r '.week_filter // null')
73+ week_matched=$(echo "$response" | jq -r '.week_matched // 0')
74+ week_mismatched=$(echo "$response" | jq -r '.week_mismatched // 0')
75+ solving_excluded=$(echo "$response" | jq -r '.solving_excluded // 0')
5876 processed=$(echo "$response" | jq -r '.processed // 0')
5977 approved=$(echo "$response" | jq -r '.approved // 0')
6078 skipped=$(echo "$response" | jq -r '.skipped // 0')
6987 fi
7088
7189 echo "" >> $GITHUB_STEP_SUMMARY
90+ if [ "$week_filter" != "null" ]; then
91+ echo "- ๐๏ธ ์ฃผ์ฐจ ํํฐ: **Week $week_filter**" >> $GITHUB_STEP_SUMMARY
92+ fi
7293 echo "- ๐ ์ ์ฒด Open PR: **$total**๊ฐ" >> $GITHUB_STEP_SUMMARY
94+ if [ "$week_filter" != "null" ]; then
95+ echo "- โ
Week $week_filter ๋งค์นญ: **$week_matched**๊ฐ" >> $GITHUB_STEP_SUMMARY
96+ echo "- โ Week ๋ถ์ผ์น: **$week_mismatched**๊ฐ" >> $GITHUB_STEP_SUMMARY
97+ echo "- ๐ Solving ์ํ ์ ์ธ: **$solving_excluded**๊ฐ" >> $GITHUB_STEP_SUMMARY
98+ fi
7399 echo "- ๐ ๊ฒ์ฌํ PR: **$processed**๊ฐ" >> $GITHUB_STEP_SUMMARY
74100 echo "- โ
์น์ธํ PR: **$approved**๊ฐ" >> $GITHUB_STEP_SUMMARY
75101 echo "- โญ๏ธ ๊ฑด๋๋ด PR: **$skipped**๊ฐ" >> $GITHUB_STEP_SUMMARY
@@ -105,13 +131,22 @@ jobs:
105131 excludes="[$(echo "$exclude_input" | sed 's/,/, /g')]"
106132 fi
107133
134+ # Parse week input
135+ week_input="${{ inputs.week }}"
136+ if [ -z "$week_input" ]; then
137+ week_param=""
138+ else
139+ week_param=", \"week\": $week_input"
140+ fi
141+
108142 merge_method="merge"
109143 echo "๋จธ์ง ๋ฐฉ์: $merge_method"
144+ echo "์ฃผ์ฐจ ํํฐ: ${week_input:-์ ์ฒด}"
110145 echo "์ ์ธํ PR: $excludes"
111146
112147 response=$(curl -s -X POST "https://github.dalestudy.com/merge-prs" \
113148 -H "Content-Type: application/json" \
114- -d "{\"repo_name\": \"${{ github.event.repository.name }}\", \"merge_method\": \"$merge_method\", \"excludes\": $excludes}")
149+ -d "{\"repo_name\": \"${{ github.event.repository.name }}\", \"merge_method\": \"$merge_method\", \"excludes\": $excludes$week_param }")
115150
116151 echo "response=$response" >> $GITHUB_OUTPUT
117152 echo "$response" | jq '.'
@@ -122,6 +157,10 @@ jobs:
122157
123158 success=$(echo "$response" | jq -r '.success // false')
124159 total=$(echo "$response" | jq -r '.total_open_prs // 0')
160+ week_filter=$(echo "$response" | jq -r '.week_filter // null')
161+ week_matched=$(echo "$response" | jq -r '.week_matched // 0')
162+ week_mismatched=$(echo "$response" | jq -r '.week_mismatched // 0')
163+ solving_excluded=$(echo "$response" | jq -r '.solving_excluded // 0')
125164 processed=$(echo "$response" | jq -r '.processed // 0')
126165 merged=$(echo "$response" | jq -r '.merged // 0')
127166 skipped=$(echo "$response" | jq -r '.skipped // 0')
@@ -138,7 +177,15 @@ jobs:
138177
139178 echo "" >> $GITHUB_STEP_SUMMARY
140179 echo "- ๐ง ๋จธ์ง ๋ฐฉ์: **$merge_method**" >> $GITHUB_STEP_SUMMARY
180+ if [ "$week_filter" != "null" ]; then
181+ echo "- ๐๏ธ ์ฃผ์ฐจ ํํฐ: **Week $week_filter**" >> $GITHUB_STEP_SUMMARY
182+ fi
141183 echo "- ๐ ์ ์ฒด Open PR: **$total**๊ฐ" >> $GITHUB_STEP_SUMMARY
184+ if [ "$week_filter" != "null" ]; then
185+ echo "- โ
Week $week_filter ๋งค์นญ: **$week_matched**๊ฐ" >> $GITHUB_STEP_SUMMARY
186+ echo "- โ Week ๋ถ์ผ์น: **$week_mismatched**๊ฐ" >> $GITHUB_STEP_SUMMARY
187+ echo "- ๐ Solving ์ํ ์ ์ธ: **$solving_excluded**๊ฐ" >> $GITHUB_STEP_SUMMARY
188+ fi
142189 echo "- ๐ ๊ฒ์ฌํ PR: **$processed**๊ฐ" >> $GITHUB_STEP_SUMMARY
143190 echo "- โ
๋จธ์งํ PR: **$merged**๊ฐ" >> $GITHUB_STEP_SUMMARY
144191 echo "- โญ๏ธ ๊ฑด๋๋ด PR: **$skipped**๊ฐ" >> $GITHUB_STEP_SUMMARY
0 commit comments