Skip to content
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

fix: duplicate comments by github label commenter bot #6240

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

M-DEV-1
Copy link
Contributor

@M-DEV-1 M-DEV-1 commented Feb 17, 2025

Description

This PR fixes #5989

Notes for Reviewers

Added conditional statements to workflow files to check if the comment already exists.

Signed commits

  • Yes, I signed my commits.

@M-DEV-1
Copy link
Contributor Author

M-DEV-1 commented Feb 17, 2025

image

The configuration file (path: .github/labeler.yml) was not found locally, fetching via the api

Should I make changes to fix this too?

@l5io
Copy link
Contributor

l5io commented Feb 17, 2025

🚀 Preview for commit 265bb7a at: https://67b2d8efad6302e85c8f455a--layer5.netlify.app

@M-DEV-1
Copy link
Contributor Author

M-DEV-1 commented Feb 17, 2025

I looked into meshery/meshery repository to compare workflows as I believe that the other repo does not face these issues.

The workflows were more or less the same, so I added the conditionals in the .yml files to ensure that the bot does not comment twice. I have tested this locally using the act -j comment and I do not seem to find any issues with it.

If there are other ways to test out the changes, please do let me know as I do not have access to the secret token.

@M-DEV-1
Copy link
Contributor Author

M-DEV-1 commented Feb 17, 2025

I have discussed the same with @vishalvivekm in today's websites meeting.

Copy link
Member

@sudhanshutech sudhanshutech left a comment

Choose a reason for hiding this comment

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

@M-DEV-1 why the bot comment 2 times, we should fix the root cause instead checking condition.

@M-DEV-1
Copy link
Contributor Author

M-DEV-1 commented Feb 18, 2025

@M-DEV-1 why the bot comment 2 times, we should fix the root cause instead checking condition.

I'll investigate the root cause and make the changes

@leecalcote
Copy link
Member

I looked into meshery/meshery repository to compare workflows as I believe that the other repo does not face these issues.

The workflows were more or less the same, so I added the conditionals in the .yml files to ensure that the bot does not comment twice. I have tested this locally using the act -j comment and I do not seem to find any issues with it.

If there are other ways to test out the changes, please do let me know as I do not have access to the secret token.

@M-DEV-1 let's be consistent between our repos.

What is causing the duplicative commenting? How often does this occur, @sudhanshutech?

@M-DEV-1
Copy link
Contributor Author

M-DEV-1 commented Feb 20, 2025

Yes @leecalcote, I'll make sure of that and look into what exactly is causing this issue.

// @sudhanshutech

@M-DEV-1
Copy link
Contributor Author

M-DEV-1 commented Feb 20, 2025

This issue appears to date back to April-May 2024, and I couldn't find any instances of it occurring prior to that.

The only difference between the Meshery and Layer5 workflows is that label-trigger exists in the Layer5 repository.

I think that the label-commenter and the label-trigger workflows might be clashing with each other.

@M-DEV-1
Copy link
Contributor Author

M-DEV-1 commented Feb 20, 2025

image

The configuration file (path: .github/labeler.yml) was not found locally, fetching via the api

Should I make changes to fix this too?

This makes an API call as the labeler workflow in present in .github/workflows instead of .github

@leecalcote
Copy link
Member

Good. This investigation helps. Knowing the root cause will change your approach to a solution, @M-DEV-1.

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

Successfully merging this pull request may close these issues.

Duplicate message from github action bot
4 participants