mirror of
https://github.com/SethCohen/github-releases-to-discord
synced 2026-09-14 20:13:23 +00:00
chore: added updated dependencies
This commit is contained in:
+5
-10
@@ -205,9 +205,7 @@ const TOKEN = "ghp_PersonalAccessToken01245678900000000";
|
||||
const auth = createTokenAuth(TOKEN);
|
||||
const authentication = await auth();
|
||||
|
||||
const response = await request("HEAD /", {
|
||||
headers: authentication.headers,
|
||||
});
|
||||
const response = await request("HEAD /");
|
||||
const scopes = response.headers["x-oauth-scopes"].split(/,\s+/);
|
||||
|
||||
if (scopes.length) {
|
||||
@@ -227,9 +225,7 @@ const TOKEN = "ghp_PersonalAccessToken01245678900000000";
|
||||
const auth = createTokenAuth(TOKEN);
|
||||
const authentication = await auth();
|
||||
|
||||
const response = await request("HEAD /", {
|
||||
headers: authentication.headers,
|
||||
});
|
||||
const response = await request("HEAD /");
|
||||
const clientId = response.headers["x-oauth-client-id"];
|
||||
|
||||
if (clientId) {
|
||||
@@ -252,12 +248,11 @@ const auth = createTokenAuth(TOKEN);
|
||||
const authentication = await auth();
|
||||
|
||||
const response = await request("GET /repos/{owner}/{repo}", {
|
||||
owner: 'octocat',
|
||||
repo: 'hello-world'
|
||||
headers: authentication.headers
|
||||
owner: "octocat",
|
||||
repo: "hello-world",
|
||||
});
|
||||
|
||||
console.log(response.data.permissions)
|
||||
console.log(response.data.permissions);
|
||||
// {
|
||||
// admin: true,
|
||||
// push: true,
|
||||
|
||||
Reference in New Issue
Block a user