Skip to content

ci: fix first-time contributor welcome check#6929

Open
Yashagarwal9798 wants to merge 2 commits into
pipe-cd:masterfrom
Yashagarwal9798:fix-first-time-contributor-welcome
Open

ci: fix first-time contributor welcome check#6929
Yashagarwal9798 wants to merge 2 commits into
pipe-cd:masterfrom
Yashagarwal9798:fix-first-time-contributor-welcome

Conversation

@Yashagarwal9798

Copy link
Copy Markdown
Contributor

What this PR does:

Fixes the first-time contributor welcome workflow to correctly check pull requests opened by the PR author.
It now uses GitHub search with author:<username> instead of the unsupported creator parameter.

Why we need it:

The old check could look at unrelated recent pull requests and incorrectly skip the welcome comment.
This ensures first-time contributors get the welcome message on their first pull request.

Which issue(s) this PR fixes:

Fixes #6918

Does this PR introduce a user-facing change?:
No.

  • How are users affected by this change:
    Users are not affected. This only changes a GitHub Actions workflow.
  • Is this breaking change:
    No.
  • How to migrate (if breaking change):
    No migration is needed.

Signed-off-by: Yashagarwal9798 <yashagarwal9798@gmail.com>
@Yashagarwal9798

Copy link
Copy Markdown
Contributor Author

@Warashi @Ayushmore1214 @rahulshendre Could you please review this PR?

@Ayushmore1214

Copy link
Copy Markdown
Member

@Yashagarwal9798 could you run this once locally and drop a screenshot here ?

@Yashagarwal9798

Copy link
Copy Markdown
Contributor Author

@Ayushmore1214 I tested it in my fork by opening a test PR from test-first-time-welcome into fix-first-time-contributor-welcome.

Since the fixed workflow was on the base branch, the pull_request_target workflow ran and posted the first-time contributor welcome comment successfully.

image image

@Ayushmore1214 Ayushmore1214 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks LGTM!

@Warashi Warashi left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Yashagarwal9798
The pull_request_target workflow runs on the default branch, not the PR's base branch.
Additionally, your fork repository has no PRs other than your test PR. So it's not enough to test this workflow, because pulls.length is less than or equal to 1 regardless of the author.

@harshitghagre

Copy link
Copy Markdown
Contributor

Duplicate of #6730
cc: @Ayushmore1214 @Warashi @Yashagarwal9798

@Ayushmore1214

Copy link
Copy Markdown
Member

@harshitghagre your PR touches the SHA tags and this is about the core logic of the worklfow, so its not a duplicate as far as I unserstand

@Ayushmore1214

Copy link
Copy Markdown
Member

If you think there is some overlapping go ahead point it out specifically, thanks!

@harshitghagre

harshitghagre commented Jun 25, 2026

Copy link
Copy Markdown
Contributor

@Ayushmore1214 You're right, calling it a duplicate wasn't correct. I just meant there might be some overlap, not that both PRs solve the same thing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ci: fix first-time contributor welcome check

4 participants