app icon indicating copy to clipboard operation
app copied to clipboard

bot is not listening to issue body

Open 12rambau opened this issue 3 years ago • 10 comments

Describe the bug In this repository : https://github.com/openforis/sepal-doc I've set up everything to update automatically the AUTHORS.rst file. But when i' wanted to test it with the following issue, the bot never answered (https://github.com/openforis/sepal-doc/issues/6)

Expected behavior I would have expect to have at least an answer from the bot but nothing

12rambau avatar Mar 21 '21 15:03 12rambau

That's possibly because your config is missing fields. Have you created the config and generated the table yourself? Or with the CLI?

Berkmann18 avatar Mar 22 '21 20:03 Berkmann18

I've created the table myself previously and discovered the bot afterward. The config is reflecting the way i've designed it

12rambau avatar Mar 22 '21 20:03 12rambau

I see, have you tried using the CLI and saw if there were any issues?

Berkmann18 avatar Mar 22 '21 21:03 Berkmann18

I don't really know how to manage nodes dependencies and based on your doc the bot has been designed to avoid using the cli.

My .all-contributorsrc file contains the following :

{
  "files": ["AUTHORS.rst"],
  "imageSize": 100,
  "contributorsPerLine": 7,
  "contributorsSortAlphabetically": false,
  "badgeTemplate": "<img src="https://img.shields.io/badge/all_contributors-<%= contributors.length %>-orange.svg?style=flat-square" alt="All contributors">",
  "contributorTemplate": <a href=\"<%= contributor.profile %>\"><img src=\"<%= contributor.avatar_url %>\" width=\"<%= options.imageSize %>px;\" alt=\"\"/><br /><sub><b><%= contributor.name %></b></sub></a>",
  "skipCi": "true",
  "contributors": []
}

But from what I understand if a bug occurs during the handling of my request, the bot should anwser something like "I didn't understand your request".

Edit

To confirm that it is not related to my configuration file, I've created a new repository and test the exact same issue. https://github.com/12rambau/test_all_contrib/issues/1

Same result the bot is not answering.

Aditional info

As I don't want to use the all_contributor bot on all my repositories, I've only allowed it on specific repository (this one and the openfors/sepal-doc in my organisation) could it be the source of the problem ?

12rambau avatar Mar 30 '21 05:03 12rambau

Ok tested on my own repositories. So this is it, the bot is not answering if the app is only authorized on specific repository. Can it be considered a bug or is it a normal behaviour ?

12rambau avatar Mar 30 '21 06:03 12rambau

It should work if you install the app on selected repositories only, we don't use any organization/user account APIs. And I don't see any errors in our logs for your repository.

The problem with https://github.com/openforis/sepal-doc/issues/6 is that the bot does only listen to comments, not issue bodies. You are the 2nd person I see being confused by it, I think we should implement reacting to newly created issues, too.

Would you like to send a pull request for that?

gr2m avatar Mar 30 '21 11:03 gr2m

If you can show me where to look I would be happy to open a PR

12rambau avatar Mar 30 '21 11:03 12rambau

I'd start out by creating a new file test/integration/issue.test.js based on https://github.com/all-contributors/app/blob/master/test/integration/issue_comment.test.js, the "happy path" test will suffice for getting started.

Next we need to add handling of the issues.opened event in app.js, it should work similar to https://github.com/all-contributors/app/blob/aba4cbf419a4ed3848e45ab2d2948409bbe993d0/app.js#L11-L34

Once we get the test passing, we can look into refactoring to remove code duplication. One thing at a time :)

gr2m avatar Mar 30 '21 12:03 gr2m

@12rambau i've also run into problems with the bot in the past. In the end, I've created a GitHub Action that works much better IMO and even commits changes automatically to the repo: https://github.com/actionwareio/all-contributors-action

krzkaczor avatar Mar 31 '21 12:03 krzkaczor

@krzkaczor I've already seen you advertising the gihub action process that you developed. It seems fantastic.

BUT I don't want to authorize an automatic process to push to my repositories. I'm working with people that are not 100% reliable when it come to git processes so having the extra security of the PR is perfect to handle it.

@gr2m I'm starting a fork. I've never used any of the technology used here, it's out of my league. When I find the time I'll have a look but I will be very slow...

If anyone want to get a headstart, be my guest

12rambau avatar Mar 31 '21 14:03 12rambau

@12rambau is this still irrelevant today? Closing this one for now.

tenshiAMD avatar Oct 13 '22 19:10 tenshiAMD

I think it's not an issue any more, sorry for leaving it on stale

12rambau avatar Oct 14 '22 05:10 12rambau

I think it's not an issue any more, sorry for leaving it on stale

@12rambau it's okay. no worries 🎉

tenshiAMD avatar Oct 14 '22 18:10 tenshiAMD