mirror of
https://github.com/mshick/add-pr-comment.git
synced 2025-12-31 14:20:32 +11:00
Issue number (#64)
* Major code reorg * Add issue arg * Paginate existing comment list
This commit is contained in:
parent
e8076c64f7
commit
8645f3f0ea
17 changed files with 2187 additions and 1968 deletions
13
lib/issues.js
Normal file
13
lib/issues.js
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getIssueNumberFromCommitPullsList = void 0;
|
||||
async function getIssueNumberFromCommitPullsList(octokit, owner, repo, commitSha) {
|
||||
var _a;
|
||||
const commitPullsList = await octokit.rest.repos.listPullRequestsAssociatedWithCommit({
|
||||
owner,
|
||||
repo,
|
||||
commit_sha: commitSha,
|
||||
});
|
||||
return commitPullsList.data.length ? (_a = commitPullsList.data) === null || _a === void 0 ? void 0 : _a[0].number : null;
|
||||
}
|
||||
exports.getIssueNumberFromCommitPullsList = getIssueNumberFromCommitPullsList;
|
||||
Loading…
Add table
Add a link
Reference in a new issue