Skip to content

Add PR labeler with auto-generated content warning#3580

Merged
SusanneWindfeldPedersen merged 3 commits into
mainfrom
feature/pr-labeler-autogen-warning
May 28, 2026
Merged

Add PR labeler with auto-generated content warning#3580
SusanneWindfeldPedersen merged 3 commits into
mainfrom
feature/pr-labeler-autogen-warning

Conversation

@SusanneWindfeldPedersen

Copy link
Copy Markdown
Contributor

What this adds

A GitHub Actions workflow (.github/workflows/pr-labeler.yml) that runs on every PR and:

  1. Labels PRs by path — applies labels like
    eference-docs, \�pi, \developer, \�dministration, etc. based on which folders are touched.
  2. Detects code changes — applies \contains-code\ when AL/JSON/XML code blocks are modified.
  3. Detects auto-generated edits — applies \�dits-auto-generated\ when changes fall inside \DO_NOT_EDIT\ markers.
  4. Identifies typo fixes — applies \ ypo-fix\ for small, non-structural changes.
  5. Posts a warning comment (de-duplicated) when a contributor edits auto-generated content, explaining where to make the fix instead.

Why

External contributors sometimes edit content inside \DO_NOT_EDIT\ markers without realizing those sections are regenerated from source. This gives them immediate, friendly guidance.

Adds a GitHub Actions workflow that:
- Labels PRs based on changed file paths (reference-docs, api, developer, etc.)
- Detects code block changes (contains-code label)
- Detects edits inside DO_NOT_EDIT markers (edits-auto-generated label)
- Identifies typo-only PRs (typo-fix label)
- Posts a de-duplicated warning comment when contributors edit auto-generated sections

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit b681a67:

❌ Validation status: errors

Please follow instructions here which may help to resolve issue.

File Status Preview URL Details
❌Error Details

  • [Error: CannotMergeCommit] Cannot merge commit b681a671f434b2cd17b3ad4b2e37d6be01ca270b in branch feature/pr-labeler-autogen-warning of repository https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb into branch main (commit eb9339696f5f7baa4b6264f7ff86a1ab3d553250). Please follow this documentation: https://help.github.com/articles/resolving-a-merge-conflict-using-the-command-line/ to use git.exe to resolve you content conflicts locally and then push to remote.

For more details, please refer to the build report.

Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.

@SusanneWindfeldPedersen

Copy link
Copy Markdown
Contributor Author

@copilot resolve the merge conflicts in this pull request

Copilot AI commented May 28, 2026

Copy link
Copy Markdown
Contributor

@copilot resolve the merge conflicts in this pull request

Resolved. I merged the latest main into this branch and fixed the conflict in .github/workflows/pr-labeler.yml while preserving the auto-generated-content warning logic. Addressed in commit 103acea.

@learn-build-service-prod

Copy link
Copy Markdown
Contributor

Learn Build status updates of commit 103acea:

✅ Validation status: passed

File Status Preview URL Details
.github/workflows/pr-labeler.yml ✅Succeeded

For more details, please refer to the build report.

@SusanneWindfeldPedersen SusanneWindfeldPedersen merged commit 8b0021e into main May 28, 2026
3 checks passed
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