1313 # Only act on issues created from the website (title set by your JS)
1414 if : ${{ startsWith(github.event.issue.title, 'Application from website') }}
1515 runs-on : ubuntu-latest
16+ timeout-minutes : 1
1617
1718 steps :
1819 - name : Install jq
3637
3738 echo "Fetching source issue #${ISSUE_NUMBER}…"
3839
39- issue_json=$(curl -sSL \
40+ issue_json=$(timeout 5s curl -sSL \
4041 -H "Authorization: Bearer ${GH_TOKEN}" \
4142 -H "Accept: application/vnd.github+json" \
4243 "https://api.github.com/repos/${SOURCE_OWNER}/${SOURCE_REPO}/issues/${ISSUE_NUMBER}")
5556 # Build search query: repo:TARGET_OWNER/TARGET_REPO is:issue is:open "Original author: @author"
5657 encoded_query=$(printf 'repo:%s/%s is:issue is:open "Original author: @%s"' "$TARGET_OWNER" "$TARGET_REPO" "$author" | jq -sRr @uri)
5758
58- search_resp=$(curl -sSL \
59+ search_resp=$(timeout 5s curl -sSL \
5960 -H "Authorization: Bearer ${GH_TOKEN}" \
6061 -H "Accept: application/vnd.github+json" \
6162 "https://api.github.com/search/issues?q=${encoded_query}")
7879
7980 echo "Updating source issue #${ISSUE_NUMBER} as duplicate and closing…"
8081
81- curl -sSL \
82+ timeout 5s curl -sSL \
8283 -X PATCH \
8384 -H "Authorization: Bearer ${GH_TOKEN}" \
8485 -H "Accept: application/vnd.github+json" \
9293
9394 echo "Commenting on source issue to inform candidate…"
9495
95- curl -sSL \
96+ timeout 5s curl -sSL \
9697 -X POST \
9798 -H "Authorization: Bearer ${GH_TOKEN}" \
9899 -H "Accept: application/vnd.github+json" \
@@ -108,17 +109,17 @@ jobs:
108109 private_body=$(cat <<EOF
109110 Application submitted via website → public intake issue → mirrored by GitHub Actions.
110111
111- **Origin al author:** @${author}
112- **Origin al issue (now deleted):** https://github.com/${SOURCE_OWNER}/${SOURCE_REPO}/issues/${ISSUE_NUMBER}
112+ **Original author:** @${author}
113+ **Original issue (now deleted):** https://github.com/${SOURCE_OWNER}/${SOURCE_REPO}/issues/${ISSUE_NUMBER}
113114
114- ---
115+ ---
115116
116- ${body}
117- EOF
118- )
117+ ${body}
118+ EOF
119+ )
119120
120- create_payload=$(jq -n \
121- --arg title "$title" \
121+ create_payload=$(jq -n \
122+ --arg title "$title" \
122123 --arg body "$private_body" \
123124 '{
124125 title: $title,
@@ -128,7 +129,7 @@ jobs:
128129
129130 echo "Creating issue in ${TARGET_OWNER}/${TARGET_REPO}…"
130131
131- create_resp=$(curl -sSL \
132+ create_resp=$(timeout 5s curl -sSL \
132133 -X POST \
133134 -H "Authorization: Bearer ${GH_TOKEN}" \
134135 -H "Accept: application/vnd.github+json" \
@@ -149,7 +150,7 @@ jobs:
149150
150151 echo "Scrubbing and closing source issue before deletion…"
151152
152- curl -sSL \
153+ timeout 5s curl -sSL \
153154 -X PATCH \
154155 -H "Authorization: Bearer ${GH_TOKEN}" \
155156 -H "Accept: application/vnd.github+json" \
@@ -162,7 +163,7 @@ jobs:
162163 --arg id "$node_id" \
163164 '{ query: "mutation DeleteIssue($id:ID!){ deleteIssue(input:{issueId:$id}){ clientMutationId }}", variables: { id: $id } }')
164165
165- delete_resp=$(curl -sSL \
166+ delete_resp=$(timeout 5s curl -sSL \
166167 -X POST \
167168 -H "Authorization: Bearer ${GH_TOKEN}" \
168169 -H "Accept: application/vnd.github+json" \
0 commit comments