refactor(context): read owner and repo from payload

- switch from `github.context.repo` (which reads the `GITHUB_REPOSITORY` env var) to reading the repository owner and name from the webhook payload.
- aligns with how all other context data is already read.
- needed for a future ecosystem CI where event payloads from different repositories will be used as fixtures.
- also simplifies local testing since `GITHUB_REPOSITORY` no longer needs to be set manually.
This commit is contained in:
peaklabs-dev committed 2026-04-15 16:17:56 +02:00
1 parent 50d9f4af78
commit e7178685df
1 file changed
+2 -2
+2 -2
View File
@@ -12,8 +12,8 @@ export function buildContext(): Context {
core.debug(`Payload:\n${JSON.stringify(payload, null, 2)}`);
return {
owner: github.context.repo.owner,
repo: github.context.repo.repo,
owner: payload.repository.owner.login,
repo: payload.repository.name,
repoUrl: pr.base.repo.html_url,