Refactor GitHub deployment handler: simplify owner extraction logic by removing fallback to login name.

This commit is contained in:
Mauricio Siu 2025-04-26 22:17:09 -06:00
parent 56f525803b
commit 55dc08b6ba

View File

@ -97,9 +97,7 @@ export default async function handler(
try { try {
const tagName = githubBody?.ref.replace("refs/tags/", ""); const tagName = githubBody?.ref.replace("refs/tags/", "");
const repository = githubBody?.repository?.name; const repository = githubBody?.repository?.name;
const owner = const owner = githubBody?.repository?.owner?.name;
githubBody?.repository?.owner?.name ||
githubBody?.repository?.owner?.login;
const deploymentTitle = `Tag created: ${tagName}`; const deploymentTitle = `Tag created: ${tagName}`;
const deploymentHash = extractHash(req.headers, githubBody); const deploymentHash = extractHash(req.headers, githubBody);