@evanpurkhiser/tooling-personal 1.19.0 → 1.22.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/graphql.js +1 -1
- package/dist/utils.js +5 -5
- package/package.json +2 -2
package/dist/graphql.js
CHANGED
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.request = exports.paginatedRequest = exports.githubClient = void 0;
|
|
4
4
|
const graphql_request_1 = require("graphql-request");
|
|
5
5
|
const utils_1 = require("./utils");
|
|
6
|
-
const authorization = `Bearer ${utils_1.
|
|
6
|
+
const authorization = `Bearer ${utils_1.getAccessToken()}`;
|
|
7
7
|
exports.githubClient = new graphql_request_1.GraphQLClient('https://api.github.com/graphql', {
|
|
8
8
|
headers: { authorization },
|
|
9
9
|
});
|
package/dist/utils.js
CHANGED
|
@@ -3,7 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.branchFromMessage = exports.
|
|
6
|
+
exports.branchFromMessage = exports.getAccessToken = exports.getRepoPath = exports.getEmailUsername = exports.getRepoKey = void 0;
|
|
7
7
|
const git_url_parse_1 = __importDefault(require("git-url-parse"));
|
|
8
8
|
const js_yaml_1 = __importDefault(require("js-yaml"));
|
|
9
9
|
const simple_git_1 = __importDefault(require("simple-git"));
|
|
@@ -42,12 +42,12 @@ exports.getRepoPath = getRepoPath;
|
|
|
42
42
|
/**
|
|
43
43
|
* Get's the GitHub Oauth token from the hub config
|
|
44
44
|
*/
|
|
45
|
-
function
|
|
46
|
-
const hubFile = path_1.default.join(process.env.
|
|
45
|
+
function getAccessToken() {
|
|
46
|
+
const hubFile = path_1.default.join(process.env.XDG_DATA_HOME ?? '~/.local/share', 'tooling-personal', 'auth.yml');
|
|
47
47
|
const hubConfig = js_yaml_1.default.load(fs_1.readFileSync(hubFile).toString());
|
|
48
|
-
return hubConfig['
|
|
48
|
+
return hubConfig['token'];
|
|
49
49
|
}
|
|
50
|
-
exports.
|
|
50
|
+
exports.getAccessToken = getAccessToken;
|
|
51
51
|
/**
|
|
52
52
|
* Generates a consistent branch name from a commit message
|
|
53
53
|
*/
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evanpurkhiser/tooling-personal",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.22.0",
|
|
4
4
|
"description": "Evan Purkhiser's personal tooling",
|
|
5
|
-
"repository": "https://github.com/
|
|
5
|
+
"repository": "https://github.com/evanpurkhiser/tooling-personal",
|
|
6
6
|
"author": "Evan Purkhiser",
|
|
7
7
|
"license": "MIT",
|
|
8
8
|
"files": [
|