Skip to content

Commit 1d1089c

Browse files
committed
Update hiring workflow and page
1 parent 6d7115c commit 1d1089c

File tree

2 files changed

+15
-22
lines changed

2 files changed

+15
-22
lines changed

.github/workflows/hiring-mirror-and-delete.yml

Lines changed: 14 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,8 @@ permissions:
1010

1111
jobs:
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
@@ -83,7 +78,6 @@ jobs:
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 \
@@ -102,7 +96,6 @@ jobs:
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 \

hiring.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,7 @@ _Italic_
213213
const issueBody = bodyLines.join('\n');
214214

215215
const timestamp = new Date().toISOString();
216-
const title = `Application from website${timestamp}`;
216+
const title = `Hiring Application from Website${timestamp}`;
217217

218218
const params = new URLSearchParams({
219219
title: title,

0 commit comments

Comments
 (0)