From 148171cead5bf459076787da2e5957ac51649a42 Mon Sep 17 00:00:00 2001
From: Alexander Holstrup <117829001+aholstrup1@users.noreply.github.com>
Date: Fri, 6 Dec 2024 10:43:33 +0100
Subject: [PATCH 1/9] Add support for commit suffixes (#77)
---
Actions/AL-Go-Helper.ps1 | 17 ++++++++++++++++-
RELEASENOTES.md | 1 +
Scenarios/settings.md | 1 +
3 files changed, 18 insertions(+), 1 deletion(-)
diff --git a/Actions/AL-Go-Helper.ps1 b/Actions/AL-Go-Helper.ps1
index 141081778..f617be2bf 100644
--- a/Actions/AL-Go-Helper.ps1
+++ b/Actions/AL-Go-Helper.ps1
@@ -661,6 +661,7 @@ function ReadSettings {
"defaultReleaseMD" = "## Release reference documentation\n\nThis is the generated reference documentation for [{REPOSITORY}](https://github.com/{REPOSITORY}).\n\nYou can use the navigation bar at the top and the table of contents to the left to navigate your documentation.\n\nYou can change this content by creating/editing the **{INDEXTEMPLATERELATIVEPATH}** file in your repository or use the alDoc:defaultReleaseMD setting in your repository settings file (.github/AL-Go-Settings.json)\n\n{RELEASENOTES}"
}
"trustMicrosoftNuGetFeeds" = $true
+ "commitMessageSuffix" = ""
"trustedSigning" = [ordered]@{
"Endpoint" = ""
"Account" = ""
@@ -1355,9 +1356,23 @@ function CommitFromNewFolder {
invoke-git add *
$status = invoke-git -returnValue status --porcelain=v1
if ($status) {
+ $title = $commitMessage
+
+ # Add commit message suffix if specified in settings
+ $settings = ReadSettings
+ if ($settings.commitMessageSuffix) {
+ $commitMessage = "$commitMessage / $($settings.commitMessageSuffix)"
+ $body = "$body`n$($settings.commitMessageSuffix)"
+ }
+
if ($commitMessage.Length -gt 250) {
$commitMessage = "$($commitMessage.Substring(0,250))...)"
}
+
+ if ($title.Length -gt 250) {
+ $title = "$($title.Substring(0,250))...)"
+ }
+
invoke-git commit --allow-empty -m "$commitMessage"
$activeBranch = invoke-git -returnValue -silent name-rev --name-only HEAD
# $branch is the name of the branch to be used when creating a Pull Request
@@ -1377,7 +1392,7 @@ function CommitFromNewFolder {
}
invoke-git push -u $serverUrl $branch
try {
- invoke-gh pr create --fill --head $branch --repo $env:GITHUB_REPOSITORY --base $ENV:GITHUB_REF_NAME --body "$body"
+ invoke-gh pr create --fill --title $title --head $branch --repo $env:GITHUB_REPOSITORY --base $ENV:GITHUB_REF_NAME --body "$body"
}
catch {
OutputError("GitHub actions are not allowed to create Pull Requests (see GitHub Organization or Repository Actions Settings). You can create the PR manually by navigating to $($env:GITHUB_SERVER_URL)/$($env:GITHUB_REPOSITORY)/tree/$branch")
diff --git a/RELEASENOTES.md b/RELEASENOTES.md
index 028c2613d..c2cd0ee05 100644
--- a/RELEASENOTES.md
+++ b/RELEASENOTES.md
@@ -6,6 +6,7 @@
### New Repository Settings
- `useGitSubmodules` can be either `true` or `recursive` if you want to enable Git Submodules in your repository. If your Git submodules resides in a private repository, you need to create a secret called `gitSubmodulesToken` containing a PAT with access to the submodule repositories. Like with all other secrets, you can also create a setting called `gitSubmodulesTokenSecretName` and specify the name of another secret, with these permissions (f.ex. ghTokenWorkflow).
+- `commitMessageSuffix` - A string you want to append to the end of commits/pull requests created by AL-Go. This can be useful if you are using the Azure Boards integration (or similar integration) to link commits to workitems.
### Support for Git submodules
diff --git a/Scenarios/settings.md b/Scenarios/settings.md
index cb4056e81..278196595 100644
--- a/Scenarios/settings.md
+++ b/Scenarios/settings.md
@@ -79,6 +79,7 @@ The repository settings are only read from the repository settings file (.github
| UpdateGitHubGoSystemFilesSchedule | CRON schedule for when Update AL-Go System Files should run. When Update AL-Go System Files runs on a schedule, it uses direct Commit instead of creating a PR. Default is no scheduled run, only manual trigger. Build your CRON string here: [https://crontab.guru](https://crontab.guru). You need to run the Update AL-Go System Files workflow for the schedule to take effect. |
| buildModes | A list of build modes to use when building the AL-Go projects. Every AL-Go project will be built using each build mode. AL-Go ships with the following build modes out of the box:
**Default**: Apps are compiled as they are in the source code.
**Clean**: _PreprocessorSymbols_ are enabled when compiling the apps. The values for the symbols correspond to the `cleanModePreprocessorSymbols` setting of the AL-Go project.
**Translated**: `TranslationFile` compiler feature is enabled when compiling the apps.
It is also possible to specify custom build modes by adding a build mode that is different than 'Default', 'Clean' or 'Translated'. |
| useGitSubmodules | If your repository is using Git Submodules, you can set the `useGitSubmodules` setting to `"true"` or `"recursive"` in order to use these submodules during build workflows. If `useGitSubmodules` is not set, git submodules are not initialized. If the submodules reside in private repositories, you need to define a `gitSubmodulesToken` secret. Read [this](https://aka.ms/algosecrets#gitSubmodulesToken) for more information. |
+| commitMessageSuffix | If you want AL-Go to include a particular message in commits and pull requests opened by AL-Go you can specify a `commitMessageSuffix`. |
## Advanced settings
From e7a78fc02d86fde07f7e24cd67dd69c136d28662 Mon Sep 17 00:00:00 2001
From: Alexander Holstrup <117829001+aholstrup1@users.noreply.github.com>
Date: Sun, 8 Dec 2024 13:14:50 +0100
Subject: [PATCH 2/9] Add more commit options (#78)
---
Actions/AL-Go-Helper.ps1 | 24 ++++++++++++++++++++----
1 file changed, 20 insertions(+), 4 deletions(-)
diff --git a/Actions/AL-Go-Helper.ps1 b/Actions/AL-Go-Helper.ps1
index f617be2bf..3b139858c 100644
--- a/Actions/AL-Go-Helper.ps1
+++ b/Actions/AL-Go-Helper.ps1
@@ -662,6 +662,11 @@ function ReadSettings {
}
"trustMicrosoftNuGetFeeds" = $true
"commitMessageSuffix" = ""
+ "commitOptions" = [ordered]@{
+ "commitMessageSuffix" = ""
+ "commitAutoMerge" = $false
+ "commitPullRequestLabels" = @()
+ }
"trustedSigning" = [ordered]@{
"Endpoint" = ""
"Account" = ""
@@ -1360,9 +1365,9 @@ function CommitFromNewFolder {
# Add commit message suffix if specified in settings
$settings = ReadSettings
- if ($settings.commitMessageSuffix) {
- $commitMessage = "$commitMessage / $($settings.commitMessageSuffix)"
- $body = "$body`n$($settings.commitMessageSuffix)"
+ if ($settings.commitOptions.commitMessageSuffix) {
+ $commitMessage = "$commitMessage / $($settings.commitOptions.commitMessageSuffix)"
+ $body = "$body`n$($settings.commitOptions.commitMessageSuffix)"
}
if ($commitMessage.Length -gt 250) {
@@ -1392,7 +1397,18 @@ function CommitFromNewFolder {
}
invoke-git push -u $serverUrl $branch
try {
- invoke-gh pr create --fill --title $title --head $branch --repo $env:GITHUB_REPOSITORY --base $ENV:GITHUB_REF_NAME --body "$body"
+ $prCreateCmd = "invoke-gh pr create --fill --title ""$title"" --head ""$branch"" --repo ""$env:GITHUB_REPOSITORY"" --base ""$ENV:GITHUB_REF_NAME"" --body ""$body"""
+ if ($settings.commitOptions.commitPullRequestLabels) {
+ $labels = "$($settings.commitOptions.commitPullRequestLabels -join ",")"
+ Write-Host "Adding labels: $labels"
+ $prCreateCmd += " --label ""$labels"""
+ }
+
+ Invoke-Expression $prCreateCmd
+
+ if ($settings.commitOptions.commitAutoMerge) {
+ invoke-gh pr merge --auto --squash --delete-branch
+ }
}
catch {
OutputError("GitHub actions are not allowed to create Pull Requests (see GitHub Organization or Repository Actions Settings). You can create the PR manually by navigating to $($env:GITHUB_SERVER_URL)/$($env:GITHUB_REPOSITORY)/tree/$branch")
From 5a196f8aa02c987e32876e21c43c2ba1605168c5 Mon Sep 17 00:00:00 2001
From: Alexander Holstrup <117829001+aholstrup1@users.noreply.github.com>
Date: Mon, 9 Dec 2024 08:45:17 +0100
Subject: [PATCH 3/9] Feedback
---
Actions/AL-Go-Helper.ps1 | 19 +++++++++----------
RELEASENOTES.md | 5 ++++-
Scenarios/settings.md | 2 +-
3 files changed, 14 insertions(+), 12 deletions(-)
diff --git a/Actions/AL-Go-Helper.ps1 b/Actions/AL-Go-Helper.ps1
index 3b139858c..ca41b5fea 100644
--- a/Actions/AL-Go-Helper.ps1
+++ b/Actions/AL-Go-Helper.ps1
@@ -661,11 +661,10 @@ function ReadSettings {
"defaultReleaseMD" = "## Release reference documentation\n\nThis is the generated reference documentation for [{REPOSITORY}](https://github.com/{REPOSITORY}).\n\nYou can use the navigation bar at the top and the table of contents to the left to navigate your documentation.\n\nYou can change this content by creating/editing the **{INDEXTEMPLATERELATIVEPATH}** file in your repository or use the alDoc:defaultReleaseMD setting in your repository settings file (.github/AL-Go-Settings.json)\n\n{RELEASENOTES}"
}
"trustMicrosoftNuGetFeeds" = $true
- "commitMessageSuffix" = ""
"commitOptions" = [ordered]@{
- "commitMessageSuffix" = ""
- "commitAutoMerge" = $false
- "commitPullRequestLabels" = @()
+ "messageSuffix" = ""
+ "autoMerge" = $false
+ "pullRequestLabels" = @()
}
"trustedSigning" = [ordered]@{
"Endpoint" = ""
@@ -1365,9 +1364,9 @@ function CommitFromNewFolder {
# Add commit message suffix if specified in settings
$settings = ReadSettings
- if ($settings.commitOptions.commitMessageSuffix) {
- $commitMessage = "$commitMessage / $($settings.commitOptions.commitMessageSuffix)"
- $body = "$body`n$($settings.commitOptions.commitMessageSuffix)"
+ if ($settings.commitOptions.messageSuffix) {
+ $commitMessage = "$commitMessage / $($settings.commitOptions.messageSuffix)"
+ $body = "$body`n$($settings.commitOptions.messageSuffix)"
}
if ($commitMessage.Length -gt 250) {
@@ -1398,15 +1397,15 @@ function CommitFromNewFolder {
invoke-git push -u $serverUrl $branch
try {
$prCreateCmd = "invoke-gh pr create --fill --title ""$title"" --head ""$branch"" --repo ""$env:GITHUB_REPOSITORY"" --base ""$ENV:GITHUB_REF_NAME"" --body ""$body"""
- if ($settings.commitOptions.commitPullRequestLabels) {
- $labels = "$($settings.commitOptions.commitPullRequestLabels -join ",")"
+ if ($settings.commitOptions.pullRequestLabels) {
+ $labels = "$($settings.commitOptions.pullRequestLabels -join ",")"
Write-Host "Adding labels: $labels"
$prCreateCmd += " --label ""$labels"""
}
Invoke-Expression $prCreateCmd
- if ($settings.commitOptions.commitAutoMerge) {
+ if ($settings.commitOptions.autoMerge) {
invoke-gh pr merge --auto --squash --delete-branch
}
}
diff --git a/RELEASENOTES.md b/RELEASENOTES.md
index c2cd0ee05..47d92ed56 100644
--- a/RELEASENOTES.md
+++ b/RELEASENOTES.md
@@ -6,7 +6,10 @@
### New Repository Settings
- `useGitSubmodules` can be either `true` or `recursive` if you want to enable Git Submodules in your repository. If your Git submodules resides in a private repository, you need to create a secret called `gitSubmodulesToken` containing a PAT with access to the submodule repositories. Like with all other secrets, you can also create a setting called `gitSubmodulesTokenSecretName` and specify the name of another secret, with these permissions (f.ex. ghTokenWorkflow).
-- `commitMessageSuffix` - A string you want to append to the end of commits/pull requests created by AL-Go. This can be useful if you are using the Azure Boards integration (or similar integration) to link commits to workitems.
+- `commitOptions` - is a structure defining how you want AL-Go to handle automated commits or pull requests coming from AL-Go (e.g. for Update Al-Go System Files). The structure contains the following properties
+ - `messageSuffix` : A string you want to append to the end of commits/pull requests created by AL-Go. This can be useful if you are using the Azure Boards integration (or similar integration) to link commits to workitems.
+ - `autoMerge` : A boolean defining whether you want AL-Go pull requests to be set to auto-complete. This will auto-complete the pull requests once all checks are green and all required reviewers have approved.
+ - `pullRequestLabels` : A list of labels to add to the pull request. The labels need to be created in the repository before they can be applied.
### Support for Git submodules
diff --git a/Scenarios/settings.md b/Scenarios/settings.md
index 278196595..e99da2c57 100644
--- a/Scenarios/settings.md
+++ b/Scenarios/settings.md
@@ -79,7 +79,7 @@ The repository settings are only read from the repository settings file (.github
| UpdateGitHubGoSystemFilesSchedule | CRON schedule for when Update AL-Go System Files should run. When Update AL-Go System Files runs on a schedule, it uses direct Commit instead of creating a PR. Default is no scheduled run, only manual trigger. Build your CRON string here: [https://crontab.guru](https://crontab.guru). You need to run the Update AL-Go System Files workflow for the schedule to take effect. |
| buildModes | A list of build modes to use when building the AL-Go projects. Every AL-Go project will be built using each build mode. AL-Go ships with the following build modes out of the box:
**Default**: Apps are compiled as they are in the source code.
**Clean**: _PreprocessorSymbols_ are enabled when compiling the apps. The values for the symbols correspond to the `cleanModePreprocessorSymbols` setting of the AL-Go project.
**Translated**: `TranslationFile` compiler feature is enabled when compiling the apps.
It is also possible to specify custom build modes by adding a build mode that is different than 'Default', 'Clean' or 'Translated'. |
| useGitSubmodules | If your repository is using Git Submodules, you can set the `useGitSubmodules` setting to `"true"` or `"recursive"` in order to use these submodules during build workflows. If `useGitSubmodules` is not set, git submodules are not initialized. If the submodules reside in private repositories, you need to define a `gitSubmodulesToken` secret. Read [this](https://aka.ms/algosecrets#gitSubmodulesToken) for more information. |
-| commitMessageSuffix | If you want AL-Go to include a particular message in commits and pull requests opened by AL-Go you can specify a `commitMessageSuffix`. |
+| commitOptions | If you want more control over how AL-Go creates pull requests or commits changes to the repository you can define `commitOptions`. It is a structure defining how you want AL-Go to handle automated commits or pull requests coming from AL-Go (e.g. for Update Al-Go System Files). The structure contains the following properties:
`messageSuffix` : A string you want to append to the end of commits/pull requests created by AL-Go. This can be useful if you are using the Azure Boards integration (or similar integration) to link commits to workitems.
`autoMerge` : A boolean defining whether you want AL-Go pull requests to be set to auto-complete. This will auto-complete the pull requests once all checks are green and all required reviewers have approved.
`pullRequestLabels` : A list of labels to add to the pull request. The labels need to be created in the repository before they can be applied.
If you want different behavior in different AL-Go workflows you can add the `commitOptions` setting to your [workflow-specific settings files](https://github.com/microsoft/AL-Go/blob/main/Scenarios/settings.md#where-are-the-settings-located). |
## Advanced settings
From 053c14fe078fc24c1e59abf6cb0cf5c599a1715d Mon Sep 17 00:00:00 2001
From: Alexander Holstrup <117829001+aholstrup1@users.noreply.github.com>
Date: Tue, 10 Dec 2024 08:04:19 +0100
Subject: [PATCH 4/9] Update Scenarios/settings.md
Co-authored-by: Maria Zhelezova <43066499+mazhelez@users.noreply.github.com>
---
Scenarios/settings.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Scenarios/settings.md b/Scenarios/settings.md
index e99da2c57..a0874b0cb 100644
--- a/Scenarios/settings.md
+++ b/Scenarios/settings.md
@@ -79,7 +79,7 @@ The repository settings are only read from the repository settings file (.github
| UpdateGitHubGoSystemFilesSchedule | CRON schedule for when Update AL-Go System Files should run. When Update AL-Go System Files runs on a schedule, it uses direct Commit instead of creating a PR. Default is no scheduled run, only manual trigger. Build your CRON string here: [https://crontab.guru](https://crontab.guru). You need to run the Update AL-Go System Files workflow for the schedule to take effect. |
| buildModes | A list of build modes to use when building the AL-Go projects. Every AL-Go project will be built using each build mode. AL-Go ships with the following build modes out of the box:
**Default**: Apps are compiled as they are in the source code.
**Clean**: _PreprocessorSymbols_ are enabled when compiling the apps. The values for the symbols correspond to the `cleanModePreprocessorSymbols` setting of the AL-Go project.
**Translated**: `TranslationFile` compiler feature is enabled when compiling the apps.
It is also possible to specify custom build modes by adding a build mode that is different than 'Default', 'Clean' or 'Translated'. |
| useGitSubmodules | If your repository is using Git Submodules, you can set the `useGitSubmodules` setting to `"true"` or `"recursive"` in order to use these submodules during build workflows. If `useGitSubmodules` is not set, git submodules are not initialized. If the submodules reside in private repositories, you need to define a `gitSubmodulesToken` secret. Read [this](https://aka.ms/algosecrets#gitSubmodulesToken) for more information. |
-| commitOptions | If you want more control over how AL-Go creates pull requests or commits changes to the repository you can define `commitOptions`. It is a structure defining how you want AL-Go to handle automated commits or pull requests coming from AL-Go (e.g. for Update Al-Go System Files). The structure contains the following properties:
`messageSuffix` : A string you want to append to the end of commits/pull requests created by AL-Go. This can be useful if you are using the Azure Boards integration (or similar integration) to link commits to workitems.
`autoMerge` : A boolean defining whether you want AL-Go pull requests to be set to auto-complete. This will auto-complete the pull requests once all checks are green and all required reviewers have approved.
`pullRequestLabels` : A list of labels to add to the pull request. The labels need to be created in the repository before they can be applied.
If you want different behavior in different AL-Go workflows you can add the `commitOptions` setting to your [workflow-specific settings files](https://github.com/microsoft/AL-Go/blob/main/Scenarios/settings.md#where-are-the-settings-located). |
+| commitOptions | If you want more control over how AL-Go creates pull requests or commits changes to the repository you can define `commitOptions`. It is a structure defining how you want AL-Go to handle automated commits or pull requests coming from AL-Go (e.g. for Update AL-Go System Files). The structure contains the following properties:
`messageSuffix` : A string you want to append to the end of commits/pull requests created by AL-Go. This can be useful if you are using the Azure Boards integration (or similar integration) to link commits to work items.
`autoMerge` : A boolean defining whether you want AL-Go pull requests to be set to auto-complete. This will auto-complete the pull requests once all checks are green and all required reviewers have approved.
`pullRequestLabels` : A list of labels to add to the pull request. The labels need to be created in the repository before they can be applied.
If you want different behavior in different AL-Go workflows you can add the `commitOptions` setting to your [workflow-specific settings files](https://github.com/microsoft/AL-Go/blob/main/Scenarios/settings.md#where-are-the-settings-located). |
## Advanced settings
From 7d3be88aa962cb29acf04482e6bcffd42fd02166 Mon Sep 17 00:00:00 2001
From: Alexander Holstrup <117829001+aholstrup1@users.noreply.github.com>
Date: Tue, 10 Dec 2024 08:04:27 +0100
Subject: [PATCH 5/9] Update RELEASENOTES.md
Co-authored-by: Maria Zhelezova <43066499+mazhelez@users.noreply.github.com>
---
RELEASENOTES.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/RELEASENOTES.md b/RELEASENOTES.md
index 47d92ed56..88714e5ab 100644
--- a/RELEASENOTES.md
+++ b/RELEASENOTES.md
@@ -6,7 +6,7 @@
### New Repository Settings
- `useGitSubmodules` can be either `true` or `recursive` if you want to enable Git Submodules in your repository. If your Git submodules resides in a private repository, you need to create a secret called `gitSubmodulesToken` containing a PAT with access to the submodule repositories. Like with all other secrets, you can also create a setting called `gitSubmodulesTokenSecretName` and specify the name of another secret, with these permissions (f.ex. ghTokenWorkflow).
-- `commitOptions` - is a structure defining how you want AL-Go to handle automated commits or pull requests coming from AL-Go (e.g. for Update Al-Go System Files). The structure contains the following properties
+- `commitOptions` - is a structure defining how you want AL-Go to handle automated commits or pull requests coming from AL-Go (e.g. for Update AL-Go System Files). The structure contains the following properties
- `messageSuffix` : A string you want to append to the end of commits/pull requests created by AL-Go. This can be useful if you are using the Azure Boards integration (or similar integration) to link commits to workitems.
- `autoMerge` : A boolean defining whether you want AL-Go pull requests to be set to auto-complete. This will auto-complete the pull requests once all checks are green and all required reviewers have approved.
- `pullRequestLabels` : A list of labels to add to the pull request. The labels need to be created in the repository before they can be applied.
From f660f7df5cbb58928fb977038feb81efa5350b25 Mon Sep 17 00:00:00 2001
From: aholstrup1
Date: Tue, 10 Dec 2024 08:07:57 +0100
Subject: [PATCH 6/9] Suggestion
---
Actions/AL-Go-Helper.ps1 | 4 ++--
RELEASENOTES.md | 2 +-
Scenarios/settings.md | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/Actions/AL-Go-Helper.ps1 b/Actions/AL-Go-Helper.ps1
index ca41b5fea..490aa7a54 100644
--- a/Actions/AL-Go-Helper.ps1
+++ b/Actions/AL-Go-Helper.ps1
@@ -663,7 +663,7 @@ function ReadSettings {
"trustMicrosoftNuGetFeeds" = $true
"commitOptions" = [ordered]@{
"messageSuffix" = ""
- "autoMerge" = $false
+ "pullRequestAutoMerge" = $false
"pullRequestLabels" = @()
}
"trustedSigning" = [ordered]@{
@@ -1405,7 +1405,7 @@ function CommitFromNewFolder {
Invoke-Expression $prCreateCmd
- if ($settings.commitOptions.autoMerge) {
+ if ($settings.commitOptions.pullRequestAutoMerge) {
invoke-gh pr merge --auto --squash --delete-branch
}
}
diff --git a/RELEASENOTES.md b/RELEASENOTES.md
index 88714e5ab..57466989d 100644
--- a/RELEASENOTES.md
+++ b/RELEASENOTES.md
@@ -8,7 +8,7 @@
- `useGitSubmodules` can be either `true` or `recursive` if you want to enable Git Submodules in your repository. If your Git submodules resides in a private repository, you need to create a secret called `gitSubmodulesToken` containing a PAT with access to the submodule repositories. Like with all other secrets, you can also create a setting called `gitSubmodulesTokenSecretName` and specify the name of another secret, with these permissions (f.ex. ghTokenWorkflow).
- `commitOptions` - is a structure defining how you want AL-Go to handle automated commits or pull requests coming from AL-Go (e.g. for Update AL-Go System Files). The structure contains the following properties
- `messageSuffix` : A string you want to append to the end of commits/pull requests created by AL-Go. This can be useful if you are using the Azure Boards integration (or similar integration) to link commits to workitems.
- - `autoMerge` : A boolean defining whether you want AL-Go pull requests to be set to auto-complete. This will auto-complete the pull requests once all checks are green and all required reviewers have approved.
+ - `pullRequestAutoMerge` : A boolean defining whether you want AL-Go pull requests to be set to auto-complete. This will auto-complete the pull requests once all checks are green and all required reviewers have approved.
- `pullRequestLabels` : A list of labels to add to the pull request. The labels need to be created in the repository before they can be applied.
### Support for Git submodules
diff --git a/Scenarios/settings.md b/Scenarios/settings.md
index a0874b0cb..d33e11f60 100644
--- a/Scenarios/settings.md
+++ b/Scenarios/settings.md
@@ -79,7 +79,7 @@ The repository settings are only read from the repository settings file (.github
| UpdateGitHubGoSystemFilesSchedule | CRON schedule for when Update AL-Go System Files should run. When Update AL-Go System Files runs on a schedule, it uses direct Commit instead of creating a PR. Default is no scheduled run, only manual trigger. Build your CRON string here: [https://crontab.guru](https://crontab.guru). You need to run the Update AL-Go System Files workflow for the schedule to take effect. |
| buildModes | A list of build modes to use when building the AL-Go projects. Every AL-Go project will be built using each build mode. AL-Go ships with the following build modes out of the box:
**Default**: Apps are compiled as they are in the source code.
**Clean**: _PreprocessorSymbols_ are enabled when compiling the apps. The values for the symbols correspond to the `cleanModePreprocessorSymbols` setting of the AL-Go project.
**Translated**: `TranslationFile` compiler feature is enabled when compiling the apps.
It is also possible to specify custom build modes by adding a build mode that is different than 'Default', 'Clean' or 'Translated'. |
| useGitSubmodules | If your repository is using Git Submodules, you can set the `useGitSubmodules` setting to `"true"` or `"recursive"` in order to use these submodules during build workflows. If `useGitSubmodules` is not set, git submodules are not initialized. If the submodules reside in private repositories, you need to define a `gitSubmodulesToken` secret. Read [this](https://aka.ms/algosecrets#gitSubmodulesToken) for more information. |
-| commitOptions | If you want more control over how AL-Go creates pull requests or commits changes to the repository you can define `commitOptions`. It is a structure defining how you want AL-Go to handle automated commits or pull requests coming from AL-Go (e.g. for Update AL-Go System Files). The structure contains the following properties:
`messageSuffix` : A string you want to append to the end of commits/pull requests created by AL-Go. This can be useful if you are using the Azure Boards integration (or similar integration) to link commits to work items.
`autoMerge` : A boolean defining whether you want AL-Go pull requests to be set to auto-complete. This will auto-complete the pull requests once all checks are green and all required reviewers have approved.
`pullRequestLabels` : A list of labels to add to the pull request. The labels need to be created in the repository before they can be applied.
If you want different behavior in different AL-Go workflows you can add the `commitOptions` setting to your [workflow-specific settings files](https://github.com/microsoft/AL-Go/blob/main/Scenarios/settings.md#where-are-the-settings-located). |
+| commitOptions | If you want more control over how AL-Go creates pull requests or commits changes to the repository you can define `commitOptions`. It is a structure defining how you want AL-Go to handle automated commits or pull requests coming from AL-Go (e.g. for Update AL-Go System Files). The structure contains the following properties:
`messageSuffix` : A string you want to append to the end of commits/pull requests created by AL-Go. This can be useful if you are using the Azure Boards integration (or similar integration) to link commits to work items.
`pullRequestAutoMerge` : A boolean defining whether you want AL-Go pull requests to be set to auto-complete. This will auto-complete the pull requests once all checks are green and all required reviewers have approved.
`pullRequestLabels` : A list of labels to add to the pull request. The labels need to be created in the repository before they can be applied.
If you want different behavior in different AL-Go workflows you can add the `commitOptions` setting to your [workflow-specific settings files](https://github.com/microsoft/AL-Go/blob/main/Scenarios/settings.md#where-are-the-settings-located). |
## Advanced settings
From 6b8c64c09d9eb66710e0373d33be722e0b823d8a Mon Sep 17 00:00:00 2001
From: aholstrup1
Date: Tue, 10 Dec 2024 08:13:36 +0100
Subject: [PATCH 7/9] Syntax
---
Actions/AL-Go-Helper.ps1 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Actions/AL-Go-Helper.ps1 b/Actions/AL-Go-Helper.ps1
index 490aa7a54..cc6f15907 100644
--- a/Actions/AL-Go-Helper.ps1
+++ b/Actions/AL-Go-Helper.ps1
@@ -663,7 +663,7 @@ function ReadSettings {
"trustMicrosoftNuGetFeeds" = $true
"commitOptions" = [ordered]@{
"messageSuffix" = ""
- "pullRequestAutoMerge" = $false
+ "pullRequestAutoMerge" = $false
"pullRequestLabels" = @()
}
"trustedSigning" = [ordered]@{
From 07fe49fcc90ef5f58edfb81bbb0467850ad02bed Mon Sep 17 00:00:00 2001
From: Alexander Holstrup <117829001+aholstrup1@users.noreply.github.com>
Date: Wed, 11 Dec 2024 08:37:41 +0100
Subject: [PATCH 8/9] Update dependabot.yml
---
.github/dependabot.yml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/.github/dependabot.yml b/.github/dependabot.yml
index be2a05286..106f162f0 100644
--- a/.github/dependabot.yml
+++ b/.github/dependabot.yml
@@ -14,3 +14,5 @@ updates:
- dependency-name: "microsoft/AL-Go-Actions/*"
schedule:
interval: weekly
+ commit-message:
+ prefix: "[Fixes AB#123456]"
From 04d6efbd42e2d83a5a89c119c99f740e0d46c9dc Mon Sep 17 00:00:00 2001
From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com>
Date: Mon, 16 Dec 2024 00:59:58 +0000
Subject: [PATCH 9/9] [Fixes AB#123456]: Bump github/codeql-action
Bumps the external-dependencies group with 1 update in the /.github/workflows directory: [github/codeql-action](https://github.com/github/codeql-action).
Updates `github/codeql-action` from 3.27.6 to 3.27.9
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/aa578102511db1f4524ed59b8cc2bae4f6e88195...df409f7d9260372bd5f19e5b04e83cb3c43714ae)
---
updated-dependencies:
- dependency-name: github/codeql-action
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: external-dependencies
...
Signed-off-by: dependabot[bot]
---
.github/workflows/powershell.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.github/workflows/powershell.yaml b/.github/workflows/powershell.yaml
index ebd06c8ed..24cdb34a0 100644
--- a/.github/workflows/powershell.yaml
+++ b/.github/workflows/powershell.yaml
@@ -31,6 +31,6 @@ jobs:
# Upload the SARIF file generated in the previous step
- name: Upload SARIF results file
- uses: github/codeql-action/upload-sarif@aa578102511db1f4524ed59b8cc2bae4f6e88195 # v3.27.6
+ uses: github/codeql-action/upload-sarif@df409f7d9260372bd5f19e5b04e83cb3c43714ae # v3.27.9
with:
sarif_file: results.sarif