-
Notifications
You must be signed in to change notification settings - Fork 843
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature:Developer] Excessive welcome message #10552
Conversation
Now the welcome message will only be sent once to each new user
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can't test the github action but I ran in command line and noticed a potential problem, is this happening on your end?
id: check-comments | ||
run: | | ||
ISSUE_NUMBER=${{ github.event.issue.number }} | ||
BOT_COMMENT_EXISTS=$(gh issue view "$ISSUE_NUMBER" --json comments --jq '.comments[].body' | grep -q "Hi @$USERNAME," && echo "true" || echo "false") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My command line is giving me issues with parsing the single quote on the jq expression. Are you certain this works?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I ran it in my wsl and also wrote a test file I think it is working fine. You can also check my repo/Create a repo and replace the .github/workflows/first_issue_reply.yml
file with the one in this PR and see if it works.
Below is my test file and result:
As you can see it checks if the user "testing-github-actionn"
get the welcome message which returned true at the bottom of the second sreeenshot. This test file went through ZheyuDeng#5.
Fix #10544
What is the current behavior?
Welcome message can be sent multple time to same user in a issue which can be pretty annouying for first time contributor
See the comment section in this issue for reference
#10475
What is the new behavior?
Welcome message will only be sent at most once to each user.
See ZheyuDeng#4