Skip to content

Commit

Permalink
fix: 🩹 increase per page issues
Browse files Browse the repository at this point in the history
  • Loading branch information
thierrymichel committed Jul 19, 2023
1 parent 0bbbb17 commit 60ac700
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions src/gitlab.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,18 @@ async function getIssues() {
try {
// ? manage pagination?
const page = 1
const perPage = 100
const { api, token } = getApiInfos()
const projectPath = getProjectPath()
const url = `${api}/projects/${projectPath}/issues`
const res = await fetch(`${url}?state=opened&per_page=5&page=${page}`, {
headers: {
'PRIVATE-TOKEN': token,
},
})
const res = await fetch(
`${url}?state=opened&per_page=${perPage}&page=${page}`,
{
headers: {
'PRIVATE-TOKEN': token,
},
}
)

if (!res.ok) {
console.error(
Expand Down

0 comments on commit 60ac700

Please sign in to comment.