Skip to content

Commit

Permalink
Merge pull request #35 from newrelic/chore/forum
Browse files Browse the repository at this point in the history
  • Loading branch information
jbeveland27 authored May 31, 2023
2 parents ad54ca2 + 8f2bba8 commit 53d9af9
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 43 deletions.
6 changes: 3 additions & 3 deletions docs/repolinter/policy-overviews.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The following is a high-level overview of the rulesets being enforced by [repoli
```
* `readme-contains-security-section` - Checks that a `## Security` markdown header exists in `README.md`. This check is designed to determine if a security section is present.
* `readme-contains-link-to-security-policy` - Checks that a link to the security policy is present in `README.md`. The security policy can be found under `https://github.com/newrelic/<repo-name>/security/policy` or `../../security/policy`.
* `readme-contains-discuss-topic` - Checks that a valid link to `discuss.newrelic.com` exists in `README.md`.
* `readme-contains-forum-topic` - Checks that a valid link to `forum.newrelic.com` exists in `README.md`.
* `code-of-conduct-should-not-exist-here` - Checks that a code of conduct file is not present in the repository. This file can match any of the following patterns:
* `CODE-OF-CONDUCT*`
* `CODE_OF_CONDUCT*`
Expand Down Expand Up @@ -45,7 +45,7 @@ reStructured Text:
:target: https://opensource.newrelic.com/oss-category/#community-plus
```
* `readme-contains-link-to-security-policy` - Checks that a link to the security policy is present in `README.md`. The security policy can be found under `https://github.com/newrelic/<repo-name>/security/policy` or `../../security/policy`.
* `readme-contains-discuss-topic` - Checks that a valid link to `discuss.newrelic.com` exists in `README.md`.
* `readme-contains-forum-topic` - Checks that a valid link to `forum.newrelic.com` exists in `README.md`.
* `code-of-conduct-should-not-exist-here` - Checks that a code of conduct file is not present in the repository. This file can match any of the following patterns:
* `CODE-OF-CONDUCT*`
* `CODE_OF_CONDUCT*`
Expand Down Expand Up @@ -113,4 +113,4 @@ reStructured Text:
## Notes for Ruleset Creation
* If the rule intends to check the contents of `README.md`, ensure that a [`README.rst`](https://github.com/DevDungeon/reStructuredText-Documentation-Reference) is also supported, as some projects prefer reStructured text to Markdown (ex. [newrelic-python-agent](https://github.com/newrelic/newrelic-python-agent)).
* Make sure to double check all the links!
* Remember to add the ruleset path to the [`test` workflow](./.github/workflows/test.yml).
* Remember to add the ruleset path to the [`test` workflow](./.github/workflows/test.yml).
36 changes: 18 additions & 18 deletions repolinter-rulesets/community-plus.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ rules:
type: file-existence
options:
globsAny:
- LICENSE*
- COPYING*
- LICENSE*
- COPYING*
nocase: true
fix:
type: file-create
Expand All @@ -29,7 +29,7 @@ rules:
type: file-existence
options:
globsAny:
- README*
- README*
nocase: true
fix:
type: file-create
Expand All @@ -48,12 +48,12 @@ rules:
type: file-starts-with
options:
globsAll:
- README*
- README*
nocase: true
lineCount: 5
patterns:
- '<a href="https:\/\/opensource\.newrelic\.com\/oss-category\/#community-plus"><picture><source media="\(prefers-color-scheme: dark\)" srcset="https:\/\/github\.com\/newrelic\/opensource-website\/raw\/main\/src\/images\/categories\/dark\/Community_Plus\.png"><source media="\(prefers-color-scheme: light\)" srcset="https:\/\/github\.com\/newrelic\/opensource-website\/raw\/main\/src\/images\/categories\/Community_Plus\.png"><img alt="New Relic Open Source community plus project banner\." src="https:\/\/github\.com\/newrelic\/opensource-website\/raw\/main\/src\/images\/categories\/Community_Plus\.png"><\/picture><\/a>'
- https:\/\/opensource\.newrelic\.com\/oss-category\/#community-plus
- '<a href="https:\/\/opensource\.newrelic\.com\/oss-category\/#community-plus"><picture><source media="\(prefers-color-scheme: dark\)" srcset="https:\/\/github\.com\/newrelic\/opensource-website\/raw\/main\/src\/images\/categories\/dark\/Community_Plus\.png"><source media="\(prefers-color-scheme: light\)" srcset="https:\/\/github\.com\/newrelic\/opensource-website\/raw\/main\/src\/images\/categories\/Community_Plus\.png"><img alt="New Relic Open Source community plus project banner\." src="https:\/\/github\.com\/newrelic\/opensource-website\/raw\/main\/src\/images\/categories\/Community_Plus\.png"><\/picture><\/a>'
- https:\/\/opensource\.newrelic\.com\/oss-category\/#community-plus
human-readable-pattern: Open source Community Plus header (see https://opensource.newrelic.com/oss-category)
flags: i
succeed-on-non-existent: false
Expand All @@ -76,7 +76,7 @@ rules:
type: file-contents
options:
globsAll:
- README*
- README*
fail-on-non-existent: true
flags: i
content: (?:(?:https:\/\/github\.com\/newrelic\/[^\/]+)|(?:\.\.\/\.\.))\/security\/policy
Expand All @@ -87,19 +87,19 @@ rules:
in the README. For an example of this, please see the "a note about vulnerabilities"
section of the [Open By Default repository](https://github.com/newrelic/open-by-default#contribute)
policyUrl: https://nerdlife.datanerd.us/new-relic/security-guidelines-for-publishing-source-code
readme-contains-discuss-topic:
readme-contains-forum-topic:
level: error
rule:
type: file-contents
options:
globsAll:
- README*
- README*
fail-on-non-existent: true
flags: i
content: discuss\.newrelic\.com
human-readable-content: a link to the appropriate discuss.newrelic.com topic
content: forum\.newrelic\.com
human-readable-content: a link to the appropriate forum.newrelic.com topic
policyInfo: >-
New Relic recommends directly linking the your appropriate discuss.newrelic.com
New Relic recommends directly linking the your appropriate forum.newrelic.com
topic in the README, allowing developer an alternate method of getting support
policyUrl: https://nerdlife.datanerd.us/new-relic/security-guidelines-for-publishing-source-code
code-of-conduct-should-not-exist-here:
Expand All @@ -108,9 +108,9 @@ rules:
type: file-not-exists
options:
globsAll:
- CODE_OF_CONDUCT*
- CODE-OF-CONDUCT*
- CODEOFCODUCT
- CODE_OF_CONDUCT*
- CODE-OF-CONDUCT*
- CODEOFCODUCT
nocase: true
fix:
type: file-remove
Expand All @@ -127,9 +127,9 @@ rules:
type: file-existence
options:
globsAny:
- THIRD_PARTY_NOTICES*
- THIRD-PARTY-NOTICES*
- THIRDPARTYNOTICES*
- THIRD_PARTY_NOTICES*
- THIRD-PARTY-NOTICES*
- THIRDPARTYNOTICES*
nocase: true
policyInfo: >-
A [`THIRD_PARTY_NOTICES.md`](https://github.com/newrelic/opensource-website/blob/develop/THIRD_PARTY_NOTICES.md)
Expand Down
36 changes: 18 additions & 18 deletions repolinter-rulesets/community-project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ rules:
type: file-existence
options:
globsAny:
- LICENSE*
- COPYING*
- LICENSE*
- COPYING*
nocase: true
fix:
type: file-create
Expand All @@ -29,7 +29,7 @@ rules:
type: file-existence
options:
globsAny:
- README*
- README*
nocase: true
fix:
type: file-create
Expand All @@ -48,12 +48,12 @@ rules:
type: file-starts-with
options:
globsAll:
- README*
- README*
nocase: true
lineCount: 5
patterns:
- '<a href="https:\/\/opensource\.newrelic\.com\/oss-category\/#community-project"><picture><source media="\(prefers-color-scheme: dark\)" srcset="https:\/\/github\.com\/newrelic\/opensource-website\/raw\/main\/src\/images\/categories\/dark\/Community_Project\.png"><source media="\(prefers-color-scheme: light\)" srcset="https:\/\/github\.com\/newrelic\/opensource-website\/raw\/main\/src\/images\/categories\/Community_Project\.png"><img alt="New Relic Open Source community project banner\." src="https:\/\/github\.com\/newrelic\/opensource-website\/raw\/main\/src\/images\/categories\/Community_Project\.png"><\/picture><\/a>'
- https:\/\/opensource\.newrelic\.com\/oss-category\/#community-project
- '<a href="https:\/\/opensource\.newrelic\.com\/oss-category\/#community-project"><picture><source media="\(prefers-color-scheme: dark\)" srcset="https:\/\/github\.com\/newrelic\/opensource-website\/raw\/main\/src\/images\/categories\/dark\/Community_Project\.png"><source media="\(prefers-color-scheme: light\)" srcset="https:\/\/github\.com\/newrelic\/opensource-website\/raw\/main\/src\/images\/categories\/Community_Project\.png"><img alt="New Relic Open Source community project banner\." src="https:\/\/github\.com\/newrelic\/opensource-website\/raw\/main\/src\/images\/categories\/Community_Project\.png"><\/picture><\/a>'
- https:\/\/opensource\.newrelic\.com\/oss-category\/#community-project
human-readable-pattern: Open source Community header (see https://opensource.newrelic.com/oss-category)
flags: i
succeed-on-non-existent: false
Expand All @@ -76,7 +76,7 @@ rules:
type: file-contents
options:
globsAll:
- README*
- README*
fail-on-non-existent: true
flags: i
content: (?:(?:https:\/\/github\.com\/newrelic\/[^\/]+)|(?:\.\.\/\.\.))\/security\/policy
Expand All @@ -87,19 +87,19 @@ rules:
in the README. For an example of this, please see the "a note about vulnerabilities"
section of the [Open By Default repository](https://github.com/newrelic/open-by-default#contribute)
policyUrl: https://nerdlife.datanerd.us/new-relic/security-guidelines-for-publishing-source-code
readme-contains-discuss-topic:
readme-contains-forum-topic:
level: error
rule:
type: file-contents
options:
globsAll:
- README*
- README*
fail-on-non-existent: true
flags: i
content: discuss\.newrelic\.com
human-readable-content: a link to the appropriate discuss.newrelic.com topic
content: forum\.newrelic\.com
human-readable-content: a link to the appropriate forum.newrelic.com topic
policyInfo: >-
New Relic recommends directly linking the your appropriate discuss.newrelic.com
New Relic recommends directly linking the your appropriate forum.newrelic.com
topic in the README, allowing developer an alternate method of getting support
policyUrl: https://nerdlife.datanerd.us/new-relic/security-guidelines-for-publishing-source-code
code-of-conduct-should-not-exist-here:
Expand All @@ -108,9 +108,9 @@ rules:
type: file-not-exists
options:
globsAll:
- CODE_OF_CONDUCT*
- CODE-OF-CONDUCT*
- CODEOFCODUCT
- CODE_OF_CONDUCT*
- CODE-OF-CONDUCT*
- CODEOFCODUCT
nocase: true
fix:
type: file-remove
Expand All @@ -127,9 +127,9 @@ rules:
type: file-existence
options:
globsAny:
- THIRD_PARTY_NOTICES*
- THIRD-PARTY-NOTICES*
- THIRDPARTYNOTICES*
- THIRD_PARTY_NOTICES*
- THIRD-PARTY-NOTICES*
- THIRDPARTYNOTICES*
nocase: true
policyInfo: >-
A [`THIRD_PARTY_NOTICES.md`](https://github.com/newrelic/opensource-website/blob/develop/THIRD_PARTY_NOTICES.md)
Expand Down
8 changes: 4 additions & 4 deletions repolinter-rulesets/new-relic-one-catalog-project.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,19 +97,19 @@
"policyInfo": "New Relic recommends referencing the open source security policy (`https://github.com/newrelic/<repo-name>/security/policy` or `../../security/policy`) in a Security section in the README. For an example of this, please see the [NR1 Catalog Template](https://github.com/newrelic/template-nerdpack#security)",
"policyUrl": "https://nerdlife.datanerd.us/new-relic/security-guidelines-for-publishing-source-code"
},
"readme-contains-discuss-topic": {
"readme-contains-forum-topic": {
"level": "error",
"rule": {
"type": "file-contents",
"options": {
"globsAll": ["README*"],
"fail-on-non-existent": true,
"flags": "i",
"content": "discuss\\.newrelic\\.com",
"human-readable-content": "a link to the appropriate discuss.newrelic.com topic"
"content": "forum\\.newrelic\\.com",
"human-readable-content": "a link to the appropriate forum.newrelic.com topic"
}
},
"policyInfo": "New Relic recommends directly linking the your appropriate discuss.newrelic.com topic in the README, allowing developer an alternate method of getting support",
"policyInfo": "New Relic recommends directly linking the your appropriate forum.newrelic.com topic in the README, allowing developer an alternate method of getting support",
"policyUrl": "https://nerdlife.datanerd.us/new-relic/security-guidelines-for-publishing-source-code"
},
"third-party-notices-file-exists": {
Expand Down

0 comments on commit 53d9af9

Please sign in to comment.