From 28df02fde09e68376f385a7d9233fb0951c7576a Mon Sep 17 00:00:00 2001 From: Mrugesh Mohapatra Date: Wed, 5 Dec 2018 00:21:44 +0530 Subject: [PATCH] refactor: move sweeper logic to its own directory --- constants.js => sweeper/constants.js | 0 {get-prs => sweeper/get-prs}/index.js | 0 {get-prs => sweeper/get-prs}/pr-stats.js | 0 .../add-comment-on-frontmatter-issues.js | 0 .../one-off-scripts}/add-test-locally-label.js | 0 .../one-off-scripts}/close-open-single-pr.js | 0 .../one-off-scripts}/close-open-specific-failures.js | 0 .../one-off-scripts}/comments-and-labels-summary.js | 0 .../one-off-scripts}/find-failures.js | 0 .../one-off-scripts}/get-pr-relations-data.js | 0 package-lock.json => sweeper/package-lock.json | 0 package.json => sweeper/package.json | 10 +++++----- {pr-tasks => sweeper/pr-tasks}/add-comment.js | 0 {pr-tasks => sweeper/pr-tasks}/add-labels.js | 0 {pr-tasks => sweeper/pr-tasks}/close-open.js | 0 {pr-tasks => sweeper/pr-tasks}/index.js | 0 {pr-tasks => sweeper/pr-tasks}/labeler.js | 0 sample.env => sweeper/sample.env | 0 sweeper.js => sweeper/sweeper.js | 0 {utils => sweeper/utils}/index.js | 0 {utils => sweeper/utils}/open-json-file.js | 0 {utils => sweeper/utils}/processing-log.js | 0 {utils => sweeper/utils}/rate-limiter.js | 0 {utils => sweeper/utils}/save-pr-data.js | 0 {utils => sweeper/utils}/save-to-file.js | 0 .../validation}/guide-folder-checks/check-path.js | 0 .../guide-folder-checks/create-error-msg.js | 0 .../guide-folder-checks/frontmatter-check.js | 0 .../validation}/guide-folder-checks/index.js | 0 {validation => sweeper/validation}/index.js | 0 {validation => sweeper/validation}/valid-labels.js | 0 {work-logs => sweeper/work-logs}/.gitkeep | 0 32 files changed, 5 insertions(+), 5 deletions(-) rename constants.js => sweeper/constants.js (100%) rename {get-prs => sweeper/get-prs}/index.js (100%) rename {get-prs => sweeper/get-prs}/pr-stats.js (100%) rename {one-off-scripts => sweeper/one-off-scripts}/add-comment-on-frontmatter-issues.js (100%) rename {one-off-scripts => sweeper/one-off-scripts}/add-test-locally-label.js (100%) rename {one-off-scripts => sweeper/one-off-scripts}/close-open-single-pr.js (100%) rename {one-off-scripts => sweeper/one-off-scripts}/close-open-specific-failures.js (100%) rename {one-off-scripts => sweeper/one-off-scripts}/comments-and-labels-summary.js (100%) rename {one-off-scripts => sweeper/one-off-scripts}/find-failures.js (100%) rename {one-off-scripts => sweeper/one-off-scripts}/get-pr-relations-data.js (100%) rename package-lock.json => sweeper/package-lock.json (100%) rename package.json => sweeper/package.json (64%) rename {pr-tasks => sweeper/pr-tasks}/add-comment.js (100%) rename {pr-tasks => sweeper/pr-tasks}/add-labels.js (100%) rename {pr-tasks => sweeper/pr-tasks}/close-open.js (100%) rename {pr-tasks => sweeper/pr-tasks}/index.js (100%) rename {pr-tasks => sweeper/pr-tasks}/labeler.js (100%) rename sample.env => sweeper/sample.env (100%) rename sweeper.js => sweeper/sweeper.js (100%) rename {utils => sweeper/utils}/index.js (100%) rename {utils => sweeper/utils}/open-json-file.js (100%) rename {utils => sweeper/utils}/processing-log.js (100%) rename {utils => sweeper/utils}/rate-limiter.js (100%) rename {utils => sweeper/utils}/save-pr-data.js (100%) rename {utils => sweeper/utils}/save-to-file.js (100%) rename {validation => sweeper/validation}/guide-folder-checks/check-path.js (100%) rename {validation => sweeper/validation}/guide-folder-checks/create-error-msg.js (100%) rename {validation => sweeper/validation}/guide-folder-checks/frontmatter-check.js (100%) rename {validation => sweeper/validation}/guide-folder-checks/index.js (100%) rename {validation => sweeper/validation}/index.js (100%) rename {validation => sweeper/validation}/valid-labels.js (100%) rename {work-logs => sweeper/work-logs}/.gitkeep (100%) diff --git a/constants.js b/sweeper/constants.js similarity index 100% rename from constants.js rename to sweeper/constants.js diff --git a/get-prs/index.js b/sweeper/get-prs/index.js similarity index 100% rename from get-prs/index.js rename to sweeper/get-prs/index.js diff --git a/get-prs/pr-stats.js b/sweeper/get-prs/pr-stats.js similarity index 100% rename from get-prs/pr-stats.js rename to sweeper/get-prs/pr-stats.js diff --git a/one-off-scripts/add-comment-on-frontmatter-issues.js b/sweeper/one-off-scripts/add-comment-on-frontmatter-issues.js similarity index 100% rename from one-off-scripts/add-comment-on-frontmatter-issues.js rename to sweeper/one-off-scripts/add-comment-on-frontmatter-issues.js diff --git a/one-off-scripts/add-test-locally-label.js b/sweeper/one-off-scripts/add-test-locally-label.js similarity index 100% rename from one-off-scripts/add-test-locally-label.js rename to sweeper/one-off-scripts/add-test-locally-label.js diff --git a/one-off-scripts/close-open-single-pr.js b/sweeper/one-off-scripts/close-open-single-pr.js similarity index 100% rename from one-off-scripts/close-open-single-pr.js rename to sweeper/one-off-scripts/close-open-single-pr.js diff --git a/one-off-scripts/close-open-specific-failures.js b/sweeper/one-off-scripts/close-open-specific-failures.js similarity index 100% rename from one-off-scripts/close-open-specific-failures.js rename to sweeper/one-off-scripts/close-open-specific-failures.js diff --git a/one-off-scripts/comments-and-labels-summary.js b/sweeper/one-off-scripts/comments-and-labels-summary.js similarity index 100% rename from one-off-scripts/comments-and-labels-summary.js rename to sweeper/one-off-scripts/comments-and-labels-summary.js diff --git a/one-off-scripts/find-failures.js b/sweeper/one-off-scripts/find-failures.js similarity index 100% rename from one-off-scripts/find-failures.js rename to sweeper/one-off-scripts/find-failures.js diff --git a/one-off-scripts/get-pr-relations-data.js b/sweeper/one-off-scripts/get-pr-relations-data.js similarity index 100% rename from one-off-scripts/get-pr-relations-data.js rename to sweeper/one-off-scripts/get-pr-relations-data.js diff --git a/package-lock.json b/sweeper/package-lock.json similarity index 100% rename from package-lock.json rename to sweeper/package-lock.json diff --git a/package.json b/sweeper/package.json similarity index 64% rename from package.json rename to sweeper/package.json index 0ddbd01e2d..e16f34015d 100644 --- a/package.json +++ b/sweeper/package.json @@ -1,7 +1,7 @@ { - "name": "automation", + "name": "@freecodecamp/sweeper", "version": "1.0.0", - "description": "Github bots and crawlers for FCC\r # github-bots", + "description": "freeCodeCamp.org's tools for helping maintain its Open Source codebase", "main": "index.js", "dependencies": { "@octokit/rest": "^15.18.0", @@ -22,12 +22,12 @@ }, "repository": { "type": "git", - "url": "git+https://github.com/RandellDawson/automation.git" + "url": "git+https://github.com/freeCodeCamp/github-tools.git" }, "author": "", "license": "BSD-3-Clause", "bugs": { - "url": "https://github.com/RandellDawson/automation/issues" + "url": "https://github.com/freeCodeCamp/github-tools/issues" }, - "homepage": "https://github.com/RandellDawson/automation#readme" + "homepage": "https://github.com/freeCodeCamp/github-tools#readme" } diff --git a/pr-tasks/add-comment.js b/sweeper/pr-tasks/add-comment.js similarity index 100% rename from pr-tasks/add-comment.js rename to sweeper/pr-tasks/add-comment.js diff --git a/pr-tasks/add-labels.js b/sweeper/pr-tasks/add-labels.js similarity index 100% rename from pr-tasks/add-labels.js rename to sweeper/pr-tasks/add-labels.js diff --git a/pr-tasks/close-open.js b/sweeper/pr-tasks/close-open.js similarity index 100% rename from pr-tasks/close-open.js rename to sweeper/pr-tasks/close-open.js diff --git a/pr-tasks/index.js b/sweeper/pr-tasks/index.js similarity index 100% rename from pr-tasks/index.js rename to sweeper/pr-tasks/index.js diff --git a/pr-tasks/labeler.js b/sweeper/pr-tasks/labeler.js similarity index 100% rename from pr-tasks/labeler.js rename to sweeper/pr-tasks/labeler.js diff --git a/sample.env b/sweeper/sample.env similarity index 100% rename from sample.env rename to sweeper/sample.env diff --git a/sweeper.js b/sweeper/sweeper.js similarity index 100% rename from sweeper.js rename to sweeper/sweeper.js diff --git a/utils/index.js b/sweeper/utils/index.js similarity index 100% rename from utils/index.js rename to sweeper/utils/index.js diff --git a/utils/open-json-file.js b/sweeper/utils/open-json-file.js similarity index 100% rename from utils/open-json-file.js rename to sweeper/utils/open-json-file.js diff --git a/utils/processing-log.js b/sweeper/utils/processing-log.js similarity index 100% rename from utils/processing-log.js rename to sweeper/utils/processing-log.js diff --git a/utils/rate-limiter.js b/sweeper/utils/rate-limiter.js similarity index 100% rename from utils/rate-limiter.js rename to sweeper/utils/rate-limiter.js diff --git a/utils/save-pr-data.js b/sweeper/utils/save-pr-data.js similarity index 100% rename from utils/save-pr-data.js rename to sweeper/utils/save-pr-data.js diff --git a/utils/save-to-file.js b/sweeper/utils/save-to-file.js similarity index 100% rename from utils/save-to-file.js rename to sweeper/utils/save-to-file.js diff --git a/validation/guide-folder-checks/check-path.js b/sweeper/validation/guide-folder-checks/check-path.js similarity index 100% rename from validation/guide-folder-checks/check-path.js rename to sweeper/validation/guide-folder-checks/check-path.js diff --git a/validation/guide-folder-checks/create-error-msg.js b/sweeper/validation/guide-folder-checks/create-error-msg.js similarity index 100% rename from validation/guide-folder-checks/create-error-msg.js rename to sweeper/validation/guide-folder-checks/create-error-msg.js diff --git a/validation/guide-folder-checks/frontmatter-check.js b/sweeper/validation/guide-folder-checks/frontmatter-check.js similarity index 100% rename from validation/guide-folder-checks/frontmatter-check.js rename to sweeper/validation/guide-folder-checks/frontmatter-check.js diff --git a/validation/guide-folder-checks/index.js b/sweeper/validation/guide-folder-checks/index.js similarity index 100% rename from validation/guide-folder-checks/index.js rename to sweeper/validation/guide-folder-checks/index.js diff --git a/validation/index.js b/sweeper/validation/index.js similarity index 100% rename from validation/index.js rename to sweeper/validation/index.js diff --git a/validation/valid-labels.js b/sweeper/validation/valid-labels.js similarity index 100% rename from validation/valid-labels.js rename to sweeper/validation/valid-labels.js diff --git a/work-logs/.gitkeep b/sweeper/work-logs/.gitkeep similarity index 100% rename from work-logs/.gitkeep rename to sweeper/work-logs/.gitkeep