Repository navigation
ci: welcome only a person's first issue or pull request - #8
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What This Changes
The welcome bot comments "Thanks for your first pull request here" on pull requests from people who have opened one before, including the owner.
actions/first-interactioncauses this, in v3.1.0 and on itsmainbranch (actions/first-interaction#369). It comments when either of two checks passes, and both are wrong for a pull request:This replaces the action with a
ghstep. The step lists the author's earlier issues and pull requests from the REST issues endpoint, keeps the ones of the same kind with a lower number, and comments only when there are none. The owner and bots are skipped. The welcome messages are unchanged.GitHub runs
pull_request_targetworkflows from the base branch, so this pull request gets the old comment one more time.Kind
Tests
I ran the step's script locally against this repository with the comment call replaced by
echo:ifskips the owner first)ifskips bots first)With a repository that doesn't exist,
gh apifails and the step exits 1 without posting.Benchmarks
Not needed. The change doesn't touch a rule or any file in
bench/.AI use