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

GitHub API error: The search is longer than 256 characters. #103

Open
h-yon opened this issue Aug 5, 2024 · 2 comments
Open

GitHub API error: The search is longer than 256 characters. #103

h-yon opened this issue Aug 5, 2024 · 2 comments

Comments

@h-yon
Copy link

h-yon commented Aug 5, 2024

Thank you for this great gem.

I am running git-pr-release --squashed in CI on GitHub Actions to create prod release PR.
When the number of PRs contained became large, I encountered an error.
The following is the runner's output (query is masked, keeping string length).

▼ Run git-pr-release --squashed
git-pr-release --squashed
shell: /usr/bin/bash -e {0}
env:
GIT_PR_RELEASE_TEMPLATE: ../../_temp/tmp.xxx
GIT_PR_RELEASE_TOKEN: ***
GIT_PR_RELEASE_BRANCH_PRODUCTION: release
GIT_PR_RELEASE_BRANCH_STAGING: main
TZ: Asia/Tokyo
To use retry middleware with Faraday v2.0+, install `faraday-retry` gem
To use multipart middleware with Faraday v2.0+, install `faraday-multipart` gem; note: this is used by the ManageGHES client for uploading licenses
/opt/hostedtoolcache/Ruby/3.3.4/x64/lib/ruby/gems/3.3.0/gems/octokit-9.1.0/lib/octokit/response/raise_error.rb:14:in `on_complete': GET https://api.github.com/search/issues?q=repo%3Amyorgxx%2Fmyrepositoryx+is%3Apr+is%3Aclosed+0000000+0000000+0000000+0000000+0000000+0000000+0000000+0000000+0000000+0000000+0000000+0000000+0000000+0000000+0000000+0000000+0000000+0000000+0000000+0000000+0000000+0000000+0000000+0000000+0000000+0000000: 422 - Validation Failed (Octokit::UnprocessableEntity)
Error summary:
message: The search is longer than 256 characters.
resource: Search
field: q
code: invalid // See: https://docs.github.com/v3/search/
from /opt/hostedtoolcache/Ruby/3.3.4/x64/lib/ruby/gems/3.3.0/gems/faraday-2.10.1/lib/faraday/middleware.rb:57:in `block in call'
from /opt/hostedtoolcache/Ruby/3.3.4/x64/lib/ruby/gems/3.3.0/gems/faraday-2.10.1/lib/faraday/response.rb:42:in `on_complete'
from /opt/hostedtoolcache/Ruby/3.3.4/x64/lib/ruby/gems/3.3.0/gems/faraday-2.10.1/lib/faraday/middleware.rb:56:in `call'
from /opt/hostedtoolcache/Ruby/3.3.4/x64/lib/ruby/gems/3.3.0/gems/octokit-9.1.0/lib/octokit/middleware/follow_redirects.rb:73:in `perform_with_redirection'
from /opt/hostedtoolcache/Ruby/3.3.4/x64/lib/ruby/gems/3.3.0/gems/octokit-9.1.0/lib/octokit/middleware/follow_redirects.rb:61:in `call'
from /opt/hostedtoolcache/Ruby/3.3.4/x64/lib/ruby/gems/3.3.0/gems/faraday-2.10.1/lib/faraday/rack_builder.rb:152:in `build_response'
from /opt/hostedtoolcache/Ruby/3.3.4/x64/lib/ruby/gems/3.3.0/gems/faraday-2.10.1/lib/faraday/connection.rb:444:in `run_request'
from /opt/hostedtoolcache/Ruby/3.3.4/x64/lib/ruby/gems/3.3.0/gems/faraday-2.10.1/lib/faraday/connection.rb:200:in `get'
from /opt/hostedtoolcache/Ruby/3.3.4/x64/lib/ruby/gems/3.3.0/gems/sawyer-0.9.2/lib/sawyer/agent.rb:99:in `call'
from /opt/hostedtoolcache/Ruby/3.3.4/x64/lib/ruby/gems/3.3.0/gems/octokit-9.1.0/lib/octokit/connection.rb:156:in `request'
from /opt/hostedtoolcache/Ruby/3.3.4/x64/lib/ruby/gems/3.3.0/gems/octokit-9.1.0/lib/octokit/connection.rb:84:in `paginate'
from /opt/hostedtoolcache/Ruby/3.3.4/x64/lib/ruby/gems/3.3.0/gems/octokit-9.1.0/lib/octokit/client/search.rb:99:in `search'
from /opt/hostedtoolcache/Ruby/3.3.4/x64/lib/ruby/gems/3.3.0/gems/octokit-9.1.0/lib/octokit/client/search.rb:49:in `search_issues'
from /opt/hostedtoolcache/Ruby/3.3.4/x64/lib/ruby/gems/3.3.0/gems/git-pr-release-2.2.0/lib/git/pr/release/cli.rb:145:in `search_issue_numbers'
from /opt/hostedtoolcache/Ruby/3.3.4/x64/lib/ruby/gems/3.3.0/gems/git-pr-release-2.2.0/lib/git/pr/release/cli.rb:179:in `fetch_squash_merged_pr_numbers_from_github'
from /opt/hostedtoolcache/Ruby/3.3.4/x64/lib/ruby/gems/3.3.0/gems/git-pr-release-2.2.0/lib/git/pr/release/cli.rb:101:in `fetch_merged_prs'
from /opt/hostedtoolcache/Ruby/3.3.4/x64/lib/ruby/gems/3.3.0/gems/git-pr-release-2.2.0/lib/git/pr/release/cli.rb:46:in `start'
from /opt/hostedtoolcache/Ruby/3.3.4/x64/lib/ruby/gems/3.3.0/gems/git-pr-release-2.2.0/lib/git/pr/release/cli.rb:12:in `start'
from /opt/hostedtoolcache/Ruby/3.3.4/x64/lib/ruby/gems/3.3.0/gems/git-pr-release-2.2.0/exe/git-pr-release:5:in `<top (required)>'
from /opt/hostedtoolcache/Ruby/3.3.4/x64/bin/git-pr-release:25:in `load'
from /opt/hostedtoolcache/Ruby/3.3.4/x64/bin/git-pr-release:25:in `<main>'
Error: Process completed with exit code 1.
@h-yon
Copy link
Author

h-yon commented Aug 5, 2024

I guess this is related

@h-yon
Copy link
Author

h-yon commented Aug 8, 2024

#102 will fix this?

maybe not

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

No branches or pull requests

1 participant