Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
7dbd0fb
Put Learning Path In-Progress Staleness Checker Back In Main
kkeirstead Oct 2, 2023
0d45cbd
Update architecture.md
kkeirstead Oct 2, 2023
67cf509
Update collectionrules.md
kkeirstead Oct 2, 2023
1673989
Update collectionrules.md
kkeirstead Oct 2, 2023
5b5de00
Update check-learning-path-links.yml
kkeirstead Oct 2, 2023
28c7f7f
Learning Path Staleness Testing Basic
kkeirstead Oct 2, 2023
7fcad74
Update CollectionRulePipeline.cs
kkeirstead Oct 2, 2023
2a152b3
Update CollectionRulePipeline.cs
kkeirstead Oct 2, 2023
d696afa
Update CollectionRuleTriggerOptions.cs
kkeirstead Oct 2, 2023
e13c118
Update CollectionRulePipeline.cs
kkeirstead Oct 2, 2023
257a21a
Update CollectionRuleTriggerOptions.cs
kkeirstead Oct 3, 2023
649c32f
Update CollectionRuleTriggerOptions.cs
kkeirstead Oct 3, 2023
ef90d42
Update CollectionRuleTriggerOptions.cs
kkeirstead Oct 3, 2023
a1f1cbb
Update CollectionRuleTriggerOptions.cs
kkeirstead Oct 3, 2023
24db7af
Update CollectionRuleTriggerOptions.cs
kkeirstead Oct 3, 2023
cf5e628
Update CollectionRuleTriggerOptions.cs
kkeirstead Oct 3, 2023
538d5ce
Update CollectionRuleTriggerOptions.cs
kkeirstead Oct 3, 2023
c03ea60
Update CollectionRuleTriggerOptions.cs
kkeirstead Oct 3, 2023
6ecd76b
Update CollectionRuleTriggerOptions.cs
kkeirstead Oct 3, 2023
38212b0
Update CollectionRuleTriggerOptions.cs
kkeirstead Oct 3, 2023
01015ce
Update CollectionRuleTriggerOptions.cs
kkeirstead Oct 3, 2023
8225bce
Update CollectionRuleTriggerOptions.cs
kkeirstead Oct 3, 2023
62a6a62
Update CollectionRuleTriggerOptions.cs
kkeirstead Oct 3, 2023
cb1757a
Update CollectionRuleTriggerOptions.cs
kkeirstead Oct 3, 2023
2e4a9b1
Update CollectionRuleTriggerOptions.cs
kkeirstead Oct 3, 2023
23f20c9
Update CollectionRuleTriggerOptions.cs
kkeirstead Oct 3, 2023
b1d719e
Update CollectionRuleTriggerOptions.cs
kkeirstead Oct 3, 2023
a1e4e8e
Update CollectionRuleTriggerOptions.cs
kkeirstead Oct 3, 2023
6811828
Update CollectionRuleTriggerOptions.cs
kkeirstead Oct 3, 2023
7aeee3d
Update CollectionRuleTriggerOptions.cs
kkeirstead Oct 3, 2023
55f5eb4
Update CollectionRuleTriggerOptions.cs
kkeirstead Oct 3, 2023
8c9e356
Update CollectionRuleTriggerOptions.cs
kkeirstead Oct 3, 2023
f7a154d
Update CollectionRuleTriggerOptions.cs
kkeirstead Oct 3, 2023
41ddeef
Update CollectionRuleTriggerOptions.cs
kkeirstead Oct 3, 2023
6882222
Update CollectionRuleTriggerOptions.cs
kkeirstead Oct 3, 2023
a096c6e
Update architecture.md
kkeirstead Oct 4, 2023
ef73cf4
Update CollectionRuleTriggerOptions.cs
kkeirstead Oct 4, 2023
767c85a
Update architecture.md
kkeirstead Oct 4, 2023
1945915
Update CollectionRuleTriggerOptions.cs
kkeirstead Oct 4, 2023
ea43f6c
Update CollectionRuleTriggerOptions.cs
kkeirstead Oct 4, 2023
4f71904
Update CollectionRuleTriggerOptions.cs
kkeirstead Oct 4, 2023
f85fbba
Update CollectionRuleTriggerOptions.cs
kkeirstead Oct 4, 2023
6a936d8
Update CollectionRuleTriggerOptions.cs
kkeirstead Oct 4, 2023
b4d1a8c
Update CollectionRuleTriggerOptions.cs
kkeirstead Oct 4, 2023
02fbc83
Update CollectionRuleTriggerOptions.cs
kkeirstead Oct 4, 2023
7f55065
Update CollectionRuleTriggerOptions.cs
kkeirstead Oct 4, 2023
bcf5113
Update CollectionRuleTriggerOptions.cs
kkeirstead Oct 4, 2023
ccd1bc4
Update CollectionRuleTriggerOptions.cs
kkeirstead Oct 4, 2023
ccdbaa4
Update CollectionRuleTriggerOptions.cs
kkeirstead Oct 4, 2023
386952b
Update CollectionRuleTriggerOptions.cs
kkeirstead Oct 4, 2023
b86eac3
Update CollectionRuleTriggerOptions.cs
kkeirstead Oct 4, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions .github/workflows/check-learning-path-links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: 'Check Learning Path Links'
on:
pull_request:
branches: ['main']

permissions:
pull-requests: read

jobs:
check-learning-path-links:
name: 'Check Learning Path Links'
runs-on: ubuntu-latest

steps:
- name: Checkout merge
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
with:
persist-credentials: false
path: merge

- name: Checkout head
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
with:
persist-credentials: false
ref: main
path: head

- name: Get base commit for the PR
working-directory: ./merge
run: |
git fetch origin "$GITHUB_BASE_REF"
base_sha=$(git rev-parse "origin/$GITHUB_BASE_REF")
echo "base_sha=$base_sha" >> $GITHUB_ENV
echo "Merging ${GITHUB_SHA} into ${GITHUB_BASE_REF}"

- name: Get changed files
working-directory: ./merge
run: |
changed_source_files=$(git diff-tree --no-commit-id --name-only -r "$base_sha" "$GITHUB_SHA" | { grep "**.cs$" || test $? = 1; })
echo "Files to validate: '${changed_source_files}'"
echo "updated_files=$(echo ${changed_source_files})" >> $GITHUB_ENV

- name: Check Learning Path Links
id: check-links
uses: kkeirstead/LearningPathFileChecks@main
with:
repoURLToSearch: 'https://github.com/dotnet/dotnet-monitor'
learningPathsDirectory: 'documentation/learningPath'
paths: ${{ env.updated_files }}

- name: Generate artifacts (Suggestion)
working-directory: ./merge
run: |
mkdir -p ./pr
cp "$GITHUB_EVENT_PATH" ./pr/pr-event.json
git diff > ./pr/linter.diff

- name: Generate artifacts (Comment)
working-directory: ./merge
run: |
mkdir -p ./learning-path-review
echo -n "${{ steps.check-links.outputs.modifiedFiles }}" > ./learning-path-review/modifiedFiles
echo -n "${{ steps.check-links.outputs.manuallyReview }}" > ./learning-path-review/manuallyReview

- name: Upload artifacts (Suggestion)
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
with:
name: pr-linter
path: merge/pr/

- name: Upload artifacts (Comment)
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
with:
name: learning-path-review
path: merge/learning-path-review/
76 changes: 76 additions & 0 deletions .github/workflows/submit-learning-paths-staleness-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: 'Submit Learning Paths Staleness Check'

on:
workflow_run:
workflows: ["Check Learning Path Links"]
types:
- completed

permissions:
contents: write
issues: write
pull-requests: write


jobs:
submit-learning-paths-staleness-check:
if: github.event.workflow_run.conclusion == 'success'
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write

steps:
- uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410
id: check-user
with:
script: |
await github.rest.repos.checkCollaborator({
owner: context.repo.owner,
repo: context.repo.repo,
username: context.payload.workflow_run.triggering_actor.login
});

- name: Checkout
uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab
with:
persist-credentials: true

# Download the artifact from the workflow that kicked off this one.
# The default artifact download action doesn't support cross-workflow
# artifacts, so use a 3rd party one.
- name: 'Download linting results'
uses: dawidd6/action-download-artifact@246dbf436b23d7c49e21a7ab8204ca9ecd1fe615
with:
workflow: ${{env.workflow_name}}
run_id: ${{github.event.workflow_run.id }}
name: learning-path-review
path: ./learning-path-review

- name: Set Env Vars
run: |
modifiedFiles=$(cat ./learning-path-review/modifiedFiles)
manuallyReview=$(cat ./learning-path-review/manuallyReview)
echo "modifiedFiles=$modifiedFiles" >> $GITHUB_ENV
echo "manuallyReview=$manuallyReview" >> $GITHUB_ENV

- uses: actions/github-script@v6
name: Submit Comment
if: ${{ env.modifiedFiles != '' }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MODIFIED_FILES: ${{ env.modifiedFiles }}
MANUALLY_REVIEW: ${{ env.manuallyReview }}
with:
script: |
modifiedFiles = process.env.MODIFIED_FILES;
manuallyReview = process.env.MANUALLY_REVIEW;
comment_body = "### Learning Paths Links Check \n\nChanged files in the Learning Path:\n\n" + modifiedFiles.replaceAll(",", "\n") + "\n\n---------\n\n Files that should be manually reviewed:\n\n" + manuallyReview.replaceAll(",", "\n");
github.rest.issues.createComment({
issue_number: context.payload.workflow_run.pull_requests[0].number,
owner: context.repo.owner,
repo: context.repo.repo,
body: comment_body
})

9 changes: 8 additions & 1 deletion .github/workflows/submit-linter-suggestions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: 'Submit linter suggestions'

on:
workflow_run:
workflows: ["C# linting", "Add Markdown Feedback"]
workflows: ["C# linting", "Add Markdown Feedback", "Check Learning Path Links"]
types:
- completed

Expand Down Expand Up @@ -45,6 +45,13 @@ jobs:
run: |
echo 'reporter_name=Add Markdown Feedback' >> $GITHUB_ENV
echo 'workflow_name=add-markdown-feedback.yml' >> $GITHUB_ENV

- name: Set Learning Path File Checks Env Vars
if: ${{ github.event.workflow_run.name == 'Check Learning Path Links' }}
run: |
echo 'reporter_name=Learning Path File Checks' >> $GITHUB_ENV
echo 'workflow_name=check-learning-path-links.yml' >> $GITHUB_ENV

# Download the artifact from the workflow that kicked off this one.
# The default artifact download action doesn't support cross-workflow
# artifacts, so use a 3rd party one.
Expand Down
7 changes: 7 additions & 0 deletions documentation/learningPath/architecture.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,10 @@
### Was this documentation helpful? [Share feedback](https://www.research.net/r/DGDQWXH?src=documentation%2FlearningPath%2Farchitecture)

# Architecture
This is a test of a deleted [file](https://github.com/dotnet/dotnet-monitor/blob/v7.0.1/src/Tools/dotnet-monitor/OutputFormat.cs).

This is a test of a shifted line [file](https://github.com/dotnet/dotnet-monitor/blob/v7.0.1/src/Tools/dotnet-monitor/CollectionRules/Options/CollectionRuleTriggerOptions.cs#L24).

This is a test of a removed line [file](https://github.com/dotnet/dotnet-monitor/blob/v7.0.1/src/Tools/dotnet-monitor/CollectionRules/Options/CollectionRuleTriggerOptions.cs#L1).

This is a test of an ambiguous line [file](https://github.com/dotnet/dotnet-monitor/blob/v7.0.1/src/Tools/dotnet-monitor/CollectionRules/Options/CollectionRuleTriggerOptions.cs#L16).
Loading