MCPcopy
hub / github.com/sequelize/sequelize / cardToMergedCommit

Function cardToMergedCommit

dev/release-v6.ts:78–94  ·  view source on GitHub ↗
(
  github: Octokit,
  card: Card
)

Source from the content-addressed store, hash-verified

76}
77
78async function cardToMergedCommit(
79 github: Octokit,
80 card: Card
81): Promise<PullRequest | undefined> {
82 const issueNumber = card.content_url?.split('/').pop();
83 const { data: pullRequest } = await github.pulls.get({
84 owner: OWNER,
85 repo: REPO,
86 pull_number: Number(issueNumber)
87 });
88
89 if (!pullRequest?.merged) {
90 return;
91 }
92
93 return pullRequest;
94}
95
96function sortCommits(a: CardCommit, b: CardCommit) {
97 const aDate = new Date(a.commit.merged_at || '');

Callers 1

getCommitsFromProjectFunction · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected