all-contributors / app

🤖 A GitHub App to automate acknowledging contributors to your open source projects
https://allcontributors.org
MIT License
576 stars 150 forks source link

bot is not listening to issue body #352

Closed 12rambau closed 2 years ago

12rambau commented 3 years ago

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

Berkmann18 commented 3 years ago

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

12rambau commented 3 years ago

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

Berkmann18 commented 3 years ago

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

12rambau commented 3 years ago

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 commented 3 years ago

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 ?

gr2m commented 3 years ago

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?

12rambau commented 3 years ago

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

gr2m commented 3 years ago

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 :)

krzkaczor commented 3 years ago

@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

12rambau commented 3 years ago

@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

tenshiAMD commented 2 years ago

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

12rambau commented 2 years ago

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

tenshiAMD commented 2 years ago

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

@12rambau it's okay. no worries 🎉