Skip to content

Commit

Permalink
revert changes based on review
Browse files Browse the repository at this point in the history
  • Loading branch information
safwansamsudeen committed Mar 21, 2023
1 parent 4763974 commit 06c7fd5
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 18 deletions.
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
node_modules/
.DS_Store
node_modules/
8 changes: 5 additions & 3 deletions building/configlet/lint.md
Original file line number Diff line number Diff line change
Expand Up @@ -527,23 +527,25 @@ The `config.json` file should have the following checks:
## Glossary

1. **Non-blank string**: a string that contains at least one non-whitespace character.
2. **Kebab-case string**: a string that contains only characters in the range `[a-z0-9]`, optionally separated by dashes (e.g. "two-fer"). It must match the regular expression: `^[a-z0-9]+(-[a-z0-9]+)*$`
3. **Title-case string**: a non-blank string that follows the below guidelines (from the [Chicago Manual of Style](https://en.wikipedia.org/wiki/Title_case)):
2. **kebab-case string**: a string that contains only characters in the range `[a-z0-9]`, optionally separated by dashes (e.g. "two-fer"). It must match the regular expression: `^[a-z0-9]+(-[a-z0-9]+)*$`
3. **Title Case string**: a non-blank string that follows the below guidelines (from the [Chicago Manual of Style](https://en.wikipedia.org/wiki/Title_case#Chicago%20Manual%20of%20Style:~:text=Guitar\).%5B3%5D-,Chicago%20Manual%20of%20Style,-%5Bedit%5D) of title case):
- Capitalize the first and last words of titles and subtitles.
- Capitalize "major" words (nouns, pronouns, verbs, adjectives, adverbs, and some conjunctions).
- Lowercase the conjunctions _and_, _but_, _for_, _or_, and _nor_.
- Lowercase the articles _the_, _a_, and _an_.
- Lowercase prepositions, regardless of length, except when they are stressed, are used adverbially or adjectivally, or are used as conjunctions.
- Lowercase the words _to_ and _as_.
- Lowercase the second part of Latin species names.
4. **Sentence-case string**: a non-blank string that follows the below guidelines (see https://en.wikipedia.org/wiki/Letter_case#Sentence_case):
4. **Sentence Case string**: a non-blank string that follows the below [guidelines](https://en.wikipedia.org/wiki/Letter_case#Sentence_case):
- Capitalize the first word of the sentence, as well as proper nouns and other words as required by a more specific rule.
5. **Valid `files` pattern**: A non-blank string¹ that specifies a location of a file used in an exercise, relative to the exercise's directory. A pattern may use one of the following placeholders:

- `%{kebab_slug}`: the `kebab-case` exercise slug (e.g. `bit-manipulation`)
- `%{snake_slug}`: the `snake_case` exercise slug (e.g. `bit_manipulation`)
- `%{camel_slug}`: the `camelCase` exercise slug (e.g. `bitManipulation`)
- `%{pascal_slug}`: the `PascalCase` exercise slug (e.g. `BitManipulation`)
6. **Unique version 4 UUID string**: A string that satisfies all of these conditions:

- It only exists once in the track-level `config.json` file of a given Exercism track
- It does not exist in the track-level `config.json` file of any other Exercism track
- It does not exist in any `canonical-data.json` file in https://github.com/exercism/problem-specifications
Expand Down
3 changes: 2 additions & 1 deletion building/github/contributors-pull-request-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ This documents contains some additional, Exercism-specific guidelines for differ

## Exercise Pull Requests

Creating a pull request for a Concept Exercise or Practice Exercise can be daunting with the many rules around these types of exercises. For this reason, it can take a maintainer two to three hours to review and can result in dozens of comments. To help you, there'll be one primary reviewer commenting on your pull request.
Creating a pull request for a Concept Exercise or Practice Exercise can be daunting with the many rules around these types of exercises. For this reason, it can take a maintainer two to three hours to review and can result in dozens of comments.
To help you, there'll be one primary reviewer commenting on your pull request.

Don't be discouraged by the number of review comments; it is perfectly normal for an exercise to go through several rewrites before arriving at something both you and the primary reviewer are happy with.

Expand Down
30 changes: 18 additions & 12 deletions building/github/gha-best-practices.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,21 @@
This _working_ document serves as a collection of best practices for making use of GitHub Actions.
If you have any suggestions or additions, [please open a pull request on GitHub!](https://github.com/exercism/docs/edit/main/building/github/gha-best-practices.md)

- [Collection of Best Practices](#collection-of-best-practices)
- [Set timeouts for workflows](#set-timeouts-for-workflows)
- [Consider if (third-party) actions are really needed](#consider-if-third-party-actions-are-really-needed)
- [Limit scope of workflow token](#limit-scope-of-workflow-token)
- [Pin actions to SHAs](#pin-actions-to-shas)
- [Consider setting up a concurrency strategy](#consider-setting-up-a-concurrency-strategy)
- [Consider which triggers are really needed](#consider-which-triggers-are-really-needed)
- [Read the "Security hardening for GitHub Actions" guide](#read-the-security-hardening-for-github-actions-guide)
- [Workflow Checklist](#workflow-checklist)
- [GitHub Actions: Best Practices](#github-actions-best-practices)
- [Collection of Best Practices](#collection-of-best-practices)
- [Set timeouts for workflows](#set-timeouts-for-workflows)
- [Example](#example)
- [Consider if (third-party) actions are really needed](#consider-if-third-party-actions-are-really-needed)
- [Limit scope of workflow token](#limit-scope-of-workflow-token)
- [Example](#example-1)
- [Pin actions to SHAs](#pin-actions-to-shas)
- [Finding the commit SHA](#finding-the-commit-sha)
- [Example](#example-2)
- [Consider setting up a concurrency strategy](#consider-setting-up-a-concurrency-strategy)
- [Example](#example-3)
- [Consider which triggers are really needed](#consider-which-triggers-are-really-needed)
- [Read the "Security hardening for GitHub Actions" guide](#read-the-security-hardening-for-github-actions-guide)
- [Workflow Checklist](#workflow-checklist)

## Collection of Best Practices

Expand Down Expand Up @@ -41,16 +47,16 @@ jobs:
### Consider if (third-party) actions are really needed
Actions should be treated like dependencies in your favourite programming language <sup>1</sup>, they are code written by third party authors outside of the control of Exercism.
Actions should be treated like dependencies in your favourite programming language[^1], they are code written by third party authors outside of the control of Exercism.
Even if you trust the authors of the action, there may be a hostile takeover of the repository which will indirectly give those people access to Exercism repos, including write access.
Therefore, you should carefully consider if introducing a new action is really worth it or if it's better to move the code into a (new) action under Exercism's control.
Also consider if the action is actively maintained, e.g. by checking recent repo activity or ensuring that the action is part of an organisation rather than an individual account.
Actions published by [GitHub](https://github.com/actions/) or the Exercism organization can generally be considered as safe(ish) to include without special consideration.
Actions published by [GitHub](https://github.com/actions/) or the Exercism org can generally be considered as safe(ish) to include without special consideration.
<sup>1</sup>: unless the language uses the `npm` ecosystem.
[^1]: unless the language uses the npm ecosystem.
### Limit scope of workflow token
Expand Down

0 comments on commit 06c7fd5

Please sign in to comment.