Skip to content

fix(recipes:update): github api now requires is:pull-request parameter#1005

Merged
fabpot merged 1 commit intosymfony:1.xfrom
alainsharemat:issue-974-github-api-now-requires-is-pullrequest-param
Dec 5, 2023
Merged

fix(recipes:update): github api now requires is:pull-request parameter#1005
fabpot merged 1 commit intosymfony:1.xfrom
alainsharemat:issue-974-github-api-now-requires-is-pullrequest-param

Conversation

@alainsharemat
Copy link
Copy Markdown
Contributor

This fix is related to issue #974.

While running recipes:update I got this error:

Calculating CHANGELOG...
In CurlDownloader.php line 630:

  The "https://api.github.com/search/issues?q=95e75e5e424c5f5f611cc57073e399baaf287570" file could not be downloaded (HTTP/2 422 ):                                  
  {"message":"Query must include 'is:issue' or 'is:pull-request'","documentation_url":"https://docs.github.com/rest/search/search#search-issues-and-pull-requests"}

According to github's documentation : Requests that don't include the is:issue or is:pull-request qualifier will receive an HTTP 422 Unprocessable Entity response.

Copy link
Copy Markdown
Member

@fabpot fabpot left a comment

Choose a reason for hiding this comment

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

Should also be rebased on 1.x.

Comment thread src/GithubApi.php Outdated
foreach ($data['items'] as $item) {
// make sure the PR referenced isn't from a different repository
if (false === strpos($item['html_url'], sprintf('%s/pull', $repositoryName))) {
if (!str_contains($item['html_url'], sprintf('%s/pull', $repositoryName))) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Can you revert the 2 unrelated changes?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I did. Had to commit this code to make fabbot.io happy in the first place.

@fabpot fabpot changed the base branch from 2.x to 1.x December 5, 2023 14:09
@fabpot fabpot force-pushed the issue-974-github-api-now-requires-is-pullrequest-param branch from a5c33dd to bc89553 Compare December 5, 2023 14:09
@fabpot
Copy link
Copy Markdown
Member

fabpot commented Dec 5, 2023

Thank you @alainsharemat.

@fabpot fabpot merged commit f96b8bf into symfony:1.x Dec 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants