Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Script now adds the following to a theme's front matter:
Added scrub-themes to scripts in package.json.
Fixes #42
Notes on testing:
I did some manual testing using the following test scenarios:
Test 1: Theme's front matter has an existing
github_branch
key specifiedExpected result: should not modify file
File used:
content/theme/stackbit-theme-vanilla-gatsby.md
Test 2: Theme's front matter does not have a
github_branch
key specifiedExpected result: should add
github_branch: master
File used:
content/theme/stackbit-theme-ampersand.md
(Note: at the time of my testingmaster
was this repo's default branch)Test 3: Theme's front matter has no
stale
keyExpected result: should add
stale: true
File used:
content/theme/solar-theme-jekyll.md
(Note: at the time of my testing this was a stale repo)Test 4: Theme's front matter has an existing old
stale
key setExpected result: should remove the
stale: false
entry and add an entry forstale: true
Manual setup: add
stale: false
to file before testingFile used:
content/theme/pelican-smoothie.md
(Note: at the time of my testing this was a stale repo)Test 5: Theme's front matter has an existing
stale
key setExpected result: Should remove the
stale: true
entry and add an entry forstale: false
Manual setup: add
stale: true
to file before testingFile used:
content/theme/stackbit-theme-archetype.md
(Note: at the time of my testing this was not a stale repo)Note: For tests 3-5 a github_branch is also added because those theme files lacked an explicit github_branch key in the front matter.
All of the above tests were performed and passed as per the expected results before I submitted the PR
Here's what you can use to replicate my testing if you'd like to before merging: