All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.nafg.mergify.models.generated.Action.scala Maven / Gradle / Ivy

The newest version!
// GENERATED CODE: DO NOT EDIT THIS FILE MANUALLY.
// TO UPDATE, RUN `sbt generateModels`
// SEE `project/ScrapeActions.scala`

package io.github.nafg.mergify.models.generated

import io.github.nafg.mergify.ToJson


sealed trait Action
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.
      */
    message: Option[String] = None
  ) extends 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


  /** Comment a pull request.
    */
  case class Comment(
    /** 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 = "",
    /** The message to write as a comment.
      */
    message: String = ""
  ) extends Action


  /** Delete pull request head branch. Useful to clean pull requests once closed.
    */
  case class DeleteHeadBranch(
    /** If set to true, the branch will be deleted even if another pull request depends on the head branch. GitHub will
      * therefore close the dependent pull requests.
      */
    force: Boolean
  ) extends Action


  /** Dismiss previous reviews on a pull request.
    */
  case class DismissReviews(
    /** If set to true, all the approving reviews 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
      */
    approved: Option[ToJson /*boolean, from_requested_reviewers or list of GitHub login*/] = 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.
      */
    message: Option[String] = 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
      */
    when: Option[ToJson /*synchronize or always*/] = None
  ) extends 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


  /** Add, remove and toggle labels on a pull request.
    */
  case class Label(
    /** The list of labels to add.
      */
    add: Seq[String],
    /** The list of labels to remove.
      */
    remove: Seq[String],
    /** 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
  ) extends Action


  /** Automate the merging of your pull requests.
    */
  case class Merge(
    /** Template to use as the commit message when using the merge or squash merge method.
      */
    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.
      */
    mergeBotAccount: String = "",
    /** Merge method to use. If no value is set, Mergify will use the first authorized method available in the
      * repository configuration.
      */
    method: String = ""
  ) 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 succeeded, otherwise, it will be marked as
      * failing. If unset, the conditions from the rule that triggers this action are used.
      */
    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*/],
    /** The summary of the check.
      */
    summary: String = "",
    /** The title of the check.
      */
    title: String = ""
  ) 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
      * 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.
      */
    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.
      */
    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.
      */
    mergeMethod: String = "",
    /** The name of the queue where the pull request should be added. If no name is set, queue_conditions will be
      * applied instead.
      */
    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,
    /** 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.
      */
    updateBotAccount: String = "",
    /** 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
      */
    updateMethod: Option[ToJson /*merge or rebase*/] = 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.
  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.
      */
    botAccount: String = ""
  ) 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 = "",
    /** 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
      * included.
      */
    randomCount: ToJson /*number*/
  ) extends Action


  /** Automate reviews for your pull requests with customizable comments and review types.
    */
  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.
      */
    botAccount: String = "",
    /** The message to write as a comment.
      */
    message: String = "",
    /** The type of review.
  Default: APPROVE
      */
    `type`: Option[ToJson /*APPROVE, REQUEST_CHANGES or COMMENT*/] = None
  ) extends 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
      * the pull request itself.
      */
    botAccount: String = ""
  ) 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.
      */
    botAccount: String = "",
    /** 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
      * pull request itself as the commit message. The pull request number will be added to end of the title.
  Default:
      * all-commits
      */
    commitMessage: Option[ToJson /*all-commits, first-commit or title+body*/] = None
  ) extends Action}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy