This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Custom timeout to detect conflicts
authorNicolas R <nicolas@atoomic.org>
Tue, 6 Oct 2020 16:18:30 +0000 (10:18 -0600)
committerNicolas R <nicolas@atoomic.org>
Tue, 6 Oct 2020 16:25:07 +0000 (10:25 -0600)
Give more time to the action detecting merge conflicts.

To detect conflicts we rely on the `mergeable` state
from GitHub API. GitHub uses an async job to compute
this state. We have no other way than patience before
being able to detect a conflict.

.github/workflows/detect-conflicts.yml

index b66992a..ba81df0 100644 (file)
@@ -8,8 +8,11 @@ jobs:
     if: ( github.event.pull_request.head.repo.full_name == 'Perl/perl5' || github.repository == 'Perl/perl5' )
     steps:
       # improve the chance that the mergeable status is computed
-      - run: sleep 300
-      - uses: mschilde/auto-label-merge-conflicts@master
+      #- uses: mschilde/auto-label-merge-conflicts@master
+      # use fork to use custom timeout need https://github.com/mschilde/auto-label-merge-conflicts/pull/43
+      - uses: atoomic/auto-label-merge-conflicts@custom
         with:
           CONFLICT_LABEL_NAME: "hasConflicts"
           GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+          MAX_RETRIES: 600 # 600 * 10 sec => 100 minutes
+          WAIT_MS: 10000 # 10 sec