From 8293dd115fa0ef5cb6a0de694a7be7536d9d0461 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 15 Mar 2026 11:53:10 +0000 Subject: [PATCH 1/3] Initial plan From e08e9f19ebec84825b81a7ec8021605fc9ecebec Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 15 Mar 2026 12:00:41 +0000 Subject: [PATCH 2/3] fix: handle greetings push events Co-authored-by: RohanExploit <178623867+RohanExploit@users.noreply.github.com> --- .github/workflows/greetings.yml | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml index 75676be4..cc8e956f 100644 --- a/.github/workflows/greetings.yml +++ b/.github/workflows/greetings.yml @@ -20,9 +20,20 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} retries: 3 script: | + const supportedEvents = ['issues', 'pull_request_target']; + if (!supportedEvents.includes(context.eventName)) { + core.info(`Skipping unsupported event: ${context.eventName}`); + return; + } + const isPullRequest = !!context.payload.pull_request; const author = context.actor; - const issue_number = isPullRequest ? context.payload.pull_request.number : context.payload.issue.number; + const issue_number = isPullRequest ? context.payload.pull_request?.number : context.payload.issue?.number; + + if (!issue_number) { + core.info('No issue or pull request context found; skipping greeting.'); + return; + } // Check if this is the user's first contribution to the repo const response = await github.rest.issues.listForRepo({ From c8e2ce40a07fda53a465414e67f074b18bda56a8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 15 Mar 2026 12:01:24 +0000 Subject: [PATCH 3/3] chore: address review feedback Co-authored-by: RohanExploit <178623867+RohanExploit@users.noreply.github.com> --- .github/workflows/greetings.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/greetings.yml b/.github/workflows/greetings.yml index cc8e956f..37c4ecae 100644 --- a/.github/workflows/greetings.yml +++ b/.github/workflows/greetings.yml @@ -28,7 +28,7 @@ jobs: const isPullRequest = !!context.payload.pull_request; const author = context.actor; - const issue_number = isPullRequest ? context.payload.pull_request?.number : context.payload.issue?.number; + const issue_number = isPullRequest ? context.payload.pull_request.number : context.payload.issue.number; if (!issue_number) { core.info('No issue or pull request context found; skipping greeting.');