forked from SSWConsulting/SSW.Rules.Content
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'SSWConsulting:main' into main
- Loading branch information
Showing
1,064 changed files
with
12,036 additions
and
5,389 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
<!--- Thanks for contributing to SSW.Rules! --> | ||
## Reason for change (Issue, Email, conversation + reason, etc) | ||
<!-- | ||
- Example 1 - Relates to #{{ ISSUE NUMBER }} | ||
- Example 2 - As per my conversation with... | ||
- Example 3 - Based on email thread, subject... | ||
- Example 4 - I noticed that... | ||
--> | ||
{{ REASON FOR CHANGE - WHAT WAS THE TRIGGER FOR THIS CHANGE }} | ||
**Tip: Use [SSW Rule Writer GPT](https://chat.openai.com/g/g-cOvrRzEnU-ssw-rules-writer) for help with writing rules 🤖** | ||
> | ||
> 1. What triggered this change? (PBI link, Email Subject, conversation + reason, etc) | ||
{{ SUMMARY OF CHANGES }} | ||
✏️ | ||
|
||
<!-- | ||
Have you seen our Rules to Better Pull Requests? | ||
https://www.ssw.com.au/rules/rules-to-better-pull-requests/ | ||
> 2. What was changed? | ||
✏️ | ||
|
||
Please provide a good title and a short description of your pull request | ||
See https://www.ssw.com.au/rules/write-a-good-pull-request/ for further guidance | ||
> 3. Did you do pair or mob programming (list names)? | ||
Did you do an over the shoulder review? | ||
https://www.ssw.com.au/rules/over-the-shoulder-prs | ||
--> | ||
✏️ | ||
<!-- E.g. I worked with @gordonbeeming and @sethdailyssw --> | ||
|
||
<!-- | ||
Check out the relevant rules | ||
- https://www.ssw.com.au/rules/rules-to-better-pull-requests | ||
- https://www.ssw.com.au/rules/write-a-good-pull-request | ||
- https://www.ssw.com.au/rules/over-the-shoulder-prs | ||
- https://www.ssw.com.au/rules/do-you-use-co-creation-patterns | ||
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,7 +22,7 @@ jobs: | |
with: | ||
fetch-depth: 0 | ||
|
||
- uses: microsoft/[email protected].3 | ||
- uses: microsoft/[email protected].10 | ||
name: PR Metrics | ||
env: | ||
PR_METRICS_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Validate-Frontmatter-in-All-Rules | ||
|
||
on: | ||
push: | ||
branches: [main] | ||
workflow_dispatch: | ||
|
||
jobs: | ||
validate-all-frontmatter: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
|
||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
|
||
- name: Find all Markdown files in rules | ||
run: | | ||
find rules -type f -name '*.md' > all_rules_files.txt | ||
echo "Found Markdown files:" | ||
cat all_rules_files.txt | ||
- name: Install dependencies | ||
run: | | ||
cd scripts/frontmatter-validator | ||
npm install | ||
- name: Validate Frontmatter in Rule Files | ||
id: validate_frontmatter | ||
run: | | ||
node scripts/frontmatter-validator/frontmatter-validator.js --file all_rules_files.txt > validation_results.txt | ||
- name: Create Job Summary | ||
if: always() | ||
run: | | ||
echo "## Frontmatter Validation Issues" >> $GITHUB_STEP_SUMMARY | ||
if [ -s validation_results.txt ]; then | ||
cat validation_results.txt >> $GITHUB_STEP_SUMMARY | ||
else | ||
echo "No validation issues detected." >> $GITHUB_STEP_SUMMARY | ||
fi | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
name: Validate-Markdown | ||
|
||
on: | ||
pull_request: | ||
branches: [ main ] | ||
paths: | ||
- '**.md' | ||
|
||
workflow_dispatch: | ||
|
||
jobs: | ||
validate-markdown: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
issues: write | ||
repository-projects: read | ||
pull-requests: write | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
ref: ${{ github.event.pull_request.head.ref }} | ||
repository: ${{ github.event.pull_request.head.repo.full_name }} | ||
|
||
- name: Get changed files | ||
id: files | ||
uses: lots0logs/[email protected] | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Filter and format Markdown files | ||
run: | | ||
MARKDOWN_FILES=$(echo '${{ steps.files.outputs.all }}' | jq -r '.[] | select(endswith(".md"))' | tr '\n' ' ') | ||
echo "MARKDOWN_FILES=$MARKDOWN_FILES" >> $GITHUB_ENV | ||
- name: Install markdownlint-cli | ||
run: npm install -g markdownlint-cli | ||
|
||
- name: Auto-fix Markdown files | ||
run: | | ||
markdownlint --fix $MARKDOWN_FILES --config .markdownlint/config.json || true | ||
git config --global user.name 'github-actions[bot]' | ||
git config --global user.email 'github-actions[bot]@users.noreply.github.com' | ||
git add . | ||
git commit -m "Auto-fix Markdown files" || true # Commit only if there are changes | ||
git push || true # Push only if there was a commit | ||
echo "Auto-fix applied" | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# TODO: Make this work on forked branches | ||
- name: Lint Markdown files | ||
if: github.event.pull_request.head.repo.fork == false | ||
run: | | ||
markdownlint $MARKDOWN_FILES --config .markdownlint/config.json > lint-results.txt 2>&1 || true | ||
if [[ -s lint-results.txt ]]; then | ||
echo "Linting errors found" | ||
cat lint-results.txt | ||
echo "LINT_RESULT=$(cat lint-results.txt)" >> $GITHUB_ENV | ||
exit 1 | ||
fi | ||
- name: Comment on PR with linting errors | ||
if: failure() && github.event.pull_request.head.repo.fork == false | ||
run: | | ||
RULES_DOCS_URL="https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md" | ||
PR_NUMBER="${{ github.event.pull_request.number }}" | ||
REPO_FULL_NAME="${{ github.repository }}" | ||
PR_COMMENT="Hi @${{ github.event.pull_request.user.login }},\n\nWe found some markdown suggestions for your Pull Request:\n\n" | ||
PR_COMMENT+="| File | Error | Rule |\n" | ||
PR_COMMENT+="| ---- | ----- | ---- |\n" | ||
while IFS= read -r line; do | ||
FILE_PATH=$(echo "$line" | awk -F: '{print $1}') | ||
LINE_NUM=$(echo "$line" | awk -F: '{print $2}') | ||
ERROR_DESC=$(echo "$line" | cut -d' ' -f 4- | sed 's/\[.*\]//') # Remove the markdown link from the description | ||
RULE_ID=$(echo "$line" | grep -o 'MD[0-9]\+') | ||
FILE_NAME=$(basename "$FILE_PATH") | ||
FILE_ANCHOR=$(echo "$FILE_NAME" | sed 's/\./-/g') | ||
PR_COMMENT+="| [$FILE_PATH](https://github.com/$REPO_FULL_NAME/pull/$PR_NUMBER/files#$FILE_ANCHOR) | Line $LINE_NUM: $ERROR_DESC | [Rule $RULE_ID]($RULES_DOCS_URL#$RULE_ID) |\n" | ||
done < lint-results.txt | ||
PR_COMMENT+="\nPlease review and update your Markdown files accordingly.\n" | ||
echo -e "$PR_COMMENT" > pr_comment.md | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Upload PR Comment | ||
if: failure() && github.event.pull_request.head.repo.fork == false | ||
uses: mshick/add-pr-comment@v2 | ||
with: | ||
message-path: pr_comment.md | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
allow-repeats: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
.DS_Store | ||
.vscode/settings.json | ||
.idea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
{ | ||
"default": true, | ||
"MD003": { | ||
"style": "atx" | ||
}, | ||
"MD004": { | ||
"style": "asterisk" | ||
}, | ||
"MD046": false, | ||
"MD013": false, | ||
"MD033": false, | ||
"MD036": false | ||
} |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...e-management-alm/rules-to-better-version-control-with-tfs-aka-source-control.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.