Run analytics on Phabricator users to determine things like monthly diff/review counts.
This script requires NodeJS to be installed.
This script uses both an API token from Phabricator and an SSO bearer token for auth to make calls to the Phabricator instance.
- Go to Phabricator > Settings > Conduit API Tokens: https://code.companyinternal.com/settings/user/{your-username}/page/apitokens
- Copy the Command Line API Token there
- Set your environment variable:
export API_TOKEN="<copied token>"
- Establish a ussh session in your shell
- Run the following command:
export BEARER_TOKEN=$(usso -print -ussh code.companyinternal.com 2>&1 | tail -n 1)
Set the BASE_URL
of the Phabricator instance: export BASE_URL="https://code.companyinternal.com"
Run npm install && npm start