Created
May 6, 2021 20:55
-
-
Save gr2m/6de775e2f7d089092b90f8b6c4c12c74 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Menu: Set GitHub Status with Octokit | |
// Description: Sets the status text on your GitHub Profile | |
const { Octokit } = await npm("scriptkit-octokit"); | |
const octokit = new Octokit({ | |
auth: { | |
scopes: ["user"], | |
env: "GITHUB_TOKEN_SET_USER_PROFILE", | |
}, | |
}); | |
await octokit.graphql( | |
`mutation ($text:String) { | |
changeUserStatus(input:{message:$text}) { | |
status { | |
message | |
} | |
} | |
}`, | |
{ | |
text: await arg("What would you like to say?"), | |
} | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment