askthecode/documentation

Select a branch other than default

nfgrilo opened this issue · 12 comments

I'm been testing AskTheCode on my private repo without issues, so that I have subscribed!
However, when I try to access another branch I am unsuccessful:

  1. found no way of switching branches on AskTheCode documentation
  2. tried with GitHub path like https://github.com/xxxxx/App/tree/feature/branchXYZ/Modules/MyModuleXPTO
  3. tried with GitHub path like https://github.com/xxxxx/App/tree/feature/branchXYZ

On 2. and 3. the responses contained no files (but the files are there), so further analysis is on the default branch (not the desired one)
image

I insisted that analysis was done on a different branch than the one I specified earlier, but no luck:

image

What's the correct way of selecting a branch for AskTheCode?

Thanks in advance.

Hi @nfgrilo,

I can confirm that there is indeed a bug with accessing branches. I've already fixed this issue, and the fix is included in the scope of the next release. I'm currently still testing this release on DEV, especially focusing on stabilizing the new Search feature that will be part of it. I expect to release it tomorrow, or the day after tomorrow in the worst case.

I apologize for the inconvenience this has caused. I'll make sure to notify you in this thread once the release is out.

Hi @nfgrilo,

I'm pleased to inform you that the fix for accessing branches has been released. You can find more details about it in the documentation.

P.S. This release also introduces a new cool feature that supports searching within repositories. You can learn more about it in the documentation.

Hello. I am having the same issue nfgrillo was having. AskTheCode has no problem accessing my main repo branch and the contents inside of it, but is still unable to access other branches inside of it. Even after following the updated method. Thanks.
Branch Access

Sorry, it's my fault. All the testing I performed included branches without / in their names.

When you are specifying not just the branch but also a relative path of the repository (for instance, if you want to reduce the scope for the plugin and perform analysis only within a specific directory), the URL looks like:
https://github.com/<owner>/<repo>/tree/<branch>/<relative path>

So, for branches with / inside, only the part prior to the first occurrence of / was considered as the branch name, and the rest was considered as a relative path.

I've just released a hotfix.
Could you please test if it works for you now?

Sorry for the inconvenience. Please ping me if the issue is finally resolved for you.

I really appreciate the very timely response. Unfortunately it still does not seem to be working. I tried renaming my branch to see if the / was the issue, with still no luck. The only way it works is if I just direct it to my main repo URL. Could it be something on my end that is the issue? Here are screen shots to provide context.
Screenshot 2023-09-27 170114
Screenshot 2023-09-27 170053

@GitLukeHub thanks for your cooperation and patience :)

I've checked the logs and here is how ChatGPT sends the request to the plugin:
image

The problem is that it places your branch as a relative path he wants to query the structure of instead of passing it as a whole repository URL.

Could I please ask you to test my assumption in a new chat window using simple prompt like:

https://github.com/GitLukeHub/Galaxia-Repo/tree/v0.3_BasicMultiplayer_04/26/2023
please analyze the repository files and respond with the file names in the root directory

The way ChatGPT interacts with the plugin largely depends on the previous conversation and, especially, your prompts, so, it can significantly affect how ChatGPT behaves.

@dsomok sorry for the late reply, I've missing most of the GitHub notifications 🙃

I just did some tests using a branch with / in its name (/feature/forecasts-v2) and so far so good! Seems to be working well on my side!

Thanks for your prompt reply and fix 🙏

@nfgrilo, thank you for the confirmation, happy to hear that!
In case of any other issues, please do not hesitate to reach out and report an issue.

@GitLukeHub, could you please check once again on your side?

Okay, so it didn't work at first, but I figured out the issue. Your suggestion of it depending largely on previous conversations, and prompts made me realize that it could be my custom instructions causing the bug. I deleted my custom instructions of how I wanted ChatGPT to respond to my inquiries in general, and now it seems to be working great. Thank you so much for the fast responses and patience. I will definitely be upgrading to a higher tier of AskTheCode.

It might be worth noting this inside the Documentation for other users who might encounter the same issue :)

@GitLukeHub, I'm happy to hear that everything is working for you and that you're enjoying using the plugin! I'll be closing this issue as it seems to be resolved. However, please don't hesitate to open new issues if they occur (hopefully not). Thank you for your feedback and cooperation!

Yeah, you are absolutely right, I'll update the documentation on how to troubleshoot this feature