]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Fix: add sleep to close old discussions
authorshamoon <4887959+shamoon@users.noreply.github.com>
Tue, 14 Nov 2023 05:10:20 +0000 (21:10 -0800)
committershamoon <4887959+shamoon@users.noreply.github.com>
Tue, 14 Nov 2023 05:10:20 +0000 (21:10 -0800)
.github/workflows/repo-maintenance.yml

index 68bbd1612d2ade4d651d778f45d3c4fe16c09d85..f7147ddcafa33f874bf4277bb38a2cc725116003 100644 (file)
@@ -50,9 +50,13 @@ jobs:
     name: 'Close Answered Discussions'
     runs-on: ubuntu-latest
     steps:
-      - uses: actions/github-script@v6
+      - uses: actions/github-script@v7
         with:
           script: |
+            function sleep(ms) {
+              return new Promise(resolve => setTimeout(resolve, ms));
+            }
+
             const query = `query($owner:String!, $name:String!) {
               repository(owner:$owner, name:$name){
                 discussions(first:100, answered:true, states:[OPEN]) {
@@ -96,4 +100,5 @@ jobs:
               }
               await github.graphql(closeDiscussionMutation, closeVariables)
 
+              await sleep(1000)
             }