Skip to content

Commit

Permalink
Update github.js
Browse files Browse the repository at this point in the history
  • Loading branch information
crazygo authored Nov 19, 2024
1 parent 3f4a9f5 commit e55be60
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/github.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,12 @@ async function getOrCreateIssue(milestone) {
try {
const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/');

const response = await octokit.paginate(octokit.rest.issues.listForRepo, {
const issues = await octokit.paginate(octokit.rest.issues.listForRepo, {
owner,
repo,
milestone: milestone.number,
});
console.info('[octokit.rest.issues.listForRepo]', response);
const { data: issues } = response

let hash = '#' + milestone.number
let issue = issues.find((issue) => issue.title.includes(milestone.title));
issue = issues.find((issue) => issue.title.includes(hash));
Expand Down Expand Up @@ -68,7 +67,7 @@ async function updateIterationPlan(issue, milestone) {
console.info(`Updating milestone plan: ${milestone.title} `)
const [owner, repo] = process.env.GITHUB_REPOSITORY.split('/');

const { data: issues } = await octokit.paginate('GET /repos/{owner}/{repo}/issues', {
const issues = await octokit.paginate(octokit.rest.issues.listForRepo, {
owner,
repo,
milestone: milestone.number,
Expand Down

0 comments on commit e55be60

Please sign in to comment.