@@ -10,10 +10,8 @@ permissions:
1010
1111jobs :
1212 mirror-and-delete :
13- # Only act on issues marked as hiring/candidate
14- if : |
15- contains(join(github.event.issue.labels.*.name, ','), 'hiring') ||
16- contains(join(github.event.issue.labels.*.name, ','), 'candidate')
13+ # Only act on issues created from the website
14+ if : ${{ startsWith(github.event.issue.title, 'Hiring Application from website') }}
1715 runs-on : ubuntu-latest
1816
1917 steps :
@@ -23,13 +21,10 @@ jobs:
2321 - name : Mirror to private repo and delete public issue
2422 env :
2523 GH_TOKEN : ${{ secrets.HIRING_REPO_TOKEN }}
26-
2724 SOURCE_OWNER : platformbuilds
2825 SOURCE_REPO : platformbuilds.github.io
29-
3026 TARGET_OWNER : platformbuilds
3127 TARGET_REPO : hiring
32-
3328 ISSUE_NUMBER : ${{ github.event.issue.number }}
3429 run : |
3530 set -euo pipefail
@@ -52,24 +47,24 @@ jobs:
5247
5348 private_body=$(cat <<EOF
5449 Application submitted via website → public intake issue → mirrored by GitHub Actions.
55-
50+
5651 **Original author:** @${author}
5752 **Original issue (now deleted):** https://github.com/${SOURCE_OWNER}/${SOURCE_REPO}/issues/${ISSUE_NUMBER}
58-
53+
5954 ---
6055
6156 ${body}
6257 EOF
63- )
64-
65- create_payload=$(jq -n \
66- --arg title "$title" \
67- --arg body "$private_body" \
68- '{
69- title: $title,
70- body: $body,
71- labels: ["candidate", "source:public-intake"]
72- }')
58+ )
59+
60+ create_payload=$(jq -n \
61+ --arg title "$title" \
62+ --arg body "$private_body" \
63+ '{
64+ title: $title,
65+ body: $body,
66+ labels: ["candidate", "source:public-intake"]
67+ }')
7368
7469 echo "Creating issue in ${TARGET_OWNER}/${TARGET_REPO}…"
7570
8378 private_issue_url=$(echo "$create_resp" | jq -r '.html_url')
8479 echo "Private issue created at: $private_issue_url"
8580
86- # Optional scrub+close before deletion (defence in depth)
8781 scrubbed_body="Thanks for applying! Your application has been recorded in our internal hiring tracker."
8882
8983 update_payload=$(jq -n \
10296 "https://api.github.com/repos/${SOURCE_OWNER}/${SOURCE_REPO}/issues/${ISSUE_NUMBER}" \
10397 -d "$update_payload"
10498
105- # Delete via GraphQL
10699 echo "Deleting source issue via GraphQL…"
107100
108101 graphql_query=$(jq -n \
0 commit comments