Skip to content

Commit

Permalink
Fix value for DEPENDABOT_FAIL_ON_EXCEPTION to false on the server
Browse files Browse the repository at this point in the history
  • Loading branch information
mburumaxwell committed Sep 19, 2023
1 parent f80ae2f commit f27a97c
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 21 deletions.
1 change: 0 additions & 1 deletion docs/server.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ The deployment exposes the following parameters that can be tuned to suit the se
|synchronizeOnStartup|Whether to synchronize repositories on startup. This option is useful for initial deployments since the server synchronizes every 6 hours. Leaving it on has no harm, it actually helps you find out if the token works based on the logs.|No|false|
|createOrUpdateWebhooksOnStartup|Whether to create or update Azure DevOps subscriptions on startup. This is required if you want configuration files to be picked up automatically and other event driven functionality.<br/>When this is set to `true`, ensure the value provided for `projectToken` has permissions for service hooks and the owner is a Project Administrator. Leaving this on has no harm because the server will only create new subscription if there are no existing ones based on the URL.|No|false|
|githubToken|Access token for authenticating requests to GitHub. Required for vulnerability checks and to avoid rate limiting on free requests|No|&lt;empty&gt;|
|failOnException|Whether update jobs should fail when an exception occurs.|No|false|
|autoComplete|Whether to set auto complete on created pull requests.|No|true|
|autoCompleteIgnoreConfigs|Identifiers of configs to be ignored in auto complete. E.g 3,4,10|No|&lt;empty&gt;|
|autoCompleteMergeStrategy|Merge strategy to use when setting auto complete on created pull requests. Allowed values: `NoFastForward`, `Rebase`, `RebaseMerge`, or `Squash`|No|`Squash`|
Expand Down
4 changes: 2 additions & 2 deletions server/Tingle.Dependabot/Workflow/UpdateRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@ internal IDictionary<string, string> CreateVariables(Repository repository, Repo
["DEPENDABOT_OPEN_PULL_REQUESTS_LIMIT"] = update.OpenPullRequestsLimit!.Value.ToString(),

["DEPENDABOT_EXTRA_CREDENTIALS"] = credentials!,
["DEPENDABOT_FAIL_ON_EXCEPTION"] = "false",
};

// Add optional values
Expand All @@ -268,8 +269,7 @@ internal IDictionary<string, string> CreateVariables(Repository repository, Repo
.AddIfNotDefault("DEPENDABOT_ALLOW_CONDITIONS", ToJson(MakeAllowEntries(update.Allow)))
.AddIfNotDefault("DEPENDABOT_LABELS", ToJson(update.Labels))
.AddIfNotDefault("DEPENDABOT_BRANCH_NAME_SEPARATOR", update.PullRequestBranchName?.Separator)
.AddIfNotDefault("DEPENDABOT_MILESTONE", update.Milestone?.ToString())
.AddIfNotDefault("DEPENDABOT_FAIL_ON_EXCEPTION", options.FailOnException.ToString().ToLowerInvariant());
.AddIfNotDefault("DEPENDABOT_MILESTONE", update.Milestone?.ToString());

// Add values for Azure DevOps
var url = options.ProjectUrl!.Value;
Expand Down
3 changes: 0 additions & 3 deletions server/Tingle.Dependabot/Workflow/WorkflowOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,6 @@ public class WorkflowOptions
/// <summary>Whether updates should be created in the same order.</summary>
public bool? DeterministicUpdates { get; set; }

/// <summary>Whether update jobs should fail when an exception occurs.</summary>
public bool FailOnException { get; set; }

/// <summary>Whether to set automatic completion of pull requests.</summary>
public bool? AutoComplete { get; set; }

Expand Down
4 changes: 0 additions & 4 deletions server/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ param debugAllJobs bool = false
@description('Access token for authenticating requests to GitHub.')
param githubToken string = ''

@description('Whether update jobs should fail when an exception occurs.')
param failOnException bool = false

@description('Whether to set auto complete on created pull requests.')
param autoComplete bool = true

Expand Down Expand Up @@ -304,7 +301,6 @@ resource app 'Microsoft.App/containerApps@2023-05-01' = {
value: logAnalyticsWorkspace.properties.customerId
}
{ name: 'Workflow__UpdaterContainerImageTemplate', value: 'ghcr.io/tinglesoftware/dependabot-updater-{{ecosystem}}:${imageTag}' }
{ name: 'Workflow__FailOnException', value: failOnException ? 'true' : 'false' }
{ name: 'Workflow__AutoComplete', value: autoComplete ? 'true' : 'false' }
{ name: 'Workflow__AutoCompleteIgnoreConfigs', value: join(autoCompleteIgnoreConfigs, ';') }
{ name: 'Workflow__AutoCompleteMergeStrategy', value: autoCompleteMergeStrategy }
Expand Down
11 changes: 0 additions & 11 deletions server/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,13 +56,6 @@
"description": "Access token for authenticating requests to GitHub."
}
},
"failOnException": {
"type": "bool",
"defaultValue": false,
"metadata": {
"description": "Whether update jobs should fail when an exception occurs."
}
},
"autoComplete": {
"type": "bool",
"defaultValue": true,
Expand Down Expand Up @@ -473,10 +466,6 @@
"name": "Workflow__UpdaterContainerImageTemplate",
"value": "[format('ghcr.io/tinglesoftware/dependabot-updater-{{{{ecosystem}}}}:{0}', parameters('imageTag'))]"
},
{
"name": "Workflow__FailOnException",
"value": "[if(parameters('failOnException'), 'true', 'false')]"
},
{
"name": "Workflow__AutoComplete",
"value": "[if(parameters('autoComplete'), 'true', 'false')]"
Expand Down

0 comments on commit f27a97c

Please sign in to comment.