Commit f199e0f
fix(get_values): use head ref/sha on pull_request_target (#303)
On `pull_request_target`, `get_values` fell through to the `else` branch
and read `GITHUB_REF_NAME` — the **base** branch (e.g. `develop`) — so
`clean_branch_name`, `clean_branch_name_with_suffix`, and
`short_commit_sha` reflected the target branch instead of the PR's head.
`GITHUB_HEAD_REF` and `github.event.pull_request.head.sha` are populated
for **both** `pull_request` and `pull_request_target`, so this just
handles them the same way.
**Impact / audit:** the only consumer that calls `get_values` on
`pull_request_target` is apify-core's `teardown_multi_staging.yaml`
(org-wide search for both terms returns nothing else; every other
consumer uses `pull_request`/push). That teardown *wants* the head ref —
it currently computes `*-develop-<hash>` and no-ops, orphaning
multi-staging envs until the weekly scheduled sweep. So this change only
affects that workflow, in the intended direction.
Closes #302. After release, apify-core drops its interim
`compute_prefix` workaround and apify-web's teardown can move to
`pull_request_target`.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 979b36b commit f199e0f
1 file changed
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
| 47 | + | |
| 48 | + | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| |||
0 commit comments