Commit Graph

17 Commits (7f550a61d121b56943fecef49266c37ff7d9be9b)

Author SHA1 Message Date
Oliver Eyton-Williams 7216ca55cc
refactor: organise TypeScript config and migrate helpers (#44747)
* feat: allow more 1000 steps to be created at once

* refactor: start migrating to typescript

* refactor: delete-step to ts

* refactor: migrated some helpers

* refactor: migrate create-empty-steps

* refactor: migrate create-step-between

* refactor: finish migrating to TS

* refactor: migrate tests

* fix: ensure mock.restore is done after each test

* fix: prevent double-tscing

* fix: repair the tests

* chore: use ts-node for scripts

We don't need the performance boost of incremental compilation and
ts-node is easier to work with

* refactor: consolidate tsconfigs

* refactor: replace gulp

* fix: use ts-node for build-curriculum

* fix: allow ts compilation of config

* feat: create and use create:config script

* fix: add /config to eslint projects

* fix: remove gulp script
2022-01-25 11:34:16 +01:00
Shaun Hamilton ae258ce94c
chore: remove removed contributors/tools path (#44374) 2021-12-03 16:18:54 +00:00
Vinay 5b61c8a56f
refactor(client): ts-migration of i18n/validate-keys.js (#44292)
* refactor - file extenstion change to .ts

* fix - imports syntax

* fix - migration complete

* fix - lint:prettier warn

* refactor - validate-keys in tools/scripts/lint/

* refactor - validate-keys.ts moved to tools/scripts/lint and added in tsconfig.json

* refactor - tsconfig.json file for tools

* fix - lint:ts script update and validate-keys.js added to .eslintignore

* fix - lint:prettier and ts compilation

* fix - ts compilation

* refactor - changes in .gitignore and validate-keys script
2021-11-30 08:37:00 -08:00
Shaun Hamilton 98fc7fba0e
fix(config): build all-langs.js before server (#44274)
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2021-11-25 11:01:50 +00:00
Shaun Hamilton d75e43a1e7
chore: use constants for superblocks (#43886)
* chore: use constants for superblocks

* add prettier ts dec to challenge-helper-scripts

* config/ to ts. broken

* typescripterise tools/ and config/

* create global tsconfig, remove alternate configs

* delete temp ts->js, add to gitignore

* fix gitignore

* re-import SuperBlocks in super-block-intro.tsx

* remove renamed files added again

* fix config

* remove accidental files

* remove snap

* delete built files

* adjust eslintrc for enums

* add node types to root

* ignore build files in lint and prettier

* fix tools/ in tsconfig

* ignore annoying ts warnings

* prettierise Map/index.tsx

* fix enum to match lint rule

* rejig Map to render RWD superblock

* 'pretty minor' - implicitly tsc within root

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>

* fix client/package.json for Gitpod

* broken: migrate @types to root

* fix: use typeRoots to prevent duplication

* fix show.tsx, try typeroots in root

* silly fix for duplicate node_modules types

* remove typeRoots from root

* fix: tsconfig or not tsconfig, that is the...

* fix: ...question: Whether 'tis nobler in the mind

to suffer the slings and arrows of outrageous configs...

* fix: Or to take Arms against a Sea of lint errors
And by opposing end them

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2021-11-19 19:49:40 +05:30
Mrugesh Mohapatra 6c91f81b0e chore(deps): upgrade eslint, prettier & related packages 2021-03-11 12:19:42 +05:30
Mrugesh Mohapatra b5f4754e2a
fix: re-revert the API decoupling (#41263)
* fix(api): decouple api from curriculum

This reverts commit 8f0e441644 and
introduces the implementations from #40703.

* fix(gitpod): add curriculum build to GitPod

This reverts commit 706d70f58d and
introduces implementations from #41234.

* docs: update DevOps manual for api change (#41259)

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2021-02-25 12:02:35 -08:00
Mrugesh Mohapatra 8f0e441644 revert(api): decouple api from curriculum
This reverts commit c077ffe4b9
via PR #40703
2021-02-25 03:40:09 +05:30
Oliver Eyton-Williams c077ffe4b9
feat(api): decouple api from curriculum (#40703) 2021-02-22 12:23:59 +05:30
Randell Dawson c8f6d15688
feat(tool): Add ability to view all open PRs for repos other than freeCodeCamp in the Dashboard app (#40453)
* feat: show open boilerplate prs on dashboard

fix:  rest of boilerplate server changes

fix: more

fix: other

* fix: update lib functions

* fix: retrofitted one-off scripts

* feat: added rateLimit for requests

* fix: reduce time

* fix: put limiter inside each route

* fix: make client show when rated limited

* fix: removed unused probot from app

* fix: renamed folders

* fix: consolidate config.js and constants.js

* chore: update octokit to latest version

* fix: remove invalid file

* fix: refactored update-db.js

* feat: add fcc logo

* fix: logo url

* fix: remove Home link

* fix: change link colors

* fix: added rate limiter to landing page

* fix: ran npm install in client to create package-lock.json

* fix: correct typo in doc

Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com>

* fix: Replace favicon, Gitter => Discord

Signed-off-by: nhcarrigan <nhcarrigan@gmail.com>

* fix: add extra linting guidance to package.json

* Ignore contributor app

Signed-off-by: nhcarrigan <nhcarrigan@gmail.com>

* fix: revert linting rules for client

* fix: add skip_preflight_check=true for tests

Co-authored-by: Kristofer Koishigawa <scissorsneedfoodtoo@gmail.com>

Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
Co-authored-by: Kris Koishigawa <scissorsneedfoodtoo@gmail.com>
Co-authored-by: Nicholas Carrigan (he/him) <nhcarrigan@gmail.com>
2020-12-22 13:43:36 +09:00
Mrugesh Mohapatra 21b27cb7c1
feat: import contribute tools (#38509)
* first commit

* add: adding all files

* added package-lock.json

* fix: labler and getOpenPrs working

* fix: fixed bug with prFilter function

* feat: can check for multiple errors

* add: install more libraries

* refactor: uses getOpenPrs to get PRs

* packages: modified

* feature: added addComment feature

* feature: added ability to check guide errors

* add: added  guideFolderChecks

* fix: corrected issue with open/close

* update: installed new libraries

* fix: updated guide checker

* feat: create license

* fix: update the comment template (#2)

* fix: comment section

* fix: add org name keys

* fix: corrected guide error logic

* fix: removed console.log

Co-Authored-By: RandellDawson <5313213+RandellDawson@users.noreply.github.com>

* fix: corrected guideFolderChecks reduce

* refactor: removed setInterval logic

* feat: added new utilities module

* fix: addComment and labler issues

* feat: changed to module.exports

* fix: improved log file data

* fix: use config var for rateLimiter

Co-Authored-By: RandellDawson <5313213+RandellDawson@users.noreply.github.com>

* fix: used config var for rateLimiter

Co-Authored-By: RandellDawson <5313213+RandellDawson@users.noreply.github.com>

* fix: add vars for production

* fix: add work-logs config

* fix: update gitconfig for work-logs

* fix: update path to work-logs

* docs(readme): add exception for admin v. user

* fix: dotenv will coerce boolean from string (#10)

* fix: changed to sync file save

* feat: updated label script

* feat: installed new libraries

* feat: renamed labelOpenPrs.js to sweeper.js

* feat: 1st attempt repo restructure

* feat: added descriptions to one-off scripts

* fix: rewrote the missing frontmatter message

* feat: created one-off scripts to find frontmatter issues

* fix: add links to relevant style guide

* fix: corrected gitignore input-files

* feat: renamed files/folders to lowercase

* fix: changed prStat.js to pr-stats.js

* fix: renamed prStat.js to pr-stats.js

* fix: renamed addLabels.js to add-labels.js

* fix: deleted typo

* feat: changed .env variables

* fix: added rateLimiter after retrieving pr files

* feat: improved logging functionality

* fix: added catch for unexpected frontmatter error

* fix: changed verbiage unexpected frontmatter error

* fix: correct logging bug

* feat: improved findFailures.js and closeOpen.js

* feat: modified the close/open scripts

* refac: moved labeler.js to pr-tasks

* fix: changed rateLimter time in close-open

* fix: changed delay between close/open

* install: added cli-progress library

* feat: added 2 progress bars for sweeper

* fix: changed rateLimiter for pr-relations script

* fix: corrected directory path for renaming of file to work

* first commit

* first commit

* test travis setup

* more travis setup

* get payload

* test

* test

* test

* app yml pull_requests write

* non-working pullRequest createComment

* problem setting permissions

* create-react-app setup.

* Added styled-components dependency.

* Merge pull request #1 from RandellDawson/feature/prototype

Created prototype.

* Merge pull request #3 from RandellDawson/feat/add-links-to-results

fix: improved input elem behavior

* wip

* test on repo

* tests passing

* fix test title

* issues--write in app.yml

* fix getLabel to createLabel pipeline

* this github scope

* Merge pull request #5 from RandellDawson/refactor/input-react-component

Implemented ref forwarding for Input component. Minor clean up.

* Merge pull request #6 from RandellDawson/feature/search-with-enter-keypress

Added the ability to search by pressing Enter. Associated refactoring.

* Merge pull request #7 from RandellDawson/feature/display-username-with-prs

Added the ability for usernames to be displayed along with found PRs.

* Merge pull request #8 from RandellDawson/feat/report-improvements

Feature: Added Pareto Report and Tabs Navigation

* Merge pull request #9 from RandellDawson/feature/styled-tab-borders

Restyled tab borders to remove doubled-up borders.

* Merge pull request #10 from RandellDawson/feature/styled-components-theme

Implemented styled-components theme.

* Merge pull request #11 from RandellDawson/feature/root-package-json

Adde `package.json` and `.gitignore` to the root folder.

* Merge pull request #14 from RandellDawson/feat/create-search-component

[feature] created Search component

* Merge pull request #16 from RandellDawson/feat/create-search-component

[Feature] Finalized Search Component functionality

* Merge pull request #18 from RandellDawson/fix/correct-search-result-messages

[Fix] Correct search result messages and add info footer

* Merge pull request #19 from RandellDawson/fix/change-link-color

[Fix] Changed links from blue to 006400

* refactor: move sweeper logic to its own directory

* feat: lernafy the sweeper

* refactor: prepare for dashboard backend move

* docs: re-arrange files for cleaner structure

* refactor: prepare @tbushman 's probot for move

* fix: prepare for importing probot

* chore(.gitignore): update root level and remove redundant copy

* refactor: prepare dashboard-client for move

* refactor: prepare repo for bringing in dashboard client

* chore: install deps, remove clutter

* feat: improve efficiency of pr relations script (#23)

* chore: update lock file (#24)

* Feature: API endpoint constants (#30)

* Implemented expeced behaviour for text input.

* Added constants for API endpoints. Refactored Footer, Pareto and Search components accordingly.

* fix: fixed several issues after move to mono repo (#31)

This PR has the following items:

1. Introduces a couple of fixes to the sweeper script from issues right before the move to the mono repo.  These were related to moving labeler out of the root of the sweeper folder and placing into the pr-tasks sub-folder.

2. Combined two scripts which were being used to update the data manually on Glitch (pr-relations.glitch.me).  The new one-off script (get-pr-relations-data.js) downloads the current data.json and then pulls down applicable Github data which updates the data.json and automatically uploads it back to the Glitch server.

3. In an effort to use the same log file across all current one-off scripts and sweeper.js, the ProcessLog class was modified, so now every log created has the same JSON structure as is uploaded to the Glitch server.  This removed a lot of redundant code across 3 files.

4. During a pair-coding session with @honmanyau, we tweaked the UI for the Dashboard app to give it a more consistent look across all views.

5. Based on feedback from a couple of the moderators using the new Dashboard app, the PR title was added along with some other styling. 

6. Added some environment variables for running dashboard-api and dashboard-client in a development mode.

7.  Added a sample_data.json file as a starter file, so someone does not have to do a full data pull to get things up and running. 

8. Modified Pareto view to only display files with 2 or more PRs to speed up the report.

* fix(.env): update paths relative from root of repo (#37)

* docs: update notes on the setup

* feat(tools): add eslint and prettier (#19)

* refactor(lint): apply linting from the tools (#39)

* Revert "refactor(lint): apply linting from the tools (#39)" (#40)

This reverts commit 8be7d12cb3.

* chore: made changes to move off of Glitch

* fix: removed extra lines from sample.env

* docs: added local setup instructions

* docs: update local setup instruction

* docs: update contributing

* docs: create readme.md

* fix(client): CRA config conflicts with the babel-eslint from root (#42)

* feat: add routes and mongodb (#34)

* fix: removed dependace on data.json

* docs: updated README.md

* fix: corrected issues with pareto.js and pr.js

* refactor: simplified mongoose related logic

* feat: added seed shortcut to package.json

* fix: corrected typo

* fix: fixed bug with info.js

* fix: simplified info.js

* fix: corrected updatedAt Schema issue

* fix: corrected typo in comment

* chore(lockfile): update after install from root

* fix: add a seed script to root

* Fix/restructuring and unify code logic (#48)

* fix: first pass at restructure linting cleanup

* fix: second pass of restructure

* fix: corrected path for index.html

* Fix/restructuring (#49)

* moving server scripts to probot/index.js

* non-working express.static config

* config move for seed

* change constant API_HOST to /contribute/

* remove winston

* remove error middleware

* put back client in lerna.json

* fix: fixed CRA static folder issue

* fix: added work-logs folder for one-offs

* small changes

* change /contribute route to /dashboard

* fix: use cross-env in package.json

* formatted with prettier (#50)

* encode mongo uri (#51)

* fix: removed ref to probot/client/.env

* Fixed the format command (#55)

* chore: update lockfile (#56)

* fix: corrected config.oneoff.productionRun issue (#52)

In an earlier PR I use `joi` to make PRODUCTION_RUN environment variables a Boolean, but did not change to the correct reference and did not change the code logic to compare to a Boolean instead of a String value (as it had been before).  This PR corrects that logic, so that the one-off scripts will work in a production mode again.  Also, removed the now unnecessary ` SKIP_PREFLIGHT_CHECK` environment variable from the `probot/.env` file.

* fix: ran npm run format

* fix: corrected some require paths for update-db.js

* fix: drop only specified collections in models.js

* fix: removed lerna for two run scripts

* remove unnecessary environment variables and npm scripts (#59)

* fix: removed config variables not needed

* fix: added pem files to gitignore

* feat: added one-off-script to add english labels

* fix: modified script description

* fix: updated script to use aggregate function

* fix: added note about needing to change url

* init tests

* .toHaveBeenCalledTimes(0) for unrelated PR files

* run tests from root

* lerna run test --scope determined by 'name' field in each package.json

* run jsx in node with .mjs

* shut down mongoose afterEach test

* npm-run-all

* mongoose in tests

* comment out failing script for now

* use probot to get filenames

* remove jsdom and uncomment mongo updateOne test

* only connect mongoose once and better test for PRtest.delete

* fix: added cross-env on npm test and start

* fix: ignore PEM files

* fix: get probot to add stff to db

* fix: changed to aggregate to get info

* fix: renamed update-db to reflect probot

* dashboard route working

* fix: remove calls to update db for now

* fix: update db script for crontab

* Fix: Removal of seed-db (#64)

* fix: removed seeding from production

* fix: removed npm start from instructions

* Fix: Simplify log files for one off scripts (#65)

* fix: removed seeding from production

* fix: removed npm start from instructions

* fix: removed indices from log file

* fix: update lockfile (#66)

* docs: create a CoC

* fix: increased the number of files pulled per PR to Github max of 300 (#70)

* fix: made CRA work with local server running

* added run command just for CRA dev mode

* feat: started working on adding Pareto filters

* fix: added missing fonts for landing page

* fix: filter functionality complete

* fix: removed other as an option

* fix: make language all if no language for filetype

* feat: add some develop scripts

* responsive css (#73)

* Fix broke link of contribution guide (#75)

* [Fix] Update landing page links and make styling for landing page and Dashboard match (#79)

* fix: corrected links and changed header links

* fix: added fonts

* fix: changed layout of Pareto options

* fix: match main page styling

* fix: adjusted padding on menu

* fix: correct link href for Home

* fix: changed title of Dashbaord

* [Fix] Corrected client page title typo (#83)

* fix: corrected typo in page title

* fix: add info record if no collection exists

* docs: updated docs relating to local dev ports

* fix: add count increment when adding

* fix: be able to specify lanuage

* feat: new script to find merge conflicts

* fix: added recheck for unknown status

* fix: add pr number to no results message

* fix: changed from notifying to adding label

* chore: update lockfiles (#92)

* docs: update setup docs (#93)

* fix: update lerna config to install in ci mode

* docs: update readme

* fix/update-local-setup-doc (#98)

* fix/update-local-setup-doc

* fix/capitalization

* Update docs/README.md

Co-Authored-By: Randell Dawson <5313213+RandellDawson@users.noreply.github.com>

* Update docs/README.md

Co-Authored-By: Randell Dawson <5313213+RandellDawson@users.noreply.github.com>

* Update docs/README.md

Co-Authored-By: Randell Dawson <5313213+RandellDawson@users.noreply.github.com>

* Update docs/README.md

Co-Authored-By: Randell Dawson <5313213+RandellDawson@users.noreply.github.com>

* fix/update-homepage-instruction

* fix: remove all guide related code

* chore: remove eslint config from dashboard

* fix: temporarily pause linting of tools/dashboard

Remove this when we have time to configure it properly.

* fix: pause testing on tools/dashboard

Co-authored-by: Randell Dawson <rdawson@onepathtech.com>
Co-authored-by: RandellDawson <5313213+RandellDawson@users.noreply.github.com>
Co-authored-by: tbushman <tbushman@pu.bli.sh>
Co-authored-by: Honman Yau <honmanyau@users.noreply.github.com>
Co-authored-by: Valeriy <ValeraS@users.noreply.github.com>
Co-authored-by: Tracey Bushman <tracey.bushman@gmail.com>
Co-authored-by: Niraj Nandish <nirajnandish@icloud.com>
Co-authored-by: Musthaq Ahamad <musthu.gm@gmail.com>
Co-authored-by: Tom <20648924+moT01@users.noreply.github.com>
Co-authored-by: Oliver Eyton-Williams <ojeytonwilliams@gmail.com>
2020-04-07 18:28:56 +05:30
Bouncey a229bc3a06 fix: Add eslint ignore file to root 2019-02-19 14:30:27 +05:30
Bouncey 36d150cbe1 chore: Install update freecodecamp eslint config 2019-02-19 14:30:27 +05:30
Alex Chaffee a8484873d8 feat(seed): "unpack" and "repack" scripts
add "npm run seed" as alias to "node seed"

unpack tests and solution into HTML file; add titles and help text; style unpacked file

enable running unpacked assert tests in browser

Using browserify, compile "tape", "lodash", jQuery into "unpacked-bundle.js" for use during in-browser unpacked tests

feat(seed): diff after repacking

feat(seed): unpacked tests use Browser TAP chrome dev tool if available
2018-04-03 19:52:56 +05:30
Berkeley Martinez 13a505cf23 Lint main js as part of CI 2015-11-06 17:32:01 -08:00
Berkeley Martinez 5a96e6266b Lint all the things 2015-11-05 15:21:14 -08:00
Berkeley Martinez e8a2060e60 add eslintignore 2015-06-02 13:52:13 -07:00