Skip to content

Instantly share code, notes, and snippets.

View jitran's full-sized avatar
🏀

Ji Tran jitran

🏀
View GitHub Profile
@jitran
jitran / user.mjs
Created April 5, 2024 02:29
User statistics
import { Octokit } from "octokit";
import dotenv from "dotenv";
dotenv.config();
const octokit = new Octokit({
auth: process.env.GITHUB_TOKEN,
});
const username = process.argv[2]
@jitran
jitran / README.md
Created April 5, 2024 02:46
GitHub App - Installation Access Token

Install the gh-token extension

gh extension install Link-/gh-token

Retrieve the installation access token for your GitHub App

APP_ID=<APP ID>
PRIVATE_KEY=<PATH TO PRIVATE KEY>
INSTALLATION_ID=$(gh token installations --app-id $APP_ID --key $PRIVATE_KEY | jq '.[] | .id')
@jitran
jitran / README.md
Created October 18, 2024 06:45
Copilot Extension Demo: Blackbeard