-
Notifications
You must be signed in to change notification settings - Fork 363
Add Markdown Linter agentic workflow #581
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -0,0 +1,235 @@ | ||||||||||||||||||||||||||
| --- | ||||||||||||||||||||||||||
| name: "Markdown Linter" | ||||||||||||||||||||||||||
| description: > | ||||||||||||||||||||||||||
| Runs Markdown quality checks using Super Linter and creates issues | ||||||||||||||||||||||||||
| for violations found across the repository. | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| on: | ||||||||||||||||||||||||||
| workflow_dispatch: | ||||||||||||||||||||||||||
| schedule: | ||||||||||||||||||||||||||
| - cron: "0 14 * * 1-5" # 2 PM UTC, weekdays only | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| # ############################################################### | ||||||||||||||||||||||||||
| # Override the COPILOT_GITHUB_TOKEN secret usage for the workflow | ||||||||||||||||||||||||||
| # with a randomly-selected token from a pool of secrets. | ||||||||||||||||||||||||||
| # | ||||||||||||||||||||||||||
| # As soon as organization-level billing is offered for Agentic | ||||||||||||||||||||||||||
| # Workflows, this stop-gap approach will be removed. | ||||||||||||||||||||||||||
| # | ||||||||||||||||||||||||||
| # See: /.github/actions/select-copilot-pat/README.md | ||||||||||||||||||||||||||
| # ############################################################### | ||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||||||||||||||||||||||||||
| name: Checkout the select-copilot-pat action folder | ||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||
| persist-credentials: false | ||||||||||||||||||||||||||
| sparse-checkout: .github/actions/select-copilot-pat | ||||||||||||||||||||||||||
| sparse-checkout-cone-mode: true | ||||||||||||||||||||||||||
| fetch-depth: 1 | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - id: select-copilot-pat | ||||||||||||||||||||||||||
| name: Select Copilot token from pool | ||||||||||||||||||||||||||
| uses: ./.github/actions/select-copilot-pat | ||||||||||||||||||||||||||
| env: | ||||||||||||||||||||||||||
| SECRET_0: ${{ secrets.COPILOT_GITHUB_TOKEN }} | ||||||||||||||||||||||||||
| SECRET_1: ${{ secrets.COPILOT_GITHUB_TOKEN_2 }} | ||||||||||||||||||||||||||
| SECRET_2: ${{ secrets.COPILOT_GITHUB_TOKEN_3 }} | ||||||||||||||||||||||||||
| SECRET_3: ${{ secrets.COPILOT_GITHUB_TOKEN_4 }} | ||||||||||||||||||||||||||
| SECRET_4: ${{ secrets.COPILOT_GITHUB_TOKEN_5 }} | ||||||||||||||||||||||||||
| SECRET_5: ${{ secrets.COPILOT_GITHUB_TOKEN_6 }} | ||||||||||||||||||||||||||
| SECRET_6: ${{ secrets.COPILOT_GITHUB_TOKEN_7 }} | ||||||||||||||||||||||||||
| SECRET_7: ${{ secrets.COPILOT_GITHUB_TOKEN_8 }} | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| # Don't run scheduled triggers on forked repositories — forks lack the | ||||||||||||||||||||||||||
| # secrets and context required, and scheduled runs would consume the | ||||||||||||||||||||||||||
| # fork owner's minutes. | ||||||||||||||||||||||||||
| if: ${{ !(github.event_name == 'schedule' && github.event.repository.fork) }} | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| # Add the pre-activation output of the randomly selected PAT | ||||||||||||||||||||||||||
| jobs: | ||||||||||||||||||||||||||
| pre-activation: | ||||||||||||||||||||||||||
| outputs: | ||||||||||||||||||||||||||
| copilot_pat_number: ${{ steps.select-copilot-pat.outputs.copilot_pat_number }} | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| super_linter: | ||||||||||||||||||||||||||
| runs-on: ubuntu-latest | ||||||||||||||||||||||||||
| permissions: | ||||||||||||||||||||||||||
| contents: read | ||||||||||||||||||||||||||
| packages: read | ||||||||||||||||||||||||||
| statuses: write | ||||||||||||||||||||||||||
| steps: | ||||||||||||||||||||||||||
| - name: Checkout repository | ||||||||||||||||||||||||||
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | ||||||||||||||||||||||||||
| with: | ||||||||||||||||||||||||||
| fetch-depth: 0 | ||||||||||||||||||||||||||
| persist-credentials: false | ||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||
| - name: Super-linter | ||||||||||||||||||||||||||
| uses: super-linter/super-linter@v8.5.0 | ||||||||||||||||||||||||||
|
||||||||||||||||||||||||||
| uses: super-linter/super-linter@v8.5.0 | |
| uses: super-linter/super-linter@<FULL_LENGTH_COMMIT_SHA_FOR_V8_5_0> # v8.5.0 |
Copilot
AI
Apr 23, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Super Linter step will typically exit non-zero when it finds lint violations, which would fail the super_linter job. Since the intent here is to always produce a report/issue from the log, consider making this step non-fatal (e.g., continue-on-error: true) and rely on the log parsing to drive whether an issue is created.
Copilot
AI
Apr 23, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This workflow description says it reports violations found “across the repository”, but Super Linter is configured with VALIDATE_ALL_CODEBASE: "false". If the goal is a full repo scan on the scheduled run, this setting likely conflicts with that intent; consider enabling full-codebase validation (or adjust the description to match the intended scope).
Copilot
AI
Apr 23, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The check-results step computes a needs-linting output, but nothing in this workflow consumes it. Either wire this output into the agent run (to skip analysis when clean) or remove the step/output to avoid dead code and confusion.
| - name: Check for linting issues | |
| id: check-results | |
| run: | | |
| if [ -f "super-linter.log" ] && [ -s "super-linter.log" ]; then | |
| if grep -qE "ERROR|WARN|FAIL" super-linter.log; then | |
| echo "needs-linting=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "needs-linting=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| else | |
| echo "needs-linting=false" >> "$GITHUB_OUTPUT" | |
| fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This PR adds a new agentic workflow source file, but there is no corresponding compiled
.lock.ymlworkflow. Since GitHub only executes YAML workflows, this workflow won’t run on schedule/dispatch until the repo also includes the compiledmarkdown-linter.lock.ymlgenerated viagh aw compile(and committed under.github/workflows/).