Skip to content

Commit afde634

Browse files
committed
Initial commit
0 parents  commit afde634

25 files changed

+1378
-0
lines changed

.cspell.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"version": "0.2",
3+
"language": "en",
4+
"ignorePaths": [
5+
"**/node_modules/**",
6+
"**/vscode-extension/**",
7+
"**/.git/**",
8+
"**/.pnpm-lock.json",
9+
".vscode",
10+
"package-lock.json",
11+
"megalinter-reports"
12+
],
13+
"words": [
14+
"nupkg",
15+
"msbuild",
16+
"megalinter",
17+
"markdownlint",
18+
"KICS",
19+
"Carrol",
20+
"ncipollo",
21+
"stefanzweifel",
22+
"ruleset"
23+
]
24+
}

.github/DISABLE_dependabot.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
version: 2
2+
3+
updates:
4+
- package-ecosystem: github-actions
5+
directory: "/"
6+
commit-message:
7+
prefix: "(dependabot)"
8+
assignees:
9+
- "TylerCarrol"
10+
reviewers:
11+
- "TylerCarrol"
12+
schedule:
13+
interval: monthly
14+
15+
- package-ecosystem: nuget
16+
directory: "/"
17+
commit-message:
18+
prefix: "(dependabot)"
19+
assignees:
20+
- "TylerCarrol"
21+
reviewers:
22+
- "TylerCarrol"
23+
schedule:
24+
interval: monthly
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Error Annotation
2+
description: Error Annotation
3+
4+
inputs:
5+
message:
6+
description: "Message to Display"
7+
required: true
8+
9+
runs:
10+
using: "composite"
11+
steps:
12+
- uses: actions/github-script@v7.0.1
13+
with:
14+
script: |
15+
var message = '${{ inputs.message }}';
16+
message = message.replace(/(\r\n|\n|\r)/gm, '');
17+
core.error(message);
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Notice Annotation
2+
description: Notice Annotation
3+
4+
inputs:
5+
message:
6+
description: "Message to Display"
7+
required: true
8+
9+
runs:
10+
using: "composite"
11+
steps:
12+
- uses: actions/github-script@v7.0.1
13+
with:
14+
script: |
15+
var message = '${{ inputs.message }}';
16+
message = message.replace(/(\r\n|\n|\r)/gm, '');
17+
core.notice(message);
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: Warning Annotation
2+
description: Warning Annotation
3+
4+
inputs:
5+
message:
6+
description: "Message to Display"
7+
required: true
8+
9+
runs:
10+
using: "composite"
11+
steps:
12+
- uses: actions/github-script@v7.0.1
13+
with:
14+
script: |
15+
var message = '${{ inputs.message }}';
16+
message = message.replace(/(\r\n|\n|\r)/gm, '');
17+
core.warning(message);
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Exit Code
2+
description: Exit Code
3+
4+
inputs:
5+
code:
6+
description: "Exit Code Number (ensure it is unique across all workflows/actions)"
7+
required: true
8+
message:
9+
description: "Exit Message"
10+
required: false
11+
default: ""
12+
level:
13+
description: "Annotation Level (Error, Warning, Debug, Notice)"
14+
default: error
15+
16+
runs:
17+
using: "composite"
18+
steps:
19+
- id: createMessage
20+
uses: actions/github-script@v7.0.1
21+
with:
22+
result-encoding: string
23+
script: >
24+
return '[Exit Code: ${{ inputs.code }}] ${{ inputs.message }} | Note: Search for "code: ${{ inputs.code }}" in the .github/ directory to find the source of this error'
25+
26+
- uses: ./.github/actions/tools/annotation/error
27+
if: inputs.level == 'error'
28+
with:
29+
message: ${{ steps.createMessage.outputs.result }}
30+
31+
- uses: ./.github/actions/tools/annotation/warning
32+
if: inputs.level == 'warning'
33+
with:
34+
message: ${{ steps.createMessage.outputs.result }}
35+
36+
- uses: ./.github/actions/tools/annotation/debug
37+
if: inputs.level == 'debug'
38+
with:
39+
message: ${{ steps.createMessage.outputs.result }}
40+
41+
- uses: ./.github/actions/tools/annotation/notice
42+
if: inputs.level == 'notice'
43+
with:
44+
message: ${{ steps.createMessage.outputs.result }}
45+
46+
- shell: cmd
47+
if: ${{ runner.os == 'Windows' }}
48+
run: exit ${{ inputs.code }}
49+
50+
- shell: bash
51+
if: ${{ runner.os != 'Windows' }}
52+
run: exit ${{ inputs.code }}
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# This workflow ensures that a change was made to the changelog
2+
---
3+
name: Changelog Changed
4+
run-name: >-
5+
${{
6+
format(
7+
'{0} - Changelog Changed{1}',
8+
github.event_name == 'pull_request'
9+
&& format('PR#{0}{1}',github.event.number, github.event.pull_request.draft && ' [DRAFT]' || '')
10+
|| format('Push [{0}]', github.ref_name),
11+
github.event_name == 'pull_request'
12+
&& format(' - [{0}-to-{1}]', github.event.pull_request.head.ref, github.event.pull_request.base.ref)
13+
|| ''
14+
)
15+
}}
16+
on:
17+
pull_request:
18+
branches:
19+
- main
20+
- develop
21+
types:
22+
- opened
23+
- reopened
24+
- synchronize
25+
- ready_for_review
26+
# Trigger if target branch was changed to a trunk
27+
pull_request_target:
28+
types:
29+
- edited
30+
branches:
31+
- main
32+
- develop
33+
34+
concurrency:
35+
group: Changelog-${{ github.event.pull_request.head.ref }}-to-${{ github.event.pull_request.base.ref }}
36+
cancel-in-progress: true
37+
38+
jobs:
39+
checkForChangesToChangelog:
40+
name: Changelog Changed
41+
permissions:
42+
contents: read # Read access to code and content in the repository
43+
pull-requests: read # Read access to pull request metadata for the event
44+
checks: write # Write access to report check results
45+
runs-on: ubuntu-latest
46+
if: ${{ !github.event.pull_request.draft }}
47+
48+
steps:
49+
# Checkout pull request branch
50+
- name: ${{ format('Checkout [{0}]', github.event_name == 'pull_request' && github.event.pull_request.head.ref || github.ref_name) }}
51+
uses: actions/checkout@v4
52+
with:
53+
ref: ${{ github.event.pull_request.head.ref }}
54+
token: ${{ secrets.TJC_TOKEN || secrets.GITHUB_TOKEN }}
55+
56+
# Check for Changes in Changelog
57+
- name: Check for Changes to Changelog
58+
id: getChanges
59+
uses: tj-actions/changed-files@v45.0.8
60+
with:
61+
files: CHANGELOG.md
62+
63+
# Report Success
64+
- name: Success - Changelog Changed
65+
if: steps.getChanges.outputs.any_modified == 'true'
66+
uses: ./.github/actions/tools/annotation/notice
67+
with:
68+
message: "[Success] Changelog Changed"
69+
70+
# Report Failure
71+
- name: Failure - Changelog Not Changed
72+
if: steps.getChanges.outputs.any_modified != 'true'
73+
uses: ./.github/actions/tools/exit-code
74+
with:
75+
code: 5
76+
message: "Changelog Not Changed"

0 commit comments

Comments
 (0)