com.wallstop-studios.dxmessaging 2.1.5 → 2.1.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.artifacts/SourceGenerators.Tests/obj/Debug/net9.0/WallstopStudios.DxMessaging.SourceGenerators.Tests.AssemblyInfo.cs +1 -1
- package/.cspell.json +4 -1
- package/.github/workflows/actionlint.yml +11 -1
- package/.github/workflows/csharpier-autofix.yml +34 -3
- package/.github/workflows/dotnet-tests.yml +13 -0
- package/.github/workflows/format-on-demand.yml +38 -44
- package/.github/workflows/json-format-check.yml +24 -0
- package/.github/workflows/lint-doc-links.yml +13 -0
- package/.github/workflows/markdown-json.yml +21 -4
- package/.github/workflows/markdown-link-text-check.yml +10 -0
- package/.github/workflows/markdown-link-validity.yml +10 -0
- package/.github/workflows/markdownlint.yml +7 -5
- package/.github/workflows/prettier-autofix.yml +67 -11
- package/.github/workflows/release-drafter.yml +2 -2
- package/.github/workflows/sync-wiki.yml +3 -3
- package/.github/workflows/yaml-format-lint.yml +26 -0
- package/.llm/context.md +113 -3
- package/.llm/skills/documentation/changelog-management.md +38 -0
- package/.llm/skills/documentation/documentation-style-guide.md +18 -0
- package/.llm/skills/documentation/documentation-update-workflow.md +2 -0
- package/.llm/skills/documentation/documentation-updates.md +2 -0
- package/.llm/skills/documentation/markdown-compatibility.md +476 -0
- package/.llm/skills/documentation/mermaid-theming.md +326 -0
- package/.llm/skills/documentation/mkdocs-navigation.md +290 -0
- package/.llm/skills/github-actions/git-renormalize-patterns.md +231 -0
- package/.llm/skills/github-actions/workflow-consistency.md +346 -0
- package/.llm/skills/index.md +53 -27
- package/.llm/skills/scripting/javascript-code-quality.md +417 -0
- package/.llm/skills/scripting/regex-documentation.md +461 -0
- package/.llm/skills/scripting/shell-best-practices.md +55 -4
- package/.llm/skills/scripting/validation-patterns.md +418 -0
- package/.llm/skills/specification.md +4 -1
- package/.llm/skills/testing/test-code-quality.md +243 -0
- package/.llm/skills/testing/test-production-code.md +348 -0
- package/CHANGELOG.md +11 -0
- package/README.md +0 -11
- package/Tests/Runtime/Benchmarks/WallstopStudios.DxMessaging.Tests.Runtime.Benchmarks.asmdef +1 -6
- package/Tests/Runtime/Integrations/Reflex/WallstopStudios.DxMessaging.Tests.Runtime.Reflex.asmdef +1 -1
- package/Tests/Runtime/Integrations/VContainer/WallstopStudios.DxMessaging.Tests.Runtime.VContainer.asmdef +1 -1
- package/Tests/Runtime/Integrations/Zenject/WallstopStudios.DxMessaging.Tests.Runtime.Zenject.asmdef +1 -1
- package/coverage/clover.xml +216 -3
- package/coverage/clover.xml.meta +7 -7
- package/coverage/coverage-final.json +2 -1
- package/coverage/coverage-final.json.meta +7 -7
- package/coverage/lcov-report/base.css.meta +1 -1
- package/coverage/lcov-report/block-navigation.js.meta +1 -1
- package/coverage/lcov-report/favicon.png.meta +1 -1
- package/coverage/lcov-report/index.html +25 -10
- package/coverage/lcov-report/index.html.meta +7 -7
- package/coverage/lcov-report/prettify.css.meta +1 -1
- package/coverage/lcov-report/prettify.js.meta +1 -1
- package/coverage/lcov-report/sort-arrow-sprite.png.meta +1 -1
- package/coverage/lcov-report/sorter.js.meta +1 -1
- package/coverage/lcov-report/transform-docs-to-wiki.js.html +1 -1
- package/coverage/lcov-report/transform-docs-to-wiki.js.html.meta +7 -7
- package/coverage/lcov-report/vendor.meta +1 -1
- package/coverage/lcov-report.meta +8 -8
- package/coverage/lcov.info +365 -0
- package/coverage/lcov.info.meta +7 -7
- package/docs/architecture/design-and-architecture.md +0 -1
- package/docs/concepts/index.md +37 -0
- package/docs/concepts/index.md.meta +7 -0
- package/docs/concepts/interceptors-and-ordering.md +0 -2
- package/docs/concepts/mental-model.md +390 -0
- package/docs/concepts/mental-model.md.meta +7 -0
- package/docs/concepts/message-types.md +0 -1
- package/docs/getting-started/getting-started.md +1 -0
- package/docs/getting-started/index.md +6 -5
- package/docs/getting-started/overview.md +1 -0
- package/docs/getting-started/quick-start.md +2 -1
- package/docs/getting-started/visual-guide.md +4 -10
- package/docs/hooks.py +10 -1
- package/docs/images/DxMessaging-banner.svg +1 -1
- package/docs/index.md +7 -7
- package/docs/javascripts/mermaid-config.js +44 -4
- package/docs/reference/helpers.md +130 -154
- package/docs/reference/quick-reference.md +5 -1
- package/docs/reference/reference.md +124 -130
- package/mkdocs.yml +2 -0
- package/package.json +1 -1
- package/scripts/__tests__/generate-skills-index.test.js +397 -0
- package/scripts/__tests__/generate-skills-index.test.js.meta +7 -0
- package/scripts/__tests__/mermaid-config.test.js +467 -0
- package/scripts/__tests__/mermaid-config.test.js.meta +7 -0
- package/scripts/__tests__/validate-skills-optional-fields.test.js +1474 -0
- package/scripts/__tests__/validate-skills-optional-fields.test.js.meta +7 -0
- package/scripts/__tests__/validate-skills-required-fields.test.js +188 -0
- package/scripts/__tests__/validate-skills-required-fields.test.js.meta +7 -0
- package/scripts/__tests__/validate-skills-tags.test.js +353 -0
- package/scripts/__tests__/validate-skills-tags.test.js.meta +7 -0
- package/scripts/__tests__/validate-workflows.test.js +188 -0
- package/scripts/__tests__/validate-workflows.test.js.meta +7 -0
- package/scripts/generate-skills-index.js +88 -3
- package/scripts/validate-skills.js +230 -30
- package/scripts/validate-workflows.js +272 -0
- package/scripts/validate-workflows.js.meta +7 -0
- package/site/404.html +1 -1
- package/site/advanced/emit-shorthands/index.html +2 -2
- package/site/advanced/message-bus-providers/index.html +2 -2
- package/site/advanced/registration-builders/index.html +2 -2
- package/site/advanced/runtime-configuration/index.html +2 -2
- package/site/advanced/string-messages/index.html +2 -2
- package/site/advanced.meta +1 -1
- package/site/architecture/comparisons/index.html +2 -2
- package/site/architecture/design-and-architecture/index.html +2 -2
- package/site/architecture/performance/index.html +1 -1
- package/site/architecture.meta +1 -1
- package/site/concepts/index.html +1 -0
- package/site/concepts/index.html.meta +7 -0
- package/site/concepts/interceptors-and-ordering/index.html +4 -4
- package/site/concepts/listening-patterns/index.html +2 -2
- package/site/concepts/mental-model/index.html +146 -0
- package/site/concepts/mental-model/index.html.meta +7 -0
- package/site/concepts/mental-model.meta +8 -0
- package/site/concepts/message-types/index.html +2 -2
- package/site/concepts/targeting-and-context/index.html +2 -2
- package/site/concepts.meta +1 -1
- package/site/examples/end-to-end/index.html +2 -2
- package/site/examples/end-to-end-scene-transitions/index.html +2 -2
- package/site/examples.meta +1 -1
- package/site/getting-started/getting-started/index.html +3 -3
- package/site/getting-started/index.html +4 -4
- package/site/getting-started/install/index.html +3 -3
- package/site/getting-started/overview/index.html +2 -2
- package/site/getting-started/quick-start/index.html +2 -2
- package/site/getting-started/visual-guide/index.html +11 -11
- package/site/getting-started.meta +1 -1
- package/site/guides/advanced/index.html +2 -2
- package/site/guides/diagnostics/index.html +2 -2
- package/site/guides/migration-guide/index.html +2 -2
- package/site/guides/patterns/index.html +2 -2
- package/site/guides/testing/index.html +2 -2
- package/site/guides/unity-integration/index.html +2 -2
- package/site/guides.meta +1 -1
- package/site/hooks.py.meta +1 -1
- package/site/images/DxMessaging-banner.svg +119 -0
- package/site/images/DxMessaging-banner.svg.meta +7 -0
- package/site/images.meta +8 -0
- package/site/index.html +2 -2
- package/site/integrations/index.html +2 -2
- package/site/integrations/reflex/index.html +2 -2
- package/site/integrations/vcontainer/index.html +2 -2
- package/site/integrations/zenject/index.html +2 -2
- package/site/integrations.meta +1 -1
- package/site/javascripts/csharp-highlight.js.meta +7 -7
- package/site/javascripts/mermaid-config.js +4 -1
- package/site/javascripts/mermaid-config.js.meta +1 -1
- package/site/javascripts.meta +1 -1
- package/site/reference/compatibility/index.html +1 -1
- package/site/reference/faq/index.html +1 -1
- package/site/reference/glossary/index.html +2 -2
- package/site/reference/helpers/index.html +15 -15
- package/site/reference/quick-reference/index.html +3 -3
- package/site/reference/reference/index.html +37 -37
- package/site/reference/troubleshooting/index.html +1 -1
- package/site/reference.meta +1 -1
- package/site/search/search_index.json +1 -1
- package/site/sitemap.xml +46 -38
- package/site/sitemap.xml.gz +0 -0
- package/site/stylesheets/extra.css.meta +1 -1
- package/site/stylesheets.meta +1 -1
|
@@ -13,7 +13,7 @@ using System.Reflection;
|
|
|
13
13
|
[assembly: System.Reflection.AssemblyCompanyAttribute("WallstopStudios.DxMessaging.SourceGenerators.Tests")]
|
|
14
14
|
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
|
|
15
15
|
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
|
|
16
|
-
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+
|
|
16
|
+
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0+dd979c12b73e0fbe9781a817b41662e62786bd08")]
|
|
17
17
|
[assembly: System.Reflection.AssemblyProductAttribute("WallstopStudios.DxMessaging.SourceGenerators.Tests")]
|
|
18
18
|
[assembly: System.Reflection.AssemblyTitleAttribute("WallstopStudios.DxMessaging.SourceGenerators.Tests")]
|
|
19
19
|
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
|
package/.cspell.json
CHANGED
|
@@ -4,12 +4,14 @@ on:
|
|
|
4
4
|
pull_request:
|
|
5
5
|
paths:
|
|
6
6
|
- ".github/workflows/**"
|
|
7
|
+
- "scripts/validate-workflows.js"
|
|
7
8
|
push:
|
|
8
9
|
branches:
|
|
9
10
|
- main
|
|
10
11
|
- master
|
|
11
12
|
paths:
|
|
12
13
|
- ".github/workflows/**"
|
|
14
|
+
- "scripts/validate-workflows.js"
|
|
13
15
|
workflow_dispatch:
|
|
14
16
|
|
|
15
17
|
concurrency:
|
|
@@ -34,4 +36,12 @@ jobs:
|
|
|
34
36
|
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends shellcheck
|
|
35
37
|
|
|
36
38
|
- name: Run actionlint
|
|
37
|
-
uses: rhysd/actionlint@v1.7.
|
|
39
|
+
uses: rhysd/actionlint@v1.7.10
|
|
40
|
+
|
|
41
|
+
- name: Setup Node.js
|
|
42
|
+
uses: actions/setup-node@v6
|
|
43
|
+
with:
|
|
44
|
+
node-version: "20"
|
|
45
|
+
|
|
46
|
+
- name: Validate workflow patterns
|
|
47
|
+
run: node scripts/validate-workflows.js
|
|
@@ -2,9 +2,19 @@ name: CSharpier Auto Format
|
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
4
|
pull_request:
|
|
5
|
+
paths:
|
|
6
|
+
- "**/*.cs"
|
|
7
|
+
- ".config/dotnet-tools.json"
|
|
5
8
|
pull_request_target:
|
|
9
|
+
paths:
|
|
10
|
+
- "**/*.cs"
|
|
11
|
+
- ".config/dotnet-tools.json"
|
|
6
12
|
workflow_dispatch:
|
|
7
13
|
|
|
14
|
+
concurrency:
|
|
15
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
16
|
+
cancel-in-progress: true
|
|
17
|
+
|
|
8
18
|
permissions:
|
|
9
19
|
contents: write
|
|
10
20
|
pull-requests: write
|
|
@@ -34,7 +44,15 @@ jobs:
|
|
|
34
44
|
|
|
35
45
|
- name: Renormalize line endings
|
|
36
46
|
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.user.login == 'dependabot[bot]' }}
|
|
37
|
-
|
|
47
|
+
shell: bash
|
|
48
|
+
run: |
|
|
49
|
+
# Renormalize each extension separately to avoid "pathspec did not match" failures
|
|
50
|
+
# when certain file types don't exist or aren't accessible in this checkout context
|
|
51
|
+
for ext in cs; do
|
|
52
|
+
if git ls-files "*.$ext" "**/*.$ext" | grep -q .; then
|
|
53
|
+
git add --renormalize -- "*.$ext" "**/*.$ext"
|
|
54
|
+
fi
|
|
55
|
+
done
|
|
38
56
|
|
|
39
57
|
- name: Commit formatting changes to PR branch (Dependabot only)
|
|
40
58
|
if: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository && github.event.pull_request.user.login == 'dependabot[bot]' }}
|
|
@@ -74,7 +92,15 @@ jobs:
|
|
|
74
92
|
run: ~/.dotnet/tools/csharpier .
|
|
75
93
|
|
|
76
94
|
- name: Renormalize line endings
|
|
77
|
-
|
|
95
|
+
shell: bash
|
|
96
|
+
run: |
|
|
97
|
+
# Renormalize each extension separately to avoid "pathspec did not match" failures
|
|
98
|
+
# when certain file types don't exist or aren't accessible in this checkout context
|
|
99
|
+
for ext in cs; do
|
|
100
|
+
if git ls-files "*.$ext" "**/*.$ext" | grep -q .; then
|
|
101
|
+
git add --renormalize -- "*.$ext" "**/*.$ext"
|
|
102
|
+
fi
|
|
103
|
+
done
|
|
78
104
|
|
|
79
105
|
- name: Detect changes
|
|
80
106
|
id: changes
|
|
@@ -100,7 +126,12 @@ jobs:
|
|
|
100
126
|
git checkout -B "$BRANCH"
|
|
101
127
|
# Only stage C# files to avoid touching workflow YAML (requires special permissions)
|
|
102
128
|
# Use --renormalize to ensure LF line endings in git index per .gitattributes
|
|
103
|
-
|
|
129
|
+
# Renormalize each extension separately to avoid "pathspec did not match" failures
|
|
130
|
+
for ext in cs; do
|
|
131
|
+
if git ls-files "*.$ext" "**/*.$ext" | grep -q .; then
|
|
132
|
+
git add --renormalize -- "*.$ext" "**/*.$ext"
|
|
133
|
+
fi
|
|
134
|
+
done
|
|
104
135
|
git commit -m "chore(format): apply CSharpier formatting for PR #${{ github.event.pull_request.number }}"
|
|
105
136
|
git remote add upstream "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git"
|
|
106
137
|
git fetch upstream
|
|
@@ -6,9 +6,22 @@ on:
|
|
|
6
6
|
- master
|
|
7
7
|
- main
|
|
8
8
|
- develop
|
|
9
|
+
paths:
|
|
10
|
+
- "**/*.cs"
|
|
11
|
+
- "**/*.csproj"
|
|
12
|
+
- "**/*.sln"
|
|
13
|
+
- "SourceGenerators/**"
|
|
14
|
+
- ".config/dotnet-tools.json"
|
|
9
15
|
pull_request:
|
|
10
16
|
branches:
|
|
11
17
|
- "*"
|
|
18
|
+
paths:
|
|
19
|
+
- "**/*.cs"
|
|
20
|
+
- "**/*.csproj"
|
|
21
|
+
- "**/*.sln"
|
|
22
|
+
- "SourceGenerators/**"
|
|
23
|
+
- ".config/dotnet-tools.json"
|
|
24
|
+
workflow_dispatch:
|
|
12
25
|
|
|
13
26
|
jobs:
|
|
14
27
|
test:
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
name: Opt-in Formatting
|
|
2
|
-
|
|
3
2
|
on:
|
|
4
3
|
issue_comment:
|
|
5
4
|
types: [created]
|
|
@@ -8,11 +7,9 @@ on:
|
|
|
8
7
|
pr_number:
|
|
9
8
|
description: PR number to format
|
|
10
9
|
required: true
|
|
11
|
-
|
|
12
10
|
permissions:
|
|
13
11
|
contents: write
|
|
14
12
|
pull-requests: write
|
|
15
|
-
|
|
16
13
|
jobs:
|
|
17
14
|
by_comment:
|
|
18
15
|
name: Run on /format comment
|
|
@@ -33,31 +30,26 @@ jobs:
|
|
|
33
30
|
const commenter = context.payload.comment.user.login;
|
|
34
31
|
const prAuthor = pr.user.login;
|
|
35
32
|
const assoc = context.payload.comment.author_association; // OWNER, MEMBER, COLLABORATOR, CONTRIBUTOR, etc.
|
|
36
|
-
|
|
37
33
|
const isMaintainer = ['OWNER','MEMBER','COLLABORATOR'].includes(assoc);
|
|
38
34
|
const isAuthor = commenter === prAuthor;
|
|
39
35
|
const allowed = isMaintainer || isAuthor;
|
|
40
|
-
|
|
41
36
|
core.setOutput('allowed', String(allowed));
|
|
42
37
|
core.setOutput('pr', String(prNumber));
|
|
43
38
|
core.setOutput('base_ref', pr.base.ref);
|
|
44
39
|
core.setOutput('head_repo', pr.head.repo.full_name);
|
|
45
40
|
core.setOutput('head_ref', pr.head.ref);
|
|
46
41
|
core.setOutput('same_repo', String(pr.head.repo.full_name === `${context.repo.owner}/${context.repo.repo}`));
|
|
47
|
-
|
|
48
42
|
- name: Exit if not authorized
|
|
49
43
|
if: ${{ steps.meta.outputs.allowed != 'true' }}
|
|
50
44
|
run: |
|
|
51
45
|
echo "Commenter is not authorized to trigger formatting." 1>&2
|
|
52
46
|
exit 1
|
|
53
|
-
|
|
54
47
|
- name: Checkout PR branch (same-repo)
|
|
55
48
|
if: ${{ steps.meta.outputs.same_repo == 'true' }}
|
|
56
49
|
uses: actions/checkout@v6
|
|
57
50
|
with:
|
|
58
51
|
ref: ${{ steps.meta.outputs.head_ref }}
|
|
59
52
|
fetch-depth: 0
|
|
60
|
-
|
|
61
53
|
- name: Checkout PR fork head
|
|
62
54
|
if: ${{ steps.meta.outputs.same_repo != 'true' }}
|
|
63
55
|
uses: actions/checkout@v6
|
|
@@ -66,36 +58,37 @@ jobs:
|
|
|
66
58
|
ref: ${{ steps.meta.outputs.head_ref }}
|
|
67
59
|
persist-credentials: false
|
|
68
60
|
fetch-depth: 0
|
|
69
|
-
|
|
70
61
|
- name: Setup Node.js
|
|
71
62
|
uses: actions/setup-node@v6
|
|
72
63
|
with:
|
|
73
64
|
node-version: '20'
|
|
74
|
-
|
|
75
65
|
- name: Setup .NET
|
|
76
66
|
uses: actions/setup-dotnet@v5
|
|
77
67
|
with:
|
|
78
68
|
dotnet-version: '8.0.x'
|
|
79
|
-
|
|
80
69
|
- name: Restore .NET tools
|
|
81
70
|
run: dotnet tool restore
|
|
82
|
-
|
|
83
71
|
- name: Apply Prettier fixes
|
|
84
72
|
run: |
|
|
85
73
|
npx --yes prettier@3.8.1 --write "**/*.{md,markdown}"
|
|
86
74
|
npx --yes prettier@3.8.1 --write "**/*.{json,asmdef,asmref}"
|
|
87
75
|
npx --yes prettier@3.8.1 --write "**/*.{yml,yaml}"
|
|
88
|
-
|
|
89
76
|
- name: Apply markdownlint fixes
|
|
90
77
|
run: |
|
|
91
78
|
npx --yes markdownlint-cli2@0.20.0 "**/*.md" "**/*.markdown" --fix
|
|
92
|
-
|
|
93
79
|
- name: Apply CSharpier formatting
|
|
94
80
|
run: dotnet tool run csharpier format
|
|
95
|
-
|
|
96
81
|
- name: Renormalize line endings
|
|
97
|
-
|
|
98
|
-
|
|
82
|
+
shell: bash
|
|
83
|
+
run: |
|
|
84
|
+
# Renormalize each extension separately to avoid "pathspec did not match" failures
|
|
85
|
+
# when certain file types don't exist or aren't accessible in this checkout context
|
|
86
|
+
# yaml excluded: dotfiles (.pre-commit-config.yaml) match git ls-files but not git add globs
|
|
87
|
+
for ext in cs md json asmdef yml; do
|
|
88
|
+
if git ls-files "*.$ext" "**/*.$ext" | grep -q .; then
|
|
89
|
+
git add --renormalize -- "*.$ext" "**/*.$ext"
|
|
90
|
+
fi
|
|
91
|
+
done
|
|
99
92
|
- name: Detect changes
|
|
100
93
|
id: changes
|
|
101
94
|
shell: bash
|
|
@@ -105,7 +98,6 @@ jobs:
|
|
|
105
98
|
else
|
|
106
99
|
echo "has_changes=true" >> "$GITHUB_OUTPUT"
|
|
107
100
|
fi
|
|
108
|
-
|
|
109
101
|
- name: Commit changes to PR branch (same-repo)
|
|
110
102
|
if: ${{ steps.meta.outputs.same_repo == 'true' && steps.changes.outputs.has_changes == 'true' }}
|
|
111
103
|
uses: stefanzweifel/git-auto-commit-action@v7
|
|
@@ -113,14 +105,13 @@ jobs:
|
|
|
113
105
|
commit_message: "chore(format): apply requested formatting"
|
|
114
106
|
branch: ${{ steps.meta.outputs.head_ref }}
|
|
115
107
|
add_options: --renormalize
|
|
108
|
+
# NOTE: yaml excluded - all .yaml files are dotfiles, which git add patterns don't match
|
|
116
109
|
file_pattern: |
|
|
117
110
|
**/*.cs
|
|
118
111
|
**/*.md
|
|
119
|
-
**/*.markdown
|
|
120
112
|
**/*.json
|
|
121
113
|
**/*.asmdef
|
|
122
|
-
**/*.
|
|
123
|
-
|
|
114
|
+
**/*.yml
|
|
124
115
|
- name: Create bot branch and PR (fork)
|
|
125
116
|
if: ${{ steps.meta.outputs.same_repo != 'true' && steps.changes.outputs.has_changes == 'true' }}
|
|
126
117
|
shell: bash
|
|
@@ -135,12 +126,17 @@ jobs:
|
|
|
135
126
|
git checkout -B "$BRANCH"
|
|
136
127
|
# Stage only supported text files; avoid workflows to prevent permission issues
|
|
137
128
|
# Use --renormalize to ensure LF line endings in git index per .gitattributes
|
|
138
|
-
|
|
129
|
+
# Renormalize each extension separately to avoid "pathspec did not match" failures
|
|
130
|
+
# yaml excluded: dotfiles (.pre-commit-config.yaml) match git ls-files but not git add globs
|
|
131
|
+
for ext in cs md json asmdef yml; do
|
|
132
|
+
if git ls-files "*.$ext" "**/*.$ext" | grep -q .; then
|
|
133
|
+
git add --renormalize -- "*.$ext" "**/*.$ext"
|
|
134
|
+
fi
|
|
135
|
+
done
|
|
139
136
|
git commit -m "chore(format): apply requested formatting for PR #${{ steps.meta.outputs.pr }}"
|
|
140
137
|
git remote add upstream "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git"
|
|
141
138
|
git fetch upstream
|
|
142
139
|
git push upstream "$BRANCH" --force
|
|
143
|
-
|
|
144
140
|
- name: Open/Update formatting PR (fork)
|
|
145
141
|
if: ${{ steps.meta.outputs.same_repo != 'true' && steps.changes.outputs.has_changes == 'true' }}
|
|
146
142
|
uses: actions/github-script@v8
|
|
@@ -161,7 +157,6 @@ jobs:
|
|
|
161
157
|
if (existing.data.length === 0) {
|
|
162
158
|
await github.rest.pulls.create({ owner, repo, head: headBranch, base: baseRef, title, body });
|
|
163
159
|
}
|
|
164
|
-
|
|
165
160
|
- name: Comment result on PR
|
|
166
161
|
if: ${{ steps.changes.outputs.has_changes == 'true' }}
|
|
167
162
|
uses: actions/github-script@v8
|
|
@@ -173,7 +168,6 @@ jobs:
|
|
|
173
168
|
? 'Applied formatting as requested and pushed commits to this PR branch.'
|
|
174
169
|
: 'Opened a formatting PR against the base repository with requested fixes.';
|
|
175
170
|
await github.rest.issues.createComment({ ...context.repo, issue_number: prNumber, body });
|
|
176
|
-
|
|
177
171
|
- name: No-op comment (nothing to change)
|
|
178
172
|
if: ${{ steps.changes.outputs.has_changes != 'true' }}
|
|
179
173
|
uses: actions/github-script@v8
|
|
@@ -182,7 +176,6 @@ jobs:
|
|
|
182
176
|
const prNumber = Number('${{ steps.meta.outputs.pr }}');
|
|
183
177
|
const body = 'No formatting changes were necessary.';
|
|
184
178
|
await github.rest.issues.createComment({ ...context.repo, issue_number: prNumber, body });
|
|
185
|
-
|
|
186
179
|
by_dispatch:
|
|
187
180
|
name: Run via manual dispatch
|
|
188
181
|
if: ${{ github.event_name == 'workflow_dispatch' }}
|
|
@@ -201,14 +194,12 @@ jobs:
|
|
|
201
194
|
core.setOutput('head_repo', pr.head.repo.full_name);
|
|
202
195
|
core.setOutput('head_ref', pr.head.ref);
|
|
203
196
|
core.setOutput('same_repo', String(pr.head.repo.full_name === `${context.repo.owner}/${context.repo.repo}`));
|
|
204
|
-
|
|
205
197
|
- name: Checkout PR branch (same-repo)
|
|
206
198
|
if: ${{ steps.meta.outputs.same_repo == 'true' }}
|
|
207
199
|
uses: actions/checkout@v6
|
|
208
200
|
with:
|
|
209
201
|
ref: ${{ steps.meta.outputs.head_ref }}
|
|
210
202
|
fetch-depth: 0
|
|
211
|
-
|
|
212
203
|
- name: Checkout PR fork head
|
|
213
204
|
if: ${{ steps.meta.outputs.same_repo != 'true' }}
|
|
214
205
|
uses: actions/checkout@v6
|
|
@@ -217,36 +208,37 @@ jobs:
|
|
|
217
208
|
ref: ${{ steps.meta.outputs.head_ref }}
|
|
218
209
|
persist-credentials: false
|
|
219
210
|
fetch-depth: 0
|
|
220
|
-
|
|
221
211
|
- name: Setup Node.js
|
|
222
212
|
uses: actions/setup-node@v6
|
|
223
213
|
with:
|
|
224
214
|
node-version: '20'
|
|
225
|
-
|
|
226
215
|
- name: Setup .NET
|
|
227
216
|
uses: actions/setup-dotnet@v5
|
|
228
217
|
with:
|
|
229
218
|
dotnet-version: '8.0.x'
|
|
230
|
-
|
|
231
219
|
- name: Restore .NET tools
|
|
232
220
|
run: dotnet tool restore
|
|
233
|
-
|
|
234
221
|
- name: Apply Prettier fixes
|
|
235
222
|
run: |
|
|
236
223
|
npx --yes prettier@3.8.1 --write "**/*.{md,markdown}"
|
|
237
224
|
npx --yes prettier@3.8.1 --write "**/*.{json,asmdef,asmref}"
|
|
238
225
|
npx --yes prettier@3.8.1 --write "**/*.{yml,yaml}"
|
|
239
|
-
|
|
240
226
|
- name: Apply markdownlint fixes
|
|
241
227
|
run: |
|
|
242
228
|
npx --yes markdownlint-cli2@0.20.0 "**/*.md" "**/*.markdown" --fix
|
|
243
|
-
|
|
244
229
|
- name: Apply CSharpier formatting
|
|
245
230
|
run: dotnet tool run csharpier format
|
|
246
|
-
|
|
247
231
|
- name: Renormalize line endings
|
|
248
|
-
|
|
249
|
-
|
|
232
|
+
shell: bash
|
|
233
|
+
run: |
|
|
234
|
+
# Renormalize each extension separately to avoid "pathspec did not match" failures
|
|
235
|
+
# when certain file types don't exist or aren't accessible in this checkout context
|
|
236
|
+
# yaml excluded: dotfiles (.pre-commit-config.yaml) match git ls-files but not git add globs
|
|
237
|
+
for ext in cs md json asmdef yml; do
|
|
238
|
+
if git ls-files "*.$ext" "**/*.$ext" | grep -q .; then
|
|
239
|
+
git add --renormalize -- "*.$ext" "**/*.$ext"
|
|
240
|
+
fi
|
|
241
|
+
done
|
|
250
242
|
- name: Detect changes
|
|
251
243
|
id: changes
|
|
252
244
|
shell: bash
|
|
@@ -256,7 +248,6 @@ jobs:
|
|
|
256
248
|
else
|
|
257
249
|
echo "has_changes=true" >> "$GITHUB_OUTPUT"
|
|
258
250
|
fi
|
|
259
|
-
|
|
260
251
|
- name: Commit changes to PR branch (same-repo)
|
|
261
252
|
if: ${{ steps.meta.outputs.same_repo == 'true' && steps.changes.outputs.has_changes == 'true' }}
|
|
262
253
|
uses: stefanzweifel/git-auto-commit-action@v7
|
|
@@ -264,14 +255,13 @@ jobs:
|
|
|
264
255
|
commit_message: "chore(format): apply requested formatting"
|
|
265
256
|
branch: ${{ steps.meta.outputs.head_ref }}
|
|
266
257
|
add_options: --renormalize
|
|
258
|
+
# NOTE: yaml excluded - all .yaml files are dotfiles, which git add patterns don't match
|
|
267
259
|
file_pattern: |
|
|
268
260
|
**/*.cs
|
|
269
261
|
**/*.md
|
|
270
|
-
**/*.markdown
|
|
271
262
|
**/*.json
|
|
272
263
|
**/*.asmdef
|
|
273
|
-
**/*.
|
|
274
|
-
|
|
264
|
+
**/*.yml
|
|
275
265
|
- name: Create bot branch and PR (fork)
|
|
276
266
|
if: ${{ steps.meta.outputs.same_repo != 'true' && steps.changes.outputs.has_changes == 'true' }}
|
|
277
267
|
shell: bash
|
|
@@ -286,12 +276,17 @@ jobs:
|
|
|
286
276
|
git checkout -B "$BRANCH"
|
|
287
277
|
# Stage only supported text files; avoid workflows to prevent permission issues
|
|
288
278
|
# Use --renormalize to ensure LF line endings in git index per .gitattributes
|
|
289
|
-
|
|
279
|
+
# Renormalize each extension separately to avoid "pathspec did not match" failures
|
|
280
|
+
# yaml excluded: dotfiles (.pre-commit-config.yaml) match git ls-files but not git add globs
|
|
281
|
+
for ext in cs md json asmdef yml; do
|
|
282
|
+
if git ls-files "*.$ext" "**/*.$ext" | grep -q .; then
|
|
283
|
+
git add --renormalize -- "*.$ext" "**/*.$ext"
|
|
284
|
+
fi
|
|
285
|
+
done
|
|
290
286
|
git commit -m "chore(format): apply requested formatting for PR #${{ steps.meta.outputs.pr }}"
|
|
291
287
|
git remote add upstream "https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git"
|
|
292
288
|
git fetch upstream
|
|
293
289
|
git push upstream "$BRANCH" --force
|
|
294
|
-
|
|
295
290
|
- name: Open/Update formatting PR (fork)
|
|
296
291
|
if: ${{ steps.meta.outputs.same_repo != 'true' && steps.changes.outputs.has_changes == 'true' }}
|
|
297
292
|
uses: actions/github-script@v8
|
|
@@ -312,4 +307,3 @@ jobs:
|
|
|
312
307
|
if (existing.data.length === 0) {
|
|
313
308
|
await github.rest.pulls.create({ owner, repo, head: headBranch, base: baseRef, title, body });
|
|
314
309
|
}
|
|
315
|
-
|
|
@@ -2,19 +2,43 @@ name: JSON Format Check
|
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
4
|
pull_request:
|
|
5
|
+
paths:
|
|
6
|
+
- "**/*.json"
|
|
7
|
+
- "**/*.asmdef"
|
|
8
|
+
- "**/*.asmref"
|
|
9
|
+
- ".prettierrc*"
|
|
10
|
+
- "package.json"
|
|
11
|
+
- "package-lock.json"
|
|
5
12
|
push:
|
|
6
13
|
branches:
|
|
7
14
|
- main
|
|
8
15
|
- master
|
|
16
|
+
paths:
|
|
17
|
+
- "**/*.json"
|
|
18
|
+
- "**/*.asmdef"
|
|
19
|
+
- "**/*.asmref"
|
|
20
|
+
- ".prettierrc*"
|
|
21
|
+
- "package.json"
|
|
22
|
+
- "package-lock.json"
|
|
9
23
|
workflow_dispatch:
|
|
10
24
|
|
|
25
|
+
concurrency:
|
|
26
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
27
|
+
cancel-in-progress: true
|
|
28
|
+
|
|
29
|
+
permissions:
|
|
30
|
+
contents: read
|
|
31
|
+
|
|
11
32
|
jobs:
|
|
12
33
|
prettier-json:
|
|
13
34
|
name: Check JSON/.asmdef formatting
|
|
14
35
|
runs-on: ubuntu-latest
|
|
36
|
+
timeout-minutes: 5
|
|
15
37
|
steps:
|
|
16
38
|
- name: Checkout
|
|
17
39
|
uses: actions/checkout@v6
|
|
40
|
+
with:
|
|
41
|
+
persist-credentials: false
|
|
18
42
|
|
|
19
43
|
- name: Setup Node
|
|
20
44
|
uses: actions/setup-node@v6
|
|
@@ -5,7 +5,20 @@ on:
|
|
|
5
5
|
branches:
|
|
6
6
|
- main
|
|
7
7
|
- master
|
|
8
|
+
paths:
|
|
9
|
+
- "**/*.md"
|
|
10
|
+
- "**/*.markdown"
|
|
11
|
+
- "docs/**"
|
|
12
|
+
- ".lychee.toml"
|
|
13
|
+
- "scripts/lint-doc-links.ps1"
|
|
8
14
|
pull_request:
|
|
15
|
+
paths:
|
|
16
|
+
- "**/*.md"
|
|
17
|
+
- "**/*.markdown"
|
|
18
|
+
- "docs/**"
|
|
19
|
+
- ".lychee.toml"
|
|
20
|
+
- "scripts/lint-doc-links.ps1"
|
|
21
|
+
workflow_dispatch:
|
|
9
22
|
|
|
10
23
|
jobs:
|
|
11
24
|
lint:
|
|
@@ -5,7 +5,28 @@ on:
|
|
|
5
5
|
branches:
|
|
6
6
|
- main
|
|
7
7
|
- master
|
|
8
|
+
paths:
|
|
9
|
+
- "**/*.md"
|
|
10
|
+
- "**/*.markdown"
|
|
11
|
+
- "**/*.json"
|
|
12
|
+
- "**/*.asmdef"
|
|
13
|
+
- "**/*.asmref"
|
|
14
|
+
- ".prettierrc*"
|
|
15
|
+
- ".markdownlint*"
|
|
16
|
+
- "package.json"
|
|
17
|
+
- "package-lock.json"
|
|
8
18
|
pull_request:
|
|
19
|
+
paths:
|
|
20
|
+
- "**/*.md"
|
|
21
|
+
- "**/*.markdown"
|
|
22
|
+
- "**/*.json"
|
|
23
|
+
- "**/*.asmdef"
|
|
24
|
+
- "**/*.asmref"
|
|
25
|
+
- ".prettierrc*"
|
|
26
|
+
- ".markdownlint*"
|
|
27
|
+
- "package.json"
|
|
28
|
+
- "package-lock.json"
|
|
29
|
+
workflow_dispatch:
|
|
9
30
|
|
|
10
31
|
permissions:
|
|
11
32
|
contents: read
|
|
@@ -40,7 +61,3 @@ jobs:
|
|
|
40
61
|
|
|
41
62
|
- name: Markdown lint
|
|
42
63
|
run: npm run lint:markdown
|
|
43
|
-
|
|
44
|
-
- name: Enforce EOL (CRLF) and No BOM
|
|
45
|
-
shell: pwsh
|
|
46
|
-
run: ./scripts/check-eol.ps1 -VerboseOutput
|
|
@@ -2,10 +2,20 @@ name: Markdown Link Text Check
|
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
4
|
pull_request:
|
|
5
|
+
paths:
|
|
6
|
+
- "**/*.md"
|
|
7
|
+
- "**/*.markdown"
|
|
8
|
+
- ".github/scripts/check_markdown_links.py"
|
|
9
|
+
- ".github/scripts/check_markdown_url_encoding.py"
|
|
5
10
|
push:
|
|
6
11
|
branches:
|
|
7
12
|
- main
|
|
8
13
|
- master
|
|
14
|
+
paths:
|
|
15
|
+
- "**/*.md"
|
|
16
|
+
- "**/*.markdown"
|
|
17
|
+
- ".github/scripts/check_markdown_links.py"
|
|
18
|
+
- ".github/scripts/check_markdown_url_encoding.py"
|
|
9
19
|
workflow_dispatch:
|
|
10
20
|
|
|
11
21
|
jobs:
|
|
@@ -2,10 +2,20 @@ name: Markdown Link Validity
|
|
|
2
2
|
|
|
3
3
|
on:
|
|
4
4
|
pull_request:
|
|
5
|
+
paths:
|
|
6
|
+
- "**/*.md"
|
|
7
|
+
- "**/*.markdown"
|
|
8
|
+
- "docs/**"
|
|
9
|
+
- ".lychee.toml"
|
|
5
10
|
push:
|
|
6
11
|
branches:
|
|
7
12
|
- main
|
|
8
13
|
- master
|
|
14
|
+
paths:
|
|
15
|
+
- "**/*.md"
|
|
16
|
+
- "**/*.markdown"
|
|
17
|
+
- "docs/**"
|
|
18
|
+
- ".lychee.toml"
|
|
9
19
|
workflow_dispatch:
|
|
10
20
|
|
|
11
21
|
jobs:
|
|
@@ -20,13 +20,13 @@ on:
|
|
|
20
20
|
- "package.json"
|
|
21
21
|
workflow_dispatch:
|
|
22
22
|
|
|
23
|
-
permissions:
|
|
24
|
-
contents: read
|
|
25
|
-
|
|
26
23
|
concurrency:
|
|
27
24
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
28
25
|
cancel-in-progress: true
|
|
29
26
|
|
|
27
|
+
permissions:
|
|
28
|
+
contents: read
|
|
29
|
+
|
|
30
30
|
jobs:
|
|
31
31
|
markdownlint:
|
|
32
32
|
name: Lint repository Markdown
|
|
@@ -35,12 +35,14 @@ jobs:
|
|
|
35
35
|
steps:
|
|
36
36
|
- name: Checkout
|
|
37
37
|
uses: actions/checkout@v6
|
|
38
|
+
with:
|
|
39
|
+
persist-credentials: false
|
|
38
40
|
|
|
39
41
|
- name: Setup Node.js
|
|
40
42
|
uses: actions/setup-node@v6
|
|
41
43
|
with:
|
|
42
|
-
node-version:
|
|
43
|
-
cache:
|
|
44
|
+
node-version: "20"
|
|
45
|
+
cache: "npm"
|
|
44
46
|
cache-dependency-path: package.json
|
|
45
47
|
|
|
46
48
|
- name: Install dependencies
|