Back

Functions Not Showing GitHub Repositories

  • 0
  • Functions
  • Web
  • Cloud
itsjustintime
28 Dec, 2023, 01:31

{"timestamp":1703726693.86,"category":"xhr","data":{"method":"GET","url":"https://cloud.appwrite.io/v1/vcs/github/installations/658ccc81e44d32e9fb97/providerRepositories","status_code":500},"type":"http"}],"modules":{"svelteKit":"latest"},"contexts":{"trace":{"trace_id":"0eb5febb61134bcf95ba346e98fea325","span_id":"90b788e678202886"}}}

TL;DR
Issue: Functions are not showing GitHub repositories in the GitHub repo list. Solution: The issue is caused by the "Make profile private and hide activity" option being checked in the GitHub profile settings. Uncheck this option and the repositories should load properly in the GitHub repo list. Refer to the issue link for more information: <https://github.com/appwrite/appwrite/issues/7352> Note: The CLI can still be used to deploy functions if the GitHub integration is not working.
Drake
28 Dec, 2023, 01:43

Weird... Appwrite wasn't able to get any repos from GitHub on your behalf

Drake
28 Dec, 2023, 01:47

What happens if you use the search query in that repo yourself?

itsjustintime
28 Dec, 2023, 05:13

It seems to work fine by myself. I generated a PAT and ran this curl -H "Authorization: Bearer github_pat_<REST_OF_KEY>" "https://api.github.com/search/repositories?q=user:leejustin"

and I got the expected payload with objects about my repository

itsjustintime
28 Dec, 2023, 05:14

Interestingly, if I try to create a function and tell it to create a new repo for me, it goes through. Looking for existing repos still has the same issue where it's not appearing.

Drake
28 Dec, 2023, 05:14

Can you include the fork:true?

itsjustintime
28 Dec, 2023, 05:16

q=user:leejustin%20fork:true still returns successfully

itsjustintime
28 Dec, 2023, 05:18

So after Appwrite creates a repository on my behalf, I can't see that one either. Same error.

TypeScript
# providerRepositories
{"message":"Server Error","code":500,"type":"general_unknown","version":"0.12.29"}

Don't think this is very useful since the API is just doing a fetch for everything. But I figured that it'd be a datapoint anyways.

Drake
28 Dec, 2023, 05:20

Hmm same error...

Drake
28 Dec, 2023, 05:21

Does the response have an items key?

itsjustintime
28 Dec, 2023, 05:25

yeah. here's the payload with one of the repository payloads. Response code is 200

Drake
28 Dec, 2023, 05:31

Maybe there's a bug with selecting only select repos?

itsjustintime
28 Dec, 2023, 05:33

I had changed the app permissions to all repositories and still get this error 😦

Drake
28 Dec, 2023, 05:39

So I just tested and Appwrite was able to fetch my repos 🧐

itsjustintime
28 Dec, 2023, 06:07

🧐 I uninstalled the GitHub app and revoked the permissions. Set it all up again from scratch. GitHub Appwrite app looks ok. Still get the same error.

itsjustintime
28 Dec, 2023, 06:08

Tried in Safari as well same issues. Thought maybe some ad blocker was implicitly blocking something.

itsjustintime
28 Dec, 2023, 06:09

FWIW, my GitHub account has 2FA on. But that shouldn't matter since my cURL request worked.

Drake
28 Dec, 2023, 07:16

Ya, I have 2FA too

Drake
28 Dec, 2023, 07:20

Btw, you're still able to use the CLI to deploy functions. You don't have to use the GitHub integration. I'll have to look more into this tomorrow

itsjustintime
29 Dec, 2023, 00:22

I've just been using the CLI to deploy. It would have been nice to use the GitHub integration, but I think it will come back to bite someone in the butt 😸 let me know if you need me to test anything but I guess this is low priority now for my personal use case.

Drake
29 Dec, 2023, 00:41

soo I think the problem is you have "Make profile private and hide activity" checked in https://github.com/settings/profile. Here's the issue: https://github.com/appwrite/appwrite/issues/7352

itsjustintime
29 Dec, 2023, 00:54

Oh you're right. I do that have toggled. Thanks for looking into this! I forgot but I also didn't realize that would effect things.

Drake
29 Dec, 2023, 00:55

i don't think it should. you gave access to the repo so the search should work...unless it's a bug with the github api 🧐

itsjustintime
29 Dec, 2023, 00:58

Just confirmed. Unchecking the top results in the GitHub repo list loading properly. So that is indeed the source of the issue.

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more