Skip to content

Queries which succeed via curl fail through github-script #230

@carlocab

Description

@carlocab

Describe the bug
At Homebrew/homebrew-core, we query the number of pull requests with a certain label using this action. (See workflow snippet here.)

Lately, we've been having issues with this query constantly erroring out, so I reached out to GitHub Support to try to get to the bottom of it. (There was a period when the query would work.) They requested for the X-GitHub-Request-Id in the response headers of the query, so, to try to recover one, I added a version of the query using curl.

However, it seems that our curl requests succeed, while the github-script request fails.

I'm not really sure what's going on here, so I'd appreciate some assistance finding out. (I hope this isn't just a silly JavaScript error on our end -- apologies if it is.)

To Reproduce
Steps to reproduce the behavior:

Write a workflow that does the following:

  1. Queries the number of PRs with the label "CI-long-timeout" in Homebrew/homebrew-core using curl.
  2. Executes the same query using actions/github-script@v3.

Run the workflow.

Expected behavior
Both queries should have the same result.

Screenshots
N/A

Desktop (please complete the following information):

  • Ubuntu 20.04.3 (ubuntu-latest)

Additional context

I created a separate repo to reproduce this issue: https://github.com/carlocab/graphql-query-test.git

The repo consists of a single workflow which implements the reproduction steps given above.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions