"was submitted too quickly" from GraphQL API

Hi,

I cannot find any answer on the internet. I have a GitHub Action that does some changes to a project, pushes changes to a branch and creates a PR.

This process is done for like 30 repositories, one by one, not all at he same time.

Randomly PR creation fails with was submitted too quickly and I have no idea. I even added 5sec sleep between push and PR creation, no luck :frowning:
And 1month ago action worked perfectly without such issues

++ @derberg
I am having the exact same issue - added sleep as well. Issue’s occurrence seems unpredictable:

pull request create failed: GraphQL error: was submitted too quickly

FYI for me the only solution was implementing a primitive retry global-workflows-support/api-calls.js at f4ca843e978c802faba8247c5c28b2858c23ab5e · derberg/global-workflows-support · GitHub

Thanks @derberg!! Noted! Odd there is no other known solution to date.

I have the same problem here. Any updates?

Nothing I’m aware of, but my workaround retry works, and issue is “solved”

Was also going to bump this, as the gh cli worked perfect for me a couple weeks ago to run something like git submodule foreach 'gh pr create <the_rest>' on 100+ submodules, but now nothing seems to work; not even some super slow goofy code such as

    const repos = [] // long list of submodule repos
    let i = 0;
    do {
        await new Promise(resolve => setTimeout(() => {
            console.log(repos[i]);
            pr(repos[i]); // just spawns a child-process and execs to `gh pr create` command.
            i++;
            resolve();
        }, 10000));
    } while (i < repos.length)

Is there a cooldown period I need to wait for if I hit this error? it seems like I can get a couple created, but once it’s down, it’s totally down.

Edit: the above was failing, so i manually ran the first failing PR via cli. it worked. Now the script is running fine (albeit insanely slow at 1 PR per 10 seconds). Weird.