From 87ca3b9a52c4624ddcf817abb2a27dd7cfb1bbc6 Mon Sep 17 00:00:00 2001 From: Blaise Taylor Date: Fri, 30 Jan 2026 15:45:59 -0500 Subject: [PATCH 1/8] AB#11 Validating AB number. --- .github/workflows/ci.yml | 7 +++++++ .../SR.cs | 13 +++++++++---- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0ef5add..38dfbd1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,6 +25,13 @@ jobs: with: fetch-depth: 0 + - name: Check for linked Azure Boards work item + uses: danhellem/github-actions-pr-is-linked-to-work-item@v1.1.0 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + azure_devops_organization: 'BpsLogicBuilder' + azure_devops_project: 'LogicBuilder' + - name: Setup .NET uses: actions/setup-dotnet@v4 with: diff --git a/LogicBuilder.ComponentModel.Design.Serialization/SR.cs b/LogicBuilder.ComponentModel.Design.Serialization/SR.cs index a43732a..a8dafb9 100644 --- a/LogicBuilder.ComponentModel.Design.Serialization/SR.cs +++ b/LogicBuilder.ComponentModel.Design.Serialization/SR.cs @@ -1810,16 +1810,21 @@ internal sealed class SR internal const string XslTransformFileEditor_Ellipses = "XslTransformFileEditor_Ellipses"; internal const string XslTransformFileEditor_Filter = "XslTransformFileEditor_Filter"; + // Maximum length for string arguments when formatting resource messages. + private const int MaxFormattedStringLength = 0x400; + // Length to which strings are truncated before appending an ellipsis. + private const int TruncatedStringLength = 0x3fd; + internal SR() { - this.resources = new ResourceManager("LogicBuilder.ComponentModel.Design.Serialization.Resources", base.GetType().Assembly); + this.resources = new ResourceManager(typeof(Resources)); } private static LogicBuilder.ComponentModel.Design.Serialization.SR GetLoader() { if (loader == null) { - LogicBuilder.ComponentModel.Design.Serialization.SR sr = new LogicBuilder.ComponentModel.Design.Serialization.SR(); + LogicBuilder.ComponentModel.Design.Serialization.SR sr = new(); Interlocked.CompareExchange(ref loader, sr, null); } return loader; @@ -1859,9 +1864,9 @@ public static string GetString(string name, params object[] args) } for (int i = 0; i < args.Length; i++) { - if ((args[i] is string str2) && (str2.Length > 0x400)) + if ((args[i] is string str2) && (str2.Length > MaxFormattedStringLength)) { - args[i] = str2.Substring(0, 0x3fd) + "..."; + args[i] = str2.Substring(0, TruncatedStringLength) + "..."; } } return string.Format(CultureInfo.CurrentCulture, format, args); From 2df462f05a047d48a3691ee8e53c04a33729ebb7 Mon Sep 17 00:00:00 2001 From: Blaise Taylor Date: Fri, 30 Jan 2026 15:48:09 -0500 Subject: [PATCH 2/8] AB#11 v1 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 38dfbd1..cef9bd6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: fetch-depth: 0 - name: Check for linked Azure Boards work item - uses: danhellem/github-actions-pr-is-linked-to-work-item@v1.1.0 + uses: danhellem/github-actions-pr-is-linked-to-work-item@v1 with: github_token: ${{ secrets.GITHUB_TOKEN }} azure_devops_organization: 'BpsLogicBuilder' From 0e686bc076e66aa9438011fba648da68117085a0 Mon Sep 17 00:00:00 2001 From: Blaise Taylor Date: Fri, 30 Jan 2026 15:49:10 -0500 Subject: [PATCH 3/8] AB#11 @main --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cef9bd6..81b2350 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,7 @@ jobs: fetch-depth: 0 - name: Check for linked Azure Boards work item - uses: danhellem/github-actions-pr-is-linked-to-work-item@v1 + uses: danhellem/github-actions-pr-is-linked-to-work-item@main with: github_token: ${{ secrets.GITHUB_TOKEN }} azure_devops_organization: 'BpsLogicBuilder' From 67ebfd9f94aadc21b95ee9f13dc12e9fcd4af0f4 Mon Sep 17 00:00:00 2001 From: Blaise Taylor Date: Fri, 30 Jan 2026 15:54:18 -0500 Subject: [PATCH 4/8] AB#11 Remove parameters --- .github/workflows/ci.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 81b2350..e30c388 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,10 +27,6 @@ jobs: - name: Check for linked Azure Boards work item uses: danhellem/github-actions-pr-is-linked-to-work-item@main - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - azure_devops_organization: 'BpsLogicBuilder' - azure_devops_project: 'LogicBuilder' - name: Setup .NET uses: actions/setup-dotnet@v4 From 803609d8c6eaaab64d2846133cf2893a8ebb78c4 Mon Sep 17 00:00:00 2001 From: Blaise Taylor Date: Fri, 30 Jan 2026 16:46:13 -0500 Subject: [PATCH 5/8] AB#11 Using sample validate-pr-ab.yml. --- .github/workflows/ci.yml | 3 --- .github/workflows/validate-pr-ab.yml | 12 ++++++++++++ ...cBuilder.ComponentModel.Design.Serialization.slnx | 1 + 3 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/validate-pr-ab.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e30c388..0ef5add 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -25,9 +25,6 @@ jobs: with: fetch-depth: 0 - - name: Check for linked Azure Boards work item - uses: danhellem/github-actions-pr-is-linked-to-work-item@main - - name: Setup .NET uses: actions/setup-dotnet@v4 with: diff --git a/.github/workflows/validate-pr-ab.yml b/.github/workflows/validate-pr-ab.yml new file mode 100644 index 0000000..9487457 --- /dev/null +++ b/.github/workflows/validate-pr-ab.yml @@ -0,0 +1,12 @@ +name: 'Description contains AB# with a valid work item id' +on: # rebuild any PRs for main branch changes + pull_request: + types: [opened, reopened, edited] + branches: + - main +jobs: + create-edit-comment: + name: check + runs-on: ubuntu-latest + steps: + - uses: danhellem/github-actions-pr-is-linked-to-work-item@main \ No newline at end of file diff --git a/LogicBuilder.ComponentModel.Design.Serialization.slnx b/LogicBuilder.ComponentModel.Design.Serialization.slnx index 3864e89..3c5936a 100644 --- a/LogicBuilder.ComponentModel.Design.Serialization.slnx +++ b/LogicBuilder.ComponentModel.Design.Serialization.slnx @@ -1,6 +1,7 @@ + From b79b9c3b8bb38ac9ca636a13c31a5fbbb51b1ed2 Mon Sep 17 00:00:00 2001 From: Blaise Taylor Date: Fri, 30 Jan 2026 16:47:59 -0500 Subject: [PATCH 6/8] AB#11 Correcting base branch --- .github/workflows/validate-pr-ab.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/validate-pr-ab.yml b/.github/workflows/validate-pr-ab.yml index 9487457..a2f7178 100644 --- a/.github/workflows/validate-pr-ab.yml +++ b/.github/workflows/validate-pr-ab.yml @@ -3,7 +3,7 @@ on: # rebuild any PRs for main branch changes pull_request: types: [opened, reopened, edited] branches: - - main + - master jobs: create-edit-comment: name: check From 5661efe374cdc3b99fa49f1fc08564d3f00ee3cb Mon Sep 17 00:00:00 2001 From: Blaise Taylor Date: Fri, 30 Jan 2026 16:54:51 -0500 Subject: [PATCH 7/8] AB#11 Testing permissions --- .github/workflows/validate-pr-ab.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/validate-pr-ab.yml b/.github/workflows/validate-pr-ab.yml index a2f7178..c78d5c6 100644 --- a/.github/workflows/validate-pr-ab.yml +++ b/.github/workflows/validate-pr-ab.yml @@ -4,9 +4,13 @@ on: # rebuild any PRs for main branch changes types: [opened, reopened, edited] branches: - master + +permissions: write-all + jobs: create-edit-comment: name: check runs-on: ubuntu-latest steps: - - uses: danhellem/github-actions-pr-is-linked-to-work-item@main \ No newline at end of file + - uses: danhellem/github-actions-pr-is-linked-to-work-item@main + \ No newline at end of file From 0f57bb6c45e6e06bb720dc5b46fc09ba7d952699 Mon Sep 17 00:00:00 2001 From: Blaise Taylor Date: Fri, 30 Jan 2026 17:00:45 -0500 Subject: [PATCH 8/8] AB#11 least privilege --- .github/workflows/validate-pr-ab.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/validate-pr-ab.yml b/.github/workflows/validate-pr-ab.yml index c78d5c6..83b0c2c 100644 --- a/.github/workflows/validate-pr-ab.yml +++ b/.github/workflows/validate-pr-ab.yml @@ -5,7 +5,9 @@ on: # rebuild any PRs for main branch changes branches: - master -permissions: write-all +permissions: + contents: read + pull-requests: write jobs: create-edit-comment: