dify icon indicating copy to clipboard operation
dify copied to clipboard

Add new tool: GitHub Advanced

Open richards199999 opened this issue 1 year ago • 7 comments

Description

Although we have a GitHub tool, however, the previous one does not have some critical feature like search for User, list files and many more, so I add this new advanced one which don't need GitHub token access.

Type of Change

  • [x] New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Haven't tested since I don't have much time (heavy schoolwork).🥲 But hopefully no huge bugs.

TODO Checklist:

  • [x] I have performed a self-review of my own code
  • [x] I have commented my code, particularly in hard-to-understand areas
  • [x] My changes generate no new warnings

richards199999 avatar Apr 23 '24 04:04 richards199999

Some suggestions here for this PR:

  1. prevent introducing a completely new tool but extend the existing one for Github, if possible. And you could 'upgrade' the existed functions in your wary.
  2. Sending raw RESTful HTTP requests may not a good idea to connect a SaaS platform like Github, as it may change the API schema and migrate to new version. pygithub SDK a popular wrapper for Github API is a much better approach to achieve the goals and handle the future impacts, see https://github.com/PyGithub/PyGithub.

bowenliang123 avatar Apr 23 '24 05:04 bowenliang123

  1. I suggest that using GitHub SDK instead, native HTTP requests are not stable enough.
  2. There is already a tool provider named GitHub, AdvancedGithub will confuse users, you can try to contact the author of that and add your name to author fields as co-author.

thx!

Yeuoly avatar Apr 23 '24 07:04 Yeuoly

@bowenliang123 @Yeuoly Thank you for your advice.🤗


You mentioned:

'upgrade' the existed functions in your wary. already a tool provider named GitHub

The reason I didn't replace or modify the original provider is that I think I should not do this on my own🤣 (of cuz i should not). And yes I would contact the author.


You also mentioned:

using GitHub SDK instead

The reason I didn't use it is that I'm not familiar with the framework and I'm kinda busy these days, so might consider do it in Summer? idk

richards199999 avatar Apr 23 '24 07:04 richards199999

@charli117 hi? i think you are the author of the original GitHub tool. do you mind replacing your version with mine and i would add your name as coauthor🤗

richards199999 avatar Apr 23 '24 07:04 richards199999

@charli117 hi? i think you are the author of the original GitHub tool. do you mind replacing your version with mine and i would add your name as coauthor🤗

No problem at all. You adjust

charli117 avatar Apr 23 '24 07:04 charli117

Thanks for your understanding🤗🤗🤗🫡🫡 @charli117

richards199999 avatar Apr 23 '24 07:04 richards199999

@crazywoola May I ask for inviting @richards199999 to join the contributor Wechat group for further and easier discussion? As this PR has reached a reasonable maturity.

bowenliang123 avatar Apr 23 '24 08:04 bowenliang123