File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
.github/workflows/scripts Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -123,10 +123,17 @@ main() {
123
123
pr_details=$( github_api " GET" " /repos/${repo_owner} /${repo_name} /pulls/${pr_number} " )
124
124
good_first_pr=$( echo " ${pr_details} " | jq -r ' .labels | any(.name == "Good First PR")' )
125
125
126
+ # Check if the PR is labeled "Good First PR":
127
+ if [ " ${good_first_pr} " != " true" ]; then
128
+ echo " PR is not labeled 'Good First PR'."
129
+ print_success
130
+ exit 0
131
+ fi
132
+
126
133
pr_author=$( echo " ${pr_details} " | jq -r ' .user.login' )
127
134
128
135
# Fetch other PRs of the same user:
129
- user_prs=$( github_api " GET" " /search/issues?q=state%3Aopen+author%3A${pr_author} +type%3Apr" )
136
+ user_prs=$( github_api " GET" " /search/issues?q=repo%3A ${repo_owner} %2F ${repo_name} + state%3Aopen+author%3A${pr_author} +type%3Apr" )
130
137
131
138
# Count number of PRs labeled "Good First PR":
132
139
num_good_first_prs=$( echo " ${user_prs} " | jq -r ' .items | map( select( .labels | any( .name == "Good First PR" ))) | length' )
You can’t perform that action at this time.
0 commit comments