bellshade / bellshade-monorepo Goto Github PK
View Code? Open in Web Editor NEWRepositori monorepo untuk organisasi bellshade
Repositori monorepo untuk organisasi bellshade
the PR Check is including a PR that is not from me
Menambahkan endpoint baru untuk membuat gambar on fly, kemungkinan akan seperti file yang ini, ada juga versi yang akan menjadi patokan bagaimana nanti endpoint itu bekerja, kemungkinan akan seperti shields.io
Atau rancangan om @wahyall, https://github1s.com/wahyall/nav-buttons-maker
Video:
Referensi Tambahan
https://codepen.io/wahyall/pen/xxLMoLx?editors=0010 -> Next
https://codepen.io/wahyall/pen/LYjqKXZ?editors=0010 -> Prev
Untuk mendukung web bellshade v2, server ini diperlukan untuk mengambil konten file dari repo-repo github yang ada di bellshade.
Contoh dari github API
Get Repository Content:
bellshade/PHP
https://api.github.com/repos/bellshade/PHP/contents
bellshade/PHP/README.md (readme utama)
https://api.github.com/repos/bellshade/PHP/contents/README.md?ref=main
bellshade/PHP/basics (daftar materi di folder basics)
https://api.github.com/repos/bellshade/php/contents/basics
/bellshade/PHP/basics/1_hello_world/README.md (readme pada materi hello world)
https://api.github.com/repos/bellshade/PHP/contents/basics/1_hello_world/README.md?ref=main
Contoh ketika menggunakan octokit
await octokit.request("GET /repos/{owner}/{repo}/contents/{path}", {
owner: "bellshade",
repo: "PHP",
path: "README.md",
});
Get a Tree:
Contoh commit 87fcdbc jika dicari menggunakan get a tree
https://api.github.com/repos/bellshade/bellshade-server/git/trees/87fcdbc40543e952f1a467bccb0095ec38b4b9c3?recursive=true
Strategi yang memungkinkan untuk mencapai hal ini
Karena setiap repo memiliki folder belajar dan algoritma yang berbeda beda, diperlukan sebuah list data yang berupa array of object yang berisi informasi dasar repo
module.exports = [
{
repo: "PHP",
materi: {
basic: "/basics",
algorithm: "/algorithms",
},
},
{
repo: "Javascript",
materi: {
basic: "/learn",
algorithm: "/algorithm",
},
},
// dst.......
];
Referensi:
Get a Tree: https://docs.github.com/en/rest/reference/git#get-a-tree
Get Repository Content: https://docs.github.com/en/rest/reference/repos#get-repository-content
Get repo commits: https://docs.github.com/en/rest/reference/repos#commits
@reacto11mecha minta tolong buat setup .env buat preview di vercel
lagi nyoba nyoba aja ini sih haha
Atau mungkin perlu ku update di deskripsi web dokumentasi api nya ?
Boleh, sekalian di update aja deskripsinya.
Originally posted by @dhafitf in bellshade/bellshade-website-v2#14 (comment)
Issue ini bertujuan untuk memperbarui dokumentasi waktu data diupdate dan kapan waktu data ekspire, akan di update mungkin tanggal 15.
Hal yang memungkinkan dilakukan kedepannya adalah mengubah repositori ini menjadi model monorepo, dimana nanti akan memungkinkan untuk membagikan konfigurasi dan lain-lain supaya bisa dipakai di repo bellshade manapun
Repo name in /leaderboard/pr
such as
{
"title": "Refactor folder yang ada dan mengubah susunan deskripsi pr template",
"html_url": "https://github.com/bellshade/Javascript/pull/143",
"number": 143,
"created_at": "2021-10-19T06:49:38Z",
"merged_at": "2021-10-19T13:19:22Z",
"repo":"Javascript"
}
Ada masalah ketika mengecek jumlah pull request dari si user yang belum pernah berkontribusi ke bellshade sama sekali. Ketika di cek di production, cloudflare akan merestart aplikasi dan akan menguras github token, kemungkinan akan ada masalah ketersediaan data dalam beberapa waktu kedepan.
Terimakasih kepada @ItsArul yang sebelumnya sudah menanyakan pertanyaan bellshade, akhirnya bug ini bisa di deteksi.
Ketika mengunjungi http://localhost:3000/pr_check/ItsArul, maka akan terjadi error ini
Di sisi penerima
$ curl localhost:3000/pr_check/ItsArul
curl: (52) Empty reply from server
Di sisi backend
{"level":30,"time":1642336353040,"pid":31101,"hostname":"ideapad","reqId":"req-1","req":{"method":"GET","url":"/pr_check/ItsArul","hostname":"localhost:3000","remoteAddress":"127.0.0.1","remotePort":43472},"msg":"incoming request"}
TypeError: Property 'pull_requests' should be of type array, received 'null' instead.
at $arr$mainpull_requests (eval at build (/home/ezra/code/node/bellshade-server/node_modules/fast-json-stringify/index.js:147:20), <anonymous>:295:13)
at $main (eval at build (/home/ezra/code/node/bellshade-server/node_modules/fast-json-stringify/index.js:147:20), <anonymous>:195:17)
at serialize (/home/ezra/code/node/bellshade-server/node_modules/fastify/lib/reply.js:728:12)
at preserializeHookEnd (/home/ezra/code/node/bellshade-server/node_modules/fastify/lib/reply.js:372:15)
at preserializeHook (/home/ezra/code/node/bellshade-server/node_modules/fastify/lib/reply.js:357:5)
at _Reply.Reply.send (/home/ezra/code/node/bellshade-server/node_modules/fastify/lib/reply.js:189:7)
at /home/ezra/code/node/bellshade-server/router/main/index.js:128:17
at processTicksAndRejections (node:internal/process/task_queues:96:5)
/home/ezra/code/node/bellshade-server/router/main/index.js:133
if (error.response.status === 422) {
^
TypeError: Cannot read properties of undefined (reading 'status')
at /home/ezra/code/node/bellshade-server/router/main/index.js:133:30
at processTicksAndRejections (node:internal/process/task_queues:96:5)
Kemungkinan akan diubah tipe response nya ketika si user belum pernah berkontirbusi sama sekali, kolom pull_requests
akan di berikan array kosong untuk memperbaiki bug ini.
the error cause is the fastify error code, so i want to change to 404 error code
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.