From dd28b24b380145d6bf3f551160d8e31f77dfaed3 Mon Sep 17 00:00:00 2001 From: Francois Beutin Date: Thu, 9 Nov 2023 16:21:23 +0100 Subject: [PATCH] Add a workaround for Github API refusing to open PRs too quickly --- .github/workflows/pr_on_all_plugins.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/pr_on_all_plugins.yml b/.github/workflows/pr_on_all_plugins.yml index d8a8353..8ab9439 100644 --- a/.github/workflows/pr_on_all_plugins.yml +++ b/.github/workflows/pr_on_all_plugins.yml @@ -136,6 +136,7 @@ jobs: github_token: ${{ secrets.CI_BOT_TOKEN }} branch: ${{ steps.commit-changes.outputs.branch_name }} repository: LedgerHQ/${{ matrix.repo }} + force: true - name: Create 'auto' label if missing run: | @@ -145,6 +146,9 @@ jobs: - name: Create pull request and commment on SDK issue run: | + # Github limits the number of possible PR being opened in a given time window. + # As suggested in the Github documentation, put a 1 second sleep between each POST call + sleep ${{ strategy.job-index }} # Create the PR with a placeholder body. Will be consolidated at a later step pr_url=$(gh pr create \ --base 'develop' \