You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
echo "Open applications found for @${author}: ${open_count}"
66
+
67
+
if [ "$open_count" -gt 0 ]; then
68
+
echo "Existing open application detected. Marking this intake issue as duplicate and NOT mirroring."
69
+
70
+
duplicate_body="We detected that you already have an open application with us linked to your GitHub account (@${author}). Please wait for that application to be processed before submitting another. If you believe this is an error, contact us at [email protected]."
59
71
60
-
create_payload=$(jq -n \
61
-
--arg title "$title" \
62
-
--arg body "$private_body" \
72
+
update_payload=$(jq -n \
73
+
--arg body "$duplicate_body" \
63
74
'{
64
-
title: $title,
65
75
body: $body,
66
-
labels: ["candidate", "source:public-intake"]
76
+
state: "closed"
67
77
}')
68
78
79
+
echo "Updating source issue #${ISSUE_NUMBER} as duplicate and closing…"
# Optional: add a comment too (user will get a notification)
89
+
comment_payload=$(jq -n \
90
+
--arg msg "We detected an existing open application associated with @${author}. We won't create a new one until the current application is closed in our internal system." \
91
+
'{body: $msg}')
92
+
93
+
echo "Commenting on source issue to inform candidate…"
0 commit comments