Skip to content

Add Markdown Linter agentic workflow#581

Closed
Evangelink wants to merge 1 commit into
dotnet:mainfrom
Evangelink:add-markdown-linter-agentic-workflow
Closed

Add Markdown Linter agentic workflow#581
Evangelink wants to merge 1 commit into
dotnet:mainfrom
Evangelink:add-markdown-linter-agentic-workflow

Conversation

@Evangelink

Copy link
Copy Markdown
Member

Summary

Adds a new agentic workflow that runs Super Linter Markdown checks on weekdays at 2 PM UTC (and on manual dispatch), then has a Copilot agent analyze the output and create a GitHub issue with categorized findings, severity breakdown, and fix recommendations.

Adapted from githubnext/agentics markdown-linter.md with repo-specific conventions:

  • PAT pool rotation via select-copilot-pat action
  • Fork protection — skips scheduled runs on forks
  • Pinned action SHAs matching existing workflows
  • Scoped bash tools — only allowlisted commands
  • safe-outputscreate-issue (max 1, 2-day expiry, [linter] prefix, automation/code-quality labels) and noop

The existing markdownlint.yml PR-gate workflow is unchanged — these serve different purposes (PR check vs. periodic repo-wide quality report).

Adds a new agentic workflow (.github/workflows/markdown-linter.md) that
runs Super Linter on weekdays at 2 PM UTC and on manual dispatch. The
agent analyzes linter output and creates GitHub issues with categorized
findings, severity breakdown, and fix recommendations.

Adapted from https://github.com/githubnext/agentics/blob/main/workflows/markdown-linter.md
with repo-specific conventions: PAT pool rotation, fork protection,
pinned action SHAs, scoped bash tools, and safe-outputs.
Copilot AI review requested due to automatic review settings April 23, 2026 12:01
@github-actions

Copy link
Copy Markdown
Contributor

Note

This PR is from a fork and modifies infrastructure files (eng/ or .github/).

Changes to infrastructure typically need to be submitted from a branch in dotnet/skills (not a fork) so that CI workflows run with the correct permissions and secrets.

Please consider recreating this PR from an upstream branch. If you don't have push access to dotnet/skills, ask a maintainer to push your branch for you.

@Evangelink Evangelink closed this Apr 23, 2026
@Evangelink Evangelink deleted the add-markdown-linter-agentic-workflow branch April 23, 2026 12:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new agentic workflow intended to run Super Linter’s Markdown validation on a schedule (weekdays) and on manual dispatch, then have a Copilot agent summarize results and open a categorized GitHub issue.

Changes:

  • Introduces .github/workflows/markdown-linter.md defining the scheduled Super Linter run and an agent prompt to create a Markdown quality report issue.
  • Adds PAT pool rotation + fork protection + safe-outputs constraints for issue creation/noop.
Show a summary per file
File Description
.github/workflows/markdown-linter.md New agentic workflow definition: run Super Linter for Markdown, upload log artifact, then have Copilot analyze it and (optionally) create a report issue.

Copilot's findings

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comments suppressed due to low confidence (2)

.github/workflows/markdown-linter.md:98

  • actions/upload-artifact is referenced as @v7 instead of a pinned commit SHA. Please pin it to the same SHA used elsewhere in .github/workflows/* to avoid unexpected upstream changes.
      - name: Upload super-linter log
        if: always()
        uses: actions/upload-artifact@v7
        with:
          name: super-linter-log
          path: super-linter.log
          retention-days: 7

.github/workflows/markdown-linter.md:145

  • actions/download-artifact is referenced as @v8 instead of a pinned commit SHA. Please pin it to a specific SHA (consistent with other workflows) to reduce supply-chain risk.
  - name: Download super-linter log
    uses: actions/download-artifact@v8
    with:
      name: super-linter-log
      path: /tmp/gh-aw/
  • Files reviewed: 1/1 changed files
  • Comments generated: 5

Comment on lines +67 to +73
- name: Super-linter
uses: super-linter/super-linter@v8.5.0
id: super-linter
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CREATE_LOG_FILE: "true"
LOG_FILE: super-linter.log

Copilot AI Apr 23, 2026

Copy link

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 uses AI. Check for mistakes.
Comment on lines +74 to +78
DEFAULT_BRANCH: main
ENABLE_GITHUB_ACTIONS_STEP_SUMMARY: "true"
VALIDATE_MARKDOWN: "true"
VALIDATE_ALL_CODEBASE: "false"

Copilot AI Apr 23, 2026

Copy link

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 uses AI. Check for mistakes.
Comment on lines +79 to +91
- 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

Copilot AI Apr 23, 2026

Copy link

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.

Suggested change
- 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

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +6
---
name: "Markdown Linter"
description: >
Runs Markdown quality checks using Super Linter and creates issues
for violations found across the repository.

Copilot AI Apr 23, 2026

Copy link

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.yml workflow. Since GitHub only executes YAML workflows, this workflow won’t run on schedule/dispatch until the repo also includes the compiled markdown-linter.lock.yml generated via gh aw compile (and committed under .github/workflows/).

Copilot uses AI. Check for mistakes.
persist-credentials: false

- name: Super-linter
uses: super-linter/super-linter@v8.5.0

Copilot AI Apr 23, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

super-linter/super-linter is referenced by a version tag (v8.5.0) rather than a pinned commit SHA. This repo’s workflows generally pin actions to SHAs for supply-chain integrity; please pin Super Linter to a specific SHA (and keep the version in a comment if desired).

This issue also appears in the following locations of the same file:

  • line 92
  • line 141
Suggested change
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 uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants