Skip to content

[BUG]: Filtering pull requests by branch doesnt work #2710

Open
@lumattr

Description

@lumattr

What happened?

Im trying to use the head query parameter as the documentation suggests but im not getting anything back. Even using the branches own label nothing gets returned.

const pull = await octokit.request('GET /repos/{owner}/{repo}/pulls/{pull_number}', { 
  owner, repo, headers,
  pull_number: 91
})
console.log(pull.data.head.label)

const pulls = await octokit.request('GET /repos/{owner}/{repo}/pulls', { 
  owner, repo, headers,
  head: pull.data.head.label
})
console.log(pulls.data)

Versions

@octokit/core 6.1.2, Node v20.12.2

Relevant log output

❯ node main.mjs
org:branchname
[]

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: Up for grabsIssues that are ready to be worked on by anyoneType: BugSomething isn't working as documented

    Type

    No type

    Projects

    • Status

      🔥 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions