Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Conversation

alainsharemat
Copy link
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
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.

@@ -142,7 +142,7 @@ public function getPullRequestForCommit(string $commit, string $repo): ?array
$bestItem = null;
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
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
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
Member

fabpot commented Dec 5, 2023

Thank you @alainsharemat.

@fabpot fabpot merged commit f96b8bf into symfony:1.x Dec 5, 2023
5 of 6 checks passed
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