From 74cf6904bc45e0b4c3da47c3347f2f04308b0074 Mon Sep 17 00:00:00 2001 From: nafg <98384+nafg@users.noreply.github.com> Date: Tue, 22 Oct 2024 01:14:16 +0000 Subject: [PATCH] Regenerated models --- .../mergify/models/generated/Action.scala | 268 ++++++------------ 1 file changed, 94 insertions(+), 174 deletions(-) diff --git a/generated-models/src/main/scala/io/github/nafg/mergify/models/generated/Action.scala b/generated-models/src/main/scala/io/github/nafg/mergify/models/generated/Action.scala index c4aa919..e94fc7f 100644 --- a/generated-models/src/main/scala/io/github/nafg/mergify/models/generated/Action.scala +++ b/generated-models/src/main/scala/io/github/nafg/mergify/models/generated/Action.scala @@ -12,71 +12,20 @@ object Action { /** Assign a pull request to a user. */ case class Assign( - /** The users to assign to the pull request. - */ - addUsers: Seq[String], - /** The users to remove from assignees. - */ - removeUsers: Seq[String] ) extends Action /** Copy a pull request to another branch once it is merged. */ case class Backport( - /** Users to assign the newly created pull request. As the type is a data type template, you could use, e.g., - * {{author}} to assign the pull request to its original author. - */ - assignees: Seq[String], - /** The pull request body. - Default: "{{ body }} This is an automatic backport of pull request #{{number}} done by - * [Mergify](https://mergify.com)." - */ - body: Option[String] = None, - /** Mergify can impersonate a GitHub user to backport a pull request. If no bot_account is set, Mergify backports - * the pull request itself. - */ - botAccount: String = "", - /** The list of branches the pull request should be copied to. - Default: [] - */ - branches: Option[Seq[String]] = None, - /** Whether to create the pull requests even if they are conflicts when cherry-picking the commits. - Default: true - */ - ignoreConflicts: Option[Boolean] = None, - /** The list of labels to add to the created pull requests. - */ - labels: Seq[String], - /** The label to add to the created pull request if it has conflicts and ignore_conflicts is set to true. - Default: - * conflicts - */ - labelConflicts: Option[String] = None, - /** Style used by git when displaying merge conflicts - Default: merge - */ - mergeConflictStyle: Option[ToJson /*merge or diff3*/] = None, - /** The list of regexes to find branches the pull request should be copied to. - */ - regexes: Seq[String], - /** The pull request title. - Default: "{{ title }} (backport #{{ number }})" - */ - title: Option[String] = None, - /** List of reporting modes for the action's result. - Default: - check - */ - reportMode: Option[Seq[ToJson /*report modes*/]] = None ) extends Action /** Close a pull request. */ case class Close( - /** The message to write as a comment after closing the pull request. - Default: This pull request has been - * automatically closed by Mergify. + /** A string template using the Jinja2 syntax. + Default: This pull request has been automatically closed by Mergify. */ message: Option[String] = None ) extends Action @@ -85,49 +34,6 @@ object Action { /** Copy a pull request to another branch. */ case class Copy( - /** Users to assign the newly created pull request. As the type is Template, you could use, e.g., {{author}} to - * assign the pull request to its original author. - */ - assignees: Seq[String], - /** The pull request body. - Default: "{{ body }} This is an automatic copy of pull request #{{number}} done by - * [Mergify](https://mergify.com)." - */ - body: Option[String] = None, - /** Mergify can impersonate a GitHub user to copy a pull request. If no bot_account is set, Mergify copies the pull - * request itself. - */ - botAccount: String = "", - /** The list of branches the pull request should be copied to. - */ - branches: Seq[String], - /** Whether to create the pull requests even if they are conflicts when cherry-picking the commits. - Default: true - */ - ignoreConflicts: Option[Boolean] = None, - /** The list of labels to add to the created pull requests. - */ - labels: Seq[String], - /** The label to add to the created pull request if it has conflicts and ignore_conflicts is set to true. - Default: - * conflicts - */ - labelConflicts: Option[String] = None, - /** Style used by git when displaying merge conflicts - Default: merge - */ - mergeConflictStyle: Option[ToJson /*merge or diff3*/] = None, - /** The list of regexes to find branches the pull request should be copied to. - */ - regexes: Seq[String], - /** The pull request title. - Default: "{{ title }} (copy #{{ number }})" - */ - title: Option[String] = None, - /** List of reporting modes for the action's result. - Default: - check - */ - reportMode: Option[Seq[ToJson /*report modes*/]] = None ) extends Action @@ -137,10 +43,10 @@ object Action { /** Mergify can impersonate a GitHub user to comment a pull request. If no bot_account is set, Mergify will comment * the pull request itself. */ - botAccount: String = "", + botAccount: ToJson /*template or null*/, /** The message to write as a comment. */ - message: String = "" + message: ToJson /*template or null*/ ) extends Action @@ -163,18 +69,18 @@ object Action { * will be removed. Default: true */ - approved: Option[ToJson /*boolean, from_requested_reviewers or list of GitHub login*/] = None, + approved: Option[Seq[ToJson /*string, boolean or from_requested_reviewers*/]] = None, /** If set to true, all the reviews requesting changes will be removed when the pull request is updated. If set to * false, nothing will be done. If set to a list, each item should be the GitHub login of a user whose review will * be removed. If set to from_requested_reviewers, the list of requested reviewers will be used to get whose review * will be removed. Default: true */ - changesRequested: Option[ToJson /*boolean, from_requested_reviewers or list of GitHub login*/] = None, - /** The message to post when dismissing the review. - Default: Pull request has been modified. + changesRequested: Option[Seq[ToJson /*string, boolean or from_requested_reviewers*/]] = None, + /** Message to use when dismissing reviews. + Default: null */ - message: Option[String] = None, + message: Option[ToJson /*template or null*/] = None, /** If set to synchronize, the action will run only if the pull request commits changed. Otherwise, it will run each * time the rule matches. Default: synchronize @@ -186,18 +92,12 @@ object Action { /** Edit pull request attributes. */ case class Edit( - /** If the pull request should be a draft (true) or the other way around (false). - */ - draft: Boolean ) extends Action /** Dispatch an existing GitHub workflow in the repository. */ case class GitHubActions( - /** The workflow to act on. - */ - workflow: ToJson /*A GitHub Actions workflow action*/ ) extends Action @@ -210,139 +110,156 @@ object Action { /** The list of labels to remove. */ remove: Seq[String], + /** Remove all labels from the pull request. + */ + removeAll: Boolean, /** Toggle labels in the list based on the conditions. If all the conditions are a success, all the labels in the * list will be added, otherwise, they will all be removed. */ - toggle: Seq[String], - /** Remove all labels from the pull request. - */ - removeAll: Boolean + toggle: Seq[String] ) extends Action /** Automate the merging of your pull requests. */ case class Merge( + /** Allow merging the Mergify configuration file. This option does not do anything and is only present for backward + * compatibility. + Default: true + */ + allowMergingConfigurationChange: Option[Boolean] = None, /** Template to use as the commit message when using the merge or squash merge method. + Default: null */ - commitMessageTemplate: String = "", - /** Mergify can impersonate a GitHub user to merge pull requests. If no merge_bot_account is set, Mergify will merge - * the pull request itself. The user account must have already been logged in Mergify dashboard once and have write - * or maintain permission. + commitMessageTemplate: Option[ToJson /*template or null*/] = None, + /** Mergify can impersonate a GitHub user to merge pull requests. If no merge_bot_account is set, Mergify merges the + * pull request itself. The user account must have already been logged in Mergify dashboard once and have write or + * maintain permission. + Default: null */ - mergeBotAccount: String = "", - /** Merge method to use. If no value is set, Mergify will use the first authorized method available in the - * repository configuration. + mergeBotAccount: Option[ToJson /*template or null*/] = None, + /** Merge method to use. If no value is set, Mergify uses the first authorized method available in the repository + * configuration. + Default: null */ - method: String = "" + method: Option[ToJson /*merge, rebase, squash or fast-forward or null*/] = None ) extends Action /** Create a check-run on a pull request. */ case class PostCheck( + /** List of conditions to match to mark the pull request check as neutral, otherwise, it will be marked as + * failing. + Default: null + */ + neutralConditions: Option[ToJson /*List of conditions or null*/] = None, /** List of conditions to match to mark the pull request check as succeeded, otherwise, it will be marked as * failing. If unset, the conditions from the rule that triggers this action are used. + Default: null */ - successConditions: Seq[ToJson /*condition*/], - /** List of conditions to match to mark the pull request check as neutral, otherwise, it will be marked as failing. - */ - neutralConditions: Seq[ToJson /*condition*/], + successConditions: Option[ToJson /*List of conditions or null*/] = None, /** The summary of the check. + Default: "{{ check_conditions }}" */ - summary: String = "", + summary: Option[String] = None, /** The title of the check. + Default: "'{{ check_rule_name }}'{% if check_status == 'success' %} succeeded{% elif + * check_status == 'failure' %} failed{% endif %}" */ - title: String = "" + title: Option[String] = None ) extends Action /** Put your pull request into the merge queue. */ case class Queue( - /** This option is relevant only if you do inplace checks and if you use the rebase option of the update_method. It + /** Allow merging the Mergify configuration file. This option does not do anything and is only present for backward + * compatibility. + Default: true + */ + allowMergingConfigurationChange: Option[Boolean] = None, + /** This option is relevant only if you do in place checks and if you use the rebase option of the update_method. It * will automatically squash your commits beginning by squash!, fixup! or amend!, just like the option with the * same name when doing a git rebase. Default: true */ autosquash: Option[Boolean] = None, - /** Template to use as the commit message when using the merge or squash merge method. This option has been moved - * under the queue rules section of the configuration and will be removed from this section in the future. + /** Template to use as the commit message when using the merge or squash merge method. + Default: null */ - commitMessageTemplate: String = "", - /** Mergify can impersonate a GitHub user to merge pull requests. If no merge_bot_account is set, Mergify will merge - * the pull request itself. The user account must have already been logged in Mergify dashboard once and have write - * or maintain permission. This option overrides the value defined in the queue rules section of the configuration. + commitMessageTemplate: Option[ToJson /*template or null*/] = None, + /** Mergify can impersonate a GitHub user to merge pull requests. If no merge_bot_account is set, Mergify merges the + * pull request itself. The user account must have already been logged in Mergify dashboard once and have write or + * maintain permission. + Default: null */ - mergeBotAccount: String = "", - /** Merge method to use. If no value is set, Mergify will use the first authorized method available in the - * repository configuration. fast-forward is not supported on queues with speculative_checks > 1, batch_size > 1, - * or with allow_inplace_checks set to false. This option overrides the value defined in the queue rules section of - * the configuration. + mergeBotAccount: Option[ToJson /*template or null*/] = None, + /** Merge method to use. If no value is set, Mergify uses the first authorized method available in the repository + * configuration. fast-forward is not supported on queues with speculative_checks > 1, batch_size > 1, or with + * allow_inplace_checksset tofalse`. + Default: null */ - mergeMethod: String = "", + mergeMethod: Option[ToJson /*merge, rebase, squash or fast-forward or null*/] = None, /** The name of the queue where the pull request should be added. If no name is set, queue_conditions will be * applied instead. + Default: null */ - name: String = "", - /** To set your priorities, you should now use priority_rules. This sets the priority of the pull request in the - * queue. The pull request with the highest priority is merged first. low, medium, high are aliases for 1000, 2000, - * 3000. - Default: medium - */ - priority: Option[ToJson /*priority: low, medium, high or a value between 1 and 10000*/] = None, + name: Option[ToJson /*string or null*/] = None, /** For certain actions, such as rebasing branches, Mergify has to impersonate a GitHub user. You can specify the * account to use with this option. If no update_bot_account is set, Mergify picks randomly one of the organization * users instead. The user account must have already been logged in Mergify dashboard once. This option overrides * the value defined in the queue rules section of the configuration. + Default: null */ - updateBotAccount: String = "", - /** Method to use to update the pull request with its base branch when the speculative check is done in-place. + updateBotAccount: Option[ToJson /*template or null*/] = None, + /** Method to use to update the pull request with its base branch when the speculative check is done in place. * Possible values: merge to merge the base branch into the pull request. rebase to rebase the pull request against * its base branch. This option overrides the value defined in the queue rules section of the configuration. The * default is rebase when the merge_method is fast-forward. - Default: merge + Default: null */ - updateMethod: Option[ToJson /*merge or rebase*/] = None + updateMethod: Option[ToJson /*rebase or merge or null*/] = None ) extends Action /** Rebase the pull request on top of its base branch. */ case class Rebase( - /** When set to True, commits starting with fixup!, squash! and amend!are squashed during the rebase. + /** When set to true, commits starting with fixup!, squash! and amend! are squashed during the rebase. Default: true */ autosquash: Option[Boolean] = None, /** To rebase, Mergify needs to impersonate a GitHub user. You can specify the account to use with this option. If * no bot_account is set, Mergify picks the pull request author. The user account must have already been logged in * Mergify dashboard once. + Default: null */ - botAccount: String = "" + botAccount: Option[ToJson /*template or null*/] = None ) extends Action /** Request reviews from specific users or teams. */ case class RequestReviews( - /** The username to request reviews from. - */ - users: Seq[ToJson /*string or list of object*/], - /** The team names to get the list of users to request reviews from. - */ - usersFromTeams: Seq[ToJson /*string or list of object*/], - /** The team name to request reviews from. - */ - teams: Seq[ToJson /*string or list of object*/], /** Mergify can impersonate a GitHub user to request a review on a pull request. If no bot_account is set, Mergify * will request the review itself. */ - botAccount: String = "", + botAccount: ToJson /*template or null*/, /** Pick random users and teams from the provided lists. When random_count is specified, users and teams can be a - * dictionary where the key is the login and the value is the weight to use. Weight must be between 1 and 65535 + * dictionary where the key is the login and the value is the weight to use. Weight must be between 1 and 15 * included. */ - randomCount: ToJson /*number*/ + randomCount: ToJson /*integer or null*/, + /** The team names to request reviews from. + */ + teams: Seq[ToJson /*string or object*/], + /** The usernames to request reviews from. + */ + users: Seq[ToJson /*string or object*/], + /** The team names to get the list of users to request reviews from. + */ + usersFromTeams: Seq[ToJson /*string or object*/] ) extends Action @@ -351,12 +268,14 @@ object Action { case class Review( /** Mergify can impersonate a GitHub user to review a pull request. If no bot_account is set, Mergify will review * the pull request itself. + Default: null */ - botAccount: String = "", - /** The message to write as a comment. + botAccount: Option[ToJson /*template or null*/] = None, + /** The message to post in the review + Default: null */ - message: String = "", - /** The type of review. + message: Option[ToJson /*template or null*/] = None, + /** The type of review to post Default: APPROVE */ `type`: Option[ToJson /*APPROVE, REQUEST_CHANGES or COMMENT*/] = None @@ -366,20 +285,21 @@ object Action { /** Update the pull request branch with its base branch. */ case class Update( - /** Mergify can impersonate a GitHub user to review a pull request. If no bot_account is set, Mergify will update + /** Mergify can impersonate a GitHub user to update a pull request. If no bot_account is set, Mergify will update * the pull request itself. */ - botAccount: String = "" + botAccount: ToJson /*template or null*/ ) extends Action /** Squash commits in the pull request. */ case class Squash( - /** Mergify can impersonate a GitHub user to review a pull request. If no bot_account is set, Mergify will squash - * the pull request itself. + /** Mergify can impersonate a GitHub user to squash a pull request. If no bot_account is set, Mergify will squash + * the pull request itself + Default: null */ - botAccount: String = "", + botAccount: Option[ToJson /*template or null*/] = None, /** Defines what commit message to use for the squashed commit if no commit message is defined in the pull request * body. Possible values are: all-commits to use the same format as GitHub squashed merge commit. first-commit to * use the message of the first commit of the pull request. title+body means to use the title and body from the