Skip to content

docs(api): drop the first and last pagination links - #12394

Open
jd wants to merge 1 commit into
mainfrom
devs/jd/jd/mrgfy-3192-drop-first-last-pagination-links/drop-first-last-pagination-links--d80e1c8b
Open

docs(api): drop the first and last pagination links#12394
jd wants to merge 1 commit into
mainfrom
devs/jd/jd/mrgfy-3192-drop-first-last-pagination-links/drop-first-last-pagination-links--d80e1c8b

Conversation

@jd

@jd jd commented Aug 14, 2026

Copy link
Copy Markdown
Member

The API no longer advertises rel="first" or rel="last".

first was a duplicate of calling the endpoint with no cursor, and
last was not the final page of a forward walk but a backward walk from
the end of the dataset — so it landed on a page boundary that paging
forward never produces. Documenting them sent readers toward links that
either told them nothing new or returned items shifted against every
other page.

Also documents that next and prev each appear only when there is
somewhere to go, so a response with nothing before or after it carries
no Link header at all, and points readers at the cursor-less request
as the way back to the first page.

Engine change: Mergifyio/monorepo#38724

Related to MRGFY-3192

The API no longer advertises `rel="first"` or `rel="last"`.

`first` was a duplicate of calling the endpoint with no cursor, and
`last` was not the final page of a forward walk but a backward walk from
the end of the dataset — so it landed on a page boundary that paging
forward never produces. Documenting them sent readers toward links that
either told them nothing new or returned items shifted against every
other page.

Also documents that `next` and `prev` each appear only when there is
somewhere to go, so a response with nothing before or after it carries
no `Link` header at all, and points readers at the cursor-less request
as the way back to the first page.

Engine change: Mergifyio/monorepo#38724

Related to MRGFY-3192

Change-Id: Id80e1c8ba52f12978f8761755d1e5a8be208676a
Copilot AI lite review requested due to automatic review settings August 14, 2026 15:02
@mergify
mergify Bot had a problem deploying to Mergify Merge Protections August 14, 2026 15:02 Failure
@mergify

mergify Bot commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Merge Protections

🔴 2 of 6 protections blocking · waiting on 👀 reviews

Protection Waiting on
🔴 👀 Review Requirements 👀 reviews
🔴 🔎 Reviews 👀 reviews
🟢 🤖 Continuous Integration
🟢 Enforce conventional commit
🟢 📕 PR description
🟢 🚦 Auto-queue

🔴 👀 Review Requirements

Waiting for

  • #approved-reviews-by >= 2
This rule is failing.
  • any of:
    • #approved-reviews-by >= 2
    • author = dependabot[bot]
    • all of:
      • author = mergify-ci-bot
      • -head ~= ^docs-agent/

🔴 🔎 Reviews

Waiting for

  • #review-requested = 0
  • #review-threads-unresolved = 0
This rule is failing.
  • #review-requested = 0
  • #review-threads-unresolved = 0
  • #changes-requested-reviews-by = 0

Show 4 satisfied protections

🟢 🤖 Continuous Integration

  • all of:
    • check-success = build
    • check-success = lint
    • check-success = test
    • any of:
      • check-success = test-broken-links
      • label = ignore-broken-links
    • any of:
      • check-success=Cloudflare Pages
      • -head-repo-full-name~=^Mergifyio/

🟢 Enforce conventional commit

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|internal|docs|style|refactor|perf|test|build|ci|chore|revert|ui)(?:\(.+\))?!?:

🟢 📕 PR description

  • body ~= (?ms:.{48,})

🟢 🚦 Auto-queue

When all merge protections are satisfied, this pull request will be queued automatically.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the public API pagination documentation to match current behavior by removing rel="first" and rel="last" from the described Link header relations, and clarifying how clients should navigate back to the beginning of a cursor-based listing.

Changes:

  • Removes documentation for rel="first" / rel="last" and updates the Link header example accordingly.
  • Documents that next/prev links are only present when applicable, and that returning to the first page is done by omitting cursor.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines 149 to +150
Link: <https://api.mergify.com/v1/repos/Mergifyio/my-repo/logs?cursor=abc&per_page=20>; rel="next",
<https://api.mergify.com/v1/repos/Mergifyio/my-repo/logs?cursor=xyz&per_page=20>; rel="last",
<https://api.mergify.com/v1/repos/Mergifyio/my-repo/logs?cursor=def&per_page=20>; rel="first"
<https://api.mergify.com/v1/repos/Mergifyio/my-repo/logs?cursor=def&per_page=20>; rel="prev"
Comment on lines +158 to +159
Either relation is present only when there is a page to go to, so a response
with nothing before or after it carries no `Link` header at all.
@mergify
mergify Bot requested a review from a team August 14, 2026 15:05
@jd
jd marked this pull request as ready for review August 15, 2026 08:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants