Data export
Love the project !
I would appreciate export options to use it in internal presentations, if you are open to contribution and don't have the time to work on that yourself, I'd be happy to help :)
It would be great if you can work on this! However the Supabase part is current not tracked in the repository. I'll notify you after I set it up.
@Henri-ColibrITD you can now begin setting up the project locally by following the instructions in CONTRIBUTING.md. Due to the use of GitHub Apps, the setup could appear complex. If you face any issue or the docs is not clear enough, feel free to ask for help!
I was wondering, if we are confident the data pipeline (calling the github api to retrieve the repo stats, storing it in db, and getting the needed data from the db) works well, and if one is mainly working on UI stuff (as I would be I think), could I instead setup a "mock" local db like SQLite with a set of fake data, and hide it behind a "dev" flag or something like this ? (if you use an orm, it should be quite straight forward, but from what I see you use directly the supabase client ?)
Yes I currently use the Supabase client directly. You can of course setup a mock db if that won't be too complicated for you.
So, I went for the supabase route since adding a whole new abstraction layer for the db on top of supabase seemed too much work for a simply UI tweak (OK, there is a tiny bit more, but not that much). I believe I added the desired functionality, but I cannot for my life get the supabase anon key mentioned in https://github.com/repohistory/repohistory/blob/main/CONTRIBUTING.md
In case you are curious, my fork is available at https://github.com/Henri-ColibrITD/repohistory, but once I manage to fix this supabase thing, I'll do a pull request.
In CONTRIBUTING.md, you mention for the following
SUPABASE_ANON_KEY="anon key from step 5 output"
But since I did not get the key at step 5, I'm quite stuck (I searched for other means to retrieve this key, but without success for now). Do you know of another mean to retrieve it ? (In case you want to discuss this live, I could setup a meeting on the platform of your choice)
For more information, here is what I should get according to docs:
Started supabase local development setup.
API URL: http://localhost:54321
DB URL: postgresql://postgres:postgres@localhost:54322/postgres
Studio URL: http://localhost:54323
Inbucket URL: http://localhost:54324
anon key: eyJh......
service_role key: eyJh......
and here is what I get
Started supabase local development setup.
API URL: http://127.0.0.1:65431
GraphQL URL: http://127.0.0.1:65431/graphql/v1
DB URL: postgresql://postgres:[email protected]:65432/postgres
Studio URL: http://127.0.0.1:65433
@Henri-ColibrITD Thanks for the detail information. You can fix the issue by enabling auth inside supabase/config.toml:
[auth]
enabled = true
and then restart the supabase client:
npx supabase stop
npx supabase start
Then you should see those two keys.
I misconfigured this file a few weeks ago. It should have been enabled originally. Sorry for the inconvenience.
No problem, thanks for the quick reply! What about APP_PRIVATE_KEY ? It looks it should be a cryptographic key but I don't get which one
That's the GitHub App private key. You should be able to generate one inside GitHub App settings.
Ok, making progress on the setting up process: there seem to be a problem with the dependencies now:
Module not found: @nextui-org/system-rsc tried to access @nextui-org/theme (a peer dependency) but it isn't provided by its ancestors; this makes the require call ambiguous and unsound.
and for a more detailed error message:
@Henri-ColibrITD What package manager are you using? I personally use yarn. Maybe this affects the results.
I noticed you're using yarn, so to minimize the differences between our two systems I used it too. It's the first time I use it (maybe explaining the noobie questions) so I might have misconfigured some parts.
Did you run yarn to install the dependencies?
I did! If I rerun it here is what I get:
$ yarn
➤ YN0000: · Yarn 4.1.1
➤ YN0000: ┌ Resolution step
➤ YN0000: └ Completed in 0s 270ms
➤ YN0000: ┌ Fetch step
➤ YN0000: └ Completed in 0s 925ms
➤ YN0000: ┌ Link step
➤ YN0000: │ ESM support for PnP uses the experimental loader API and is therefore experimental
➤ YN0000: └ Completed
➤ YN0000: · Done with warnings in 1s 516ms
I implemented the feature on a fork available here: https://github.com/Henri-ColibrITD/repohistory I could not test it but the feature is not groundbreaking so it shouldn't be too bad to review. I see two ways to move forward from there: either I manage to fix my environment problem or I can do a PR on a dev branch of your repo and you take back the lead on this feature. I'll try to fix my env and I'll keep you up to date
Ok, by deleting everything (including the docker volumes and the repo itself), recloning the repo and reseting the yarn.lock file to its state when I initially forked the repo, I managed to make things work !
Now, I have the problem that, in src\utils\getLimit.ts
const { data, error } = await supabase
.from('users')
.select('*')
.eq('installation_id', installationId);
returns an empty list.
I installed the github app only on my fork of repohistory.
If I change getLimit to return a constant value, I have access to this repo, but then I have no data on the dashboard as you can see here:
Do you know why this would happen ? (btw, if you don't want to pollute this feed, we can move this discussion to a private channel of you choice, just tell me :) )
we can move this discussion to a private channel of you choice, just tell me :)
@Henri-ColibrITD Great I think we can discuss this in Discord! My username is m4xshen.