]> git.ipfire.org Git - thirdparty/paperless-ngx.git/commitdiff
Update repo maintenance rules
authorshamoon <4887959+shamoon@users.noreply.github.com>
Thu, 24 Oct 2024 23:15:59 +0000 (16:15 -0700)
committershamoon <4887959+shamoon@users.noreply.github.com>
Thu, 24 Oct 2024 23:15:59 +0000 (16:15 -0700)
.github/workflows/repo-maintenance.yml
CONTRIBUTING.md

index 9310f9311f3718b3f6511baeeea0ae9f9cda2d87..13458713b6e5e42a802bcef85f5ebf821f4ba053 100644 (file)
@@ -217,15 +217,20 @@ jobs:
               return new Promise(resolve => setTimeout(resolve, ms));
             }
 
+            const CUTOFF_MAX_COUNT = 80;
             const CUTOFF_1_DAYS = 180;
             const CUTOFF_1_COUNT = 5;
             const CUTOFF_2_DAYS = 365;
-            const CUTOFF_2_COUNT = 10;
+            const CUTOFF_2_COUNT = 20;
+            const CUTOFF_3_DAYS = 730;
+            const CUTOFF_3_COUNT = 40;
 
             const cutoff1Date = new Date();
             cutoff1Date.setDate(cutoff1Date.getDate() - CUTOFF_1_DAYS);
             const cutoff2Date = new Date();
             cutoff2Date.setDate(cutoff2Date.getDate() - CUTOFF_2_DAYS);
+            const cutoff3Date = new Date();
+            cutoff3Date.setDate(cutoff3Date.getDate() - CUTOFF_3_DAYS);
 
             const query = `query(
                 $owner:String!,
@@ -255,9 +260,12 @@ jobs:
             const result = await github.graphql(query, variables);
 
             for (const discussion of result.repository.discussions.nodes) {
-              const discussionDate = new Date(discussion.updatedAt);
-              if ((discussionDate < cutoff1Date && discussion.upvoteCount < CUTOFF_1_COUNT) ||
-                  (discussionDate < cutoff2Date && discussion.upvoteCount < CUTOFF_2_COUNT)) {
+              const discussionUpdatedDate = new Date(discussion.updatedAt);
+              const discussionCreatedDate = new Date(discussion.createdAt);
+              if ((discussionUpdatedDate < cutoff1Date && discussion.upvoteCount < CUTOFF_MAX_COUNT) ||
+                  (discussionCreatedDate < cutoff1Date && discussion.upvoteCount < CUTOFF_1_COUNT) ||
+                  (discussionCreatedDate < cutoff2Date && discussion.upvoteCount < CUTOFF_2_COUNT) ||
+                  (discussionCreatedDate < cutoff3Date && discussion.upvoteCount < CUTOFF_3_COUNT)) {
                 console.log(`Closing discussion #${discussion.number} (${discussion.id}), last updated at ${discussion.updatedAt} with votes ${discussion.upvoteCount}`);
                 const addCommentMutation = `mutation($discussion:ID!, $body:String!) {
                   addDiscussionComment(input:{discussionId:$discussion, body:$body}) {
index bbc017d3653e9b39715222efde854c6a2a2402e4..637cbdbdfb5eb5de9052de95247d7210ec52b155 100644 (file)
@@ -147,7 +147,7 @@ community members. That said, in an effort to keep the repository organized and
 - Issues, pull requests and discussions that are closed will be locked after 30 days of inactivity.
 - Discussions with a marked answer will be automatically closed.
 - Discussions in the 'General' or 'Support' categories will be closed after 180 days of inactivity.
-- Feature requests that do not meet the following thresholds will be closed: 5 "up-votes" after 180 days of inactivity or 10 "up-votes" after 365 days.
+- Feature requests that do not meet the following thresholds will be closed: 180 days of inactivity, < 5 "up-votes" after 180 days, < 20 "up-votes" after 1 year or < 40 "up-votes" at 2 years.
 
 In all cases, threads can be re-opened by project maintainers and, of course, users can always create a new discussion for related concerns.
 Finally, remember that all information remains searchable and 'closed' feature requests can still serve as inspiration for new features.