forge-dashboard-sdk-php

PullRequest implements ModelInterface, ArrayAccess, JsonSerializable

PullRequest Class Doc Comment

Tags
category

Class

author

OpenAPI Generator team

link
https://openapi-generator.tech
implements

Table of Contents

Interfaces

ModelInterface
Interface abstracting model access.
ArrayAccess
JsonSerializable

Constants

DISCRIMINATOR  : mixed = null
KIND_DEPENDENCY  : mixed = 'dependency'
KIND_REGULAR  : mixed = 'regular'
KIND_RELEASE  : mixed = 'release'

Properties

$attributeMap  : array<string|int, string>
Array of attributes where the key is the local name, and the value is the original name
$container  : array<string|int, mixed>
Associative array for storing property values
$getters  : array<string|int, string>
Array of attributes to getter functions (for serialization of requests)
$openAPIFormats  : array<string|int, string>
Array of property to format mappings. Used for (de)serialization
$openAPIModelName  : string
The original name of the model.
$openAPINullables  : array<string|int, bool>
Array of nullable properties. Used for (de)serialization
$openAPINullablesSetToNull  : array<string|int, bool>
If a nullable field gets set to null, insert it here
$openAPITypes  : array<string|int, string>
Array of property to type mappings. Used for (de)serialization
$setters  : array<string|int, string>
Array of attributes to setter functions (for deserialization of responses)

Methods

__construct()  : mixed
Constructor
__toString()  : string
Gets the string presentation of the object
attributeMap()  : array<string|int, mixed>
Array of attributes where the key is the local name, and the value is the original name
getAllowedActions()  : array<string|int, AllowedAction>
Gets allowed_actions
getAuthor()  : string
Gets author
getAutoMergeAllowed()  : bool|null
Gets auto_merge_allowed
getAutoMergeEnabled()  : bool|null
Gets auto_merge_enabled
getBaseBranch()  : string
Gets base_branch
getBehind()  : bool
Gets behind
getBotRequest()  : BotRequest|null
Gets bot_request
getCi()  : CIStatus
Gets ci
getCreatedAt()  : DateTime
Gets created_at
getCrossRepository()  : bool
Gets cross_repository
getDraft()  : bool
Gets draft
getEmpty()  : bool
Gets empty
getForge()  : Forge
Gets forge
getHeadBranch()  : string
Gets head_branch
getHeadSha()  : string
Gets head_sha
getKind()  : string
Gets kind
getKindAllowableValues()  : array<string|int, string>
Gets allowable values of the enum
getLabels()  : array<string|int, Label>
Gets labels
getMergeStatus()  : MergeStatus
Gets merge_status
getModelName()  : string
The original name of the model.
getNeedsReview()  : bool
Gets needs_review
getNumber()  : int
Gets number
getReadyToMerge()  : bool
Gets ready_to_merge
getRepo()  : string
Gets repo
getRequestedReviewerLogins()  : array<string|int, string>
Gets requested_reviewer_logins
getReview()  : ReviewState|null
Gets review
getReviewRequestedFromMe()  : bool
Gets review_requested_from_me
getStack()  : StackPosition|null
Gets stack
getStackChildren()  : array<string|int, int>
Gets stack_children
getStackedOn()  : StackRef|null
Gets stacked_on
getters()  : array<string|int, mixed>
Array of attributes to getter functions (for serialization of requests)
getTitle()  : string
Gets title
getUpdatedAt()  : DateTime
Gets updated_at
getUpdateRequest()  : UpdateRequest|null
Gets update_request
getUrl()  : string
Gets url
isNullable()  : bool
Checks if a property is nullable
isNullableSetToNull()  : bool
Checks if a nullable property is set to null.
jsonSerialize()  : mixed
Serializes the object to a value that can be serialized natively by json_encode().
listInvalidProperties()  : array<string|int, mixed>
Show all the invalid properties with reasons.
offsetExists()  : bool
Returns true if offset exists. False otherwise.
offsetGet()  : mixed|null
Gets offset.
offsetSet()  : void
Sets value based on offset.
offsetUnset()  : void
Unsets offset.
openAPIFormats()  : array<string|int, mixed>
Array of property to format mappings. Used for (de)serialization
openAPITypes()  : array<string|int, mixed>
Array of property to type mappings. Used for (de)serialization
setAllowedActions()  : self
Sets allowed_actions
setAuthor()  : self
Sets author
setAutoMergeAllowed()  : self
Sets auto_merge_allowed
setAutoMergeEnabled()  : self
Sets auto_merge_enabled
setBaseBranch()  : self
Sets base_branch
setBehind()  : self
Sets behind
setBotRequest()  : self
Sets bot_request
setCi()  : self
Sets ci
setCreatedAt()  : self
Sets created_at
setCrossRepository()  : self
Sets cross_repository
setDraft()  : self
Sets draft
setEmpty()  : self
Sets empty
setForge()  : self
Sets forge
setHeadBranch()  : self
Sets head_branch
setHeadSha()  : self
Sets head_sha
setKind()  : self
Sets kind
setLabels()  : self
Sets labels
setMergeStatus()  : self
Sets merge_status
setNeedsReview()  : self
Sets needs_review
setNumber()  : self
Sets number
setReadyToMerge()  : self
Sets ready_to_merge
setRepo()  : self
Sets repo
setRequestedReviewerLogins()  : self
Sets requested_reviewer_logins
setReview()  : self
Sets review
setReviewRequestedFromMe()  : self
Sets review_requested_from_me
setStack()  : self
Sets stack
setStackChildren()  : self
Sets stack_children
setStackedOn()  : self
Sets stacked_on
setters()  : array<string|int, mixed>
Array of attributes to setter functions (for deserialization of responses)
setTitle()  : self
Sets title
setUpdatedAt()  : self
Sets updated_at
setUpdateRequest()  : self
Sets update_request
setUrl()  : self
Sets url
toHeaderValue()  : string
Gets a header-safe presentation of the object
valid()  : bool
Validate all the properties in the model return true if all passed
openAPINullables()  : array<string|int, mixed>
Array of nullable properties
getOpenAPINullablesSetToNull()  : array<string|int, bool>
Array of nullable field names deliberately set to null
setIfExists()  : void
Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the $this->openAPINullablesSetToNull array
setOpenAPINullablesSetToNull()  : void
Setter - Array of nullable field names deliberately set to null

Constants

KIND_DEPENDENCY

public mixed KIND_DEPENDENCY = 'dependency'

Properties

$attributeMap

Array of attributes where the key is the local name, and the value is the original name

protected static array<string|int, string> $attributeMap = ['forge' => 'forge', 'repo' => 'repo', 'number' => 'number', 'title' => 'title', 'url' => 'url', 'author' => 'author', 'draft' => 'draft', 'labels' => 'labels', 'created_at' => 'createdAt', 'updated_at' => 'updatedAt', 'ci' => 'ci', 'merge_status' => 'mergeStatus', 'behind' => 'behind', 'head_sha' => 'headSha', 'kind' => 'kind', 'base_branch' => 'baseBranch', 'head_branch' => 'headBranch', 'cross_repository' => 'crossRepository', 'stack' => 'stack', 'stacked_on' => 'stackedOn', 'stack_children' => 'stackChildren', 'bot_request' => 'botRequest', 'update_request' => 'updateRequest', 'requested_reviewer_logins' => 'requestedReviewerLogins', 'review_requested_from_me' => 'reviewRequestedFromMe', 'empty' => 'empty', 'auto_merge_enabled' => 'autoMergeEnabled', 'auto_merge_allowed' => 'autoMergeAllowed', 'review' => 'review', 'allowed_actions' => 'allowedActions', 'ready_to_merge' => 'readyToMerge', 'needs_review' => 'needsReview']

$container

Associative array for storing property values

protected array<string|int, mixed> $container = []

$getters

Array of attributes to getter functions (for serialization of requests)

protected static array<string|int, string> $getters = ['forge' => 'getForge', 'repo' => 'getRepo', 'number' => 'getNumber', 'title' => 'getTitle', 'url' => 'getUrl', 'author' => 'getAuthor', 'draft' => 'getDraft', 'labels' => 'getLabels', 'created_at' => 'getCreatedAt', 'updated_at' => 'getUpdatedAt', 'ci' => 'getCi', 'merge_status' => 'getMergeStatus', 'behind' => 'getBehind', 'head_sha' => 'getHeadSha', 'kind' => 'getKind', 'base_branch' => 'getBaseBranch', 'head_branch' => 'getHeadBranch', 'cross_repository' => 'getCrossRepository', 'stack' => 'getStack', 'stacked_on' => 'getStackedOn', 'stack_children' => 'getStackChildren', 'bot_request' => 'getBotRequest', 'update_request' => 'getUpdateRequest', 'requested_reviewer_logins' => 'getRequestedReviewerLogins', 'review_requested_from_me' => 'getReviewRequestedFromMe', 'empty' => 'getEmpty', 'auto_merge_enabled' => 'getAutoMergeEnabled', 'auto_merge_allowed' => 'getAutoMergeAllowed', 'review' => 'getReview', 'allowed_actions' => 'getAllowedActions', 'ready_to_merge' => 'getReadyToMerge', 'needs_review' => 'getNeedsReview']

$openAPIFormats

Array of property to format mappings. Used for (de)serialization

protected static array<string|int, string> $openAPIFormats = ['forge' => null, 'repo' => null, 'number' => null, 'title' => null, 'url' => 'uri', 'author' => null, 'draft' => null, 'labels' => null, 'created_at' => 'date-time', 'updated_at' => 'date-time', 'ci' => null, 'merge_status' => null, 'behind' => null, 'head_sha' => null, 'kind' => null, 'base_branch' => null, 'head_branch' => null, 'cross_repository' => null, 'stack' => null, 'stacked_on' => null, 'stack_children' => null, 'bot_request' => null, 'update_request' => null, 'requested_reviewer_logins' => null, 'review_requested_from_me' => null, 'empty' => null, 'auto_merge_enabled' => null, 'auto_merge_allowed' => null, 'review' => null, 'allowed_actions' => null, 'ready_to_merge' => null, 'needs_review' => null]
Tags
phpstan-var

array<string, string|null>

psalm-var

array<string, string|null>

$openAPIModelName

The original name of the model.

protected static string $openAPIModelName = 'PullRequest'

$openAPINullables

Array of nullable properties. Used for (de)serialization

protected static array<string|int, bool> $openAPINullables = ['forge' => false, 'repo' => false, 'number' => false, 'title' => false, 'url' => false, 'author' => false, 'draft' => false, 'labels' => false, 'created_at' => false, 'updated_at' => false, 'ci' => false, 'merge_status' => false, 'behind' => false, 'head_sha' => false, 'kind' => false, 'base_branch' => false, 'head_branch' => false, 'cross_repository' => false, 'stack' => true, 'stacked_on' => true, 'stack_children' => false, 'bot_request' => true, 'update_request' => true, 'requested_reviewer_logins' => false, 'review_requested_from_me' => false, 'empty' => false, 'auto_merge_enabled' => false, 'auto_merge_allowed' => false, 'review' => false, 'allowed_actions' => false, 'ready_to_merge' => false, 'needs_review' => false]

$openAPINullablesSetToNull

If a nullable field gets set to null, insert it here

protected array<string|int, bool> $openAPINullablesSetToNull = []

$openAPITypes

Array of property to type mappings. Used for (de)serialization

protected static array<string|int, string> $openAPITypes = ['forge' => '\ForgeDashboard\Generated\Model\Forge', 'repo' => 'string', 'number' => 'int', 'title' => 'string', 'url' => 'string', 'author' => 'string', 'draft' => 'bool', 'labels' => '\ForgeDashboard\Generated\Model\Label[]', 'created_at' => '\DateTime', 'updated_at' => '\DateTime', 'ci' => '\ForgeDashboard\Generated\Model\CIStatus', 'merge_status' => '\ForgeDashboard\Generated\Model\MergeStatus', 'behind' => 'bool', 'head_sha' => 'string', 'kind' => 'string', 'base_branch' => 'string', 'head_branch' => 'string', 'cross_repository' => 'bool', 'stack' => '\ForgeDashboard\Generated\Model\StackPosition', 'stacked_on' => '\ForgeDashboard\Generated\Model\StackRef', 'stack_children' => 'int[]', 'bot_request' => '\ForgeDashboard\Generated\Model\BotRequest', 'update_request' => '\ForgeDashboard\Generated\Model\UpdateRequest', 'requested_reviewer_logins' => 'string[]', 'review_requested_from_me' => 'bool', 'empty' => 'bool', 'auto_merge_enabled' => 'bool', 'auto_merge_allowed' => 'bool', 'review' => '\ForgeDashboard\Generated\Model\ReviewState', 'allowed_actions' => '\ForgeDashboard\Generated\Model\AllowedAction[]', 'ready_to_merge' => 'bool', 'needs_review' => 'bool']

$setters

Array of attributes to setter functions (for deserialization of responses)

protected static array<string|int, string> $setters = ['forge' => 'setForge', 'repo' => 'setRepo', 'number' => 'setNumber', 'title' => 'setTitle', 'url' => 'setUrl', 'author' => 'setAuthor', 'draft' => 'setDraft', 'labels' => 'setLabels', 'created_at' => 'setCreatedAt', 'updated_at' => 'setUpdatedAt', 'ci' => 'setCi', 'merge_status' => 'setMergeStatus', 'behind' => 'setBehind', 'head_sha' => 'setHeadSha', 'kind' => 'setKind', 'base_branch' => 'setBaseBranch', 'head_branch' => 'setHeadBranch', 'cross_repository' => 'setCrossRepository', 'stack' => 'setStack', 'stacked_on' => 'setStackedOn', 'stack_children' => 'setStackChildren', 'bot_request' => 'setBotRequest', 'update_request' => 'setUpdateRequest', 'requested_reviewer_logins' => 'setRequestedReviewerLogins', 'review_requested_from_me' => 'setReviewRequestedFromMe', 'empty' => 'setEmpty', 'auto_merge_enabled' => 'setAutoMergeEnabled', 'auto_merge_allowed' => 'setAutoMergeAllowed', 'review' => 'setReview', 'allowed_actions' => 'setAllowedActions', 'ready_to_merge' => 'setReadyToMerge', 'needs_review' => 'setNeedsReview']

Methods

__construct()

Constructor

public __construct([array<string|int, mixed>|null $data = null ]) : mixed
Parameters
$data : array<string|int, mixed>|null = null

Associated array of property values initializing the model

__toString()

Gets the string presentation of the object

public __toString() : string
Return values
string

attributeMap()

Array of attributes where the key is the local name, and the value is the original name

public static attributeMap() : array<string|int, mixed>
Return values
array<string|int, mixed>

getAuthor()

Gets author

public getAuthor() : string
Return values
string

getAutoMergeAllowed()

Gets auto_merge_allowed

public getAutoMergeAllowed() : bool|null
Return values
bool|null

getAutoMergeEnabled()

Gets auto_merge_enabled

public getAutoMergeEnabled() : bool|null
Return values
bool|null

getBaseBranch()

Gets base_branch

public getBaseBranch() : string
Return values
string

getBehind()

Gets behind

public getBehind() : bool
Return values
bool

getCreatedAt()

Gets created_at

public getCreatedAt() : DateTime
Return values
DateTime

getCrossRepository()

Gets cross_repository

public getCrossRepository() : bool
Return values
bool

getDraft()

Gets draft

public getDraft() : bool
Return values
bool

getEmpty()

Gets empty

public getEmpty() : bool
Return values
bool

getHeadBranch()

Gets head_branch

public getHeadBranch() : string
Return values
string

getHeadSha()

Gets head_sha

public getHeadSha() : string
Return values
string

getKind()

Gets kind

public getKind() : string
Return values
string

getKindAllowableValues()

Gets allowable values of the enum

public getKindAllowableValues() : array<string|int, string>
Return values
array<string|int, string>

getLabels()

Gets labels

public getLabels() : array<string|int, Label>
Return values
array<string|int, Label>

getModelName()

The original name of the model.

public getModelName() : string
Return values
string

getNeedsReview()

Gets needs_review

public getNeedsReview() : bool
Return values
bool

getNumber()

Gets number

public getNumber() : int
Return values
int

getReadyToMerge()

Gets ready_to_merge

public getReadyToMerge() : bool
Return values
bool

getRepo()

Gets repo

public getRepo() : string
Return values
string

getRequestedReviewerLogins()

Gets requested_reviewer_logins

public getRequestedReviewerLogins() : array<string|int, string>
Return values
array<string|int, string>

getReviewRequestedFromMe()

Gets review_requested_from_me

public getReviewRequestedFromMe() : bool
Return values
bool

getStackChildren()

Gets stack_children

public getStackChildren() : array<string|int, int>
Return values
array<string|int, int>

getters()

Array of attributes to getter functions (for serialization of requests)

public static getters() : array<string|int, mixed>
Return values
array<string|int, mixed>

getTitle()

Gets title

public getTitle() : string
Return values
string

getUpdatedAt()

Gets updated_at

public getUpdatedAt() : DateTime
Return values
DateTime

getUrl()

Gets url

public getUrl() : string
Return values
string

isNullable()

Checks if a property is nullable

public static isNullable(string $property) : bool
Parameters
$property : string
Return values
bool

isNullableSetToNull()

Checks if a nullable property is set to null.

public isNullableSetToNull(string $property) : bool
Parameters
$property : string
Return values
bool

listInvalidProperties()

Show all the invalid properties with reasons.

public listInvalidProperties() : array<string|int, mixed>
Return values
array<string|int, mixed> —

invalid properties with reasons

offsetExists()

Returns true if offset exists. False otherwise.

public offsetExists(int|string $offset) : bool
Parameters
$offset : int|string

Offset

Return values
bool

offsetGet()

Gets offset.

public offsetGet(int|string $offset) : mixed|null
Parameters
$offset : int|string

Offset

Attributes
#[ReturnTypeWillChange]
Return values
mixed|null

offsetSet()

Sets value based on offset.

public offsetSet(int|null $offset, mixed $value) : void
Parameters
$offset : int|null

Offset

$value : mixed

Value to be set

offsetUnset()

Unsets offset.

public offsetUnset(int|string $offset) : void
Parameters
$offset : int|string

Offset

openAPIFormats()

Array of property to format mappings. Used for (de)serialization

public static openAPIFormats() : array<string|int, mixed>
Return values
array<string|int, mixed>

openAPITypes()

Array of property to type mappings. Used for (de)serialization

public static openAPITypes() : array<string|int, mixed>
Return values
array<string|int, mixed>

setAllowedActions()

Sets allowed_actions

public setAllowedActions(array<string|int, AllowedAction> $allowed_actions) : self
Parameters
$allowed_actions : array<string|int, AllowedAction>

The actions this pull request offers, worked out on the server from its own fields, so a client needs no copy of the rules. An action that doesn't apply (Update branch on a pull request that isn't behind, a Dependabot command on a Renovate pull request) is absent, not listed as blocked. Always present; close is always in it. Live state is the client's: a rate-limited or unreachable forge, a missing token and an action already in flight can still stop an offered action.

Return values
self

setAuthor()

Sets author

public setAuthor(string $author) : self
Parameters
$author : string

author

Return values
self

setAutoMergeAllowed()

Sets auto_merge_allowed

public setAutoMergeAllowed(bool|null $auto_merge_allowed) : self
Parameters
$auto_merge_allowed : bool|null

Whether GitHub will accept an "Enable auto-merge" request for this pull request from the signed-in viewer, read from the GraphQL PullRequest.viewerCanEnableAutoMerge field. GitHub decides this per viewer and per pull request: auto-merge needs something on the base branch to wait for (required checks or reviews from a branch protection rule or ruleset), so a stacked pull request on an unprotected base reports false even when the repository allows auto-merge. Omitted when unknown (the unauthenticated REST fallback, and Forgejo), never false in that case, so clients keep today's behaviour.

Return values
self

setAutoMergeEnabled()

Sets auto_merge_enabled

public setAutoMergeEnabled(bool|null $auto_merge_enabled) : self
Parameters
$auto_merge_enabled : bool|null

Whether auto-merge is currently scheduled on this pull request. Omitted when the owning forge has no way to report this at all (Forgejo, today) — never false in that case, since this service genuinely doesn't know.

Return values
self

setBaseBranch()

Sets base_branch

public setBaseBranch(string $base_branch) : self
Parameters
$base_branch : string

The branch the pull request targets. Empty when the forge didn't say.

Return values
self

setBehind()

Sets behind

public setBehind(bool $behind) : self
Parameters
$behind : bool

Whether this pull request's base branch has moved since its merge-base was computed. Deliberately its own field rather than a mergeStatus value: on Forgejo a pull request can be both mergeable and behind at once (its mergeable flag doesn't get recomputed just because the base moved), so folding this into mergeStatus would force picking one and losing the other.

Return values
self

setBotRequest()

Sets bot_request

public setBotRequest(BotRequest|null $bot_request) : self
Parameters
$bot_request : BotRequest|null

A Dependabot or Renovate rebase asked for through this app and not settled yet, or null. The server keeps it, so a reload during the wait still shows it, and moves it along on every snapshot that came from a fetch started after the request. Held in memory per account: a server restart forgets it.

Return values
self

setCreatedAt()

Sets created_at

public setCreatedAt(DateTime $created_at) : self
Parameters
$created_at : DateTime

created_at

Return values
self

setCrossRepository()

Sets cross_repository

public setCrossRepository(bool $cross_repository) : self
Parameters
$cross_repository : bool

True when the head branch lives in another repository (a fork). A fork pull request is never part of a stack.

Return values
self

setDraft()

Sets draft

public setDraft(bool $draft) : self
Parameters
$draft : bool

draft

Return values
self

setEmpty()

Sets empty

public setEmpty(bool $empty) : self
Parameters
$empty : bool

Whether merging this pull request would produce an empty commit — its content already landed on the base branch some other way. False whenever this service can't tell (the unauthenticated GitHub REST fallback, or a Forgejo instance old enough not to report additions/deletions/changed_files on its list endpoint), never a false positive: a pull request this never confirms empty just renders as it always has.

Return values
self

setForge()

Sets forge

public setForge(Forge $forge) : self
Parameters
$forge : Forge

forge

Return values
self

setHeadBranch()

Sets head_branch

public setHeadBranch(string $head_branch) : self
Parameters
$head_branch : string

The branch the pull request comes from. Empty when the forge didn't say.

Return values
self

setHeadSha()

Sets head_sha

public setHeadSha(string $head_sha) : self
Parameters
$head_sha : string

The commit the pull request's head branch points at. A bot's rebase moves it, which shows the bot acted even when the pull request is still reported behind, or wasn't behind to begin with. Empty when the forge didn't say. Always present.

Return values
self

setKind()

Sets kind

public setKind(string $kind) : self
Parameters
$kind : string

What sort of pull request this is, decided by the server so no client keeps its own copy of the rule. release: release-please's, by its autorelease: label (a person opens these, so the label is the only signal, and it wins over any bot author). dependency: opened by Dependabot or Renovate, in either spelling of the login (the bare slug GraphQL gives, or REST's [bot] form), on either forge. regular: everything else. Always present.

Return values
self

setLabels()

Sets labels

public setLabels(array<string|int, Label> $labels) : self
Parameters
$labels : array<string|int, Label>

labels

Return values
self

setMergeStatus()

Sets merge_status

public setMergeStatus(MergeStatus $merge_status) : self
Parameters
$merge_status : MergeStatus

merge_status

Return values
self

setNeedsReview()

Sets needs_review

public setNeedsReview(bool $needs_review) : self
Parameters
$needs_review : bool

True when a review is outstanding: the forge requires one, or a reviewer was asked and hasn't answered, and the pull request isn't a draft. Unreviewed with nobody asked, approved, changes requested and an unknown review state are all false. Always present.

Return values
self

setNumber()

Sets number

public setNumber(int $number) : self
Parameters
$number : int

number

Return values
self

setReadyToMerge()

Sets ready_to_merge

public setReadyToMerge(bool $ready_to_merge) : self
Parameters
$ready_to_merge : bool

True when the pull request is mergeable, its CI is green and it isn't a draft: what the Ready quick filter lists. Always present. A pull request with no checks isn't ready.

Return values
self

setRepo()

Sets repo

public setRepo(string $repo) : self
Parameters
$repo : string

Owner-qualified repository name.

Return values
self

setRequestedReviewerLogins()

Sets requested_reviewer_logins

public setRequestedReviewerLogins(array<string|int, string> $requested_reviewer_logins) : self
Parameters
$requested_reviewer_logins : array<string|int, string>

The logins of the users asked to review this pull request, on both forges. A team request has no login and is left out. Always present, and empty when nobody was asked. Costs no extra request: GitHub returns it with the reviewRequests count already queried, Forgejo with the pull request itself.

Return values
self

setReviewRequestedFromMe()

Sets review_requested_from_me

public setReviewRequestedFromMe(bool $review_requested_from_me) : self
Parameters
$review_requested_from_me : bool

True when this open, non-draft pull request asks the signed-in user to review it, matched without regard to case against the username saved in Settings for its forge. False when no username is saved for that forge. Always present.

Return values
self

setStack()

Sets stack

public setStack(StackPosition|null $stack) : self
Parameters
$stack : StackPosition|null

Where this pull request sits in a stack of pull requests, or null when it is in none. A stack is worked out on the server: pull request B is stacked on A when B's base branch is A's head branch, in the same repository on the same forge, and neither is a fork. A branch with several open pull requests takes the one with the lowest number as parent, and a loop of branches is treated as no stack. The snapshot holds open pull requests only, so a base branch that no open pull request owns (a parent that already merged and was not retargeted) is not flagged.

Return values
self

setStackChildren()

Sets stack_children

public setStackChildren(array<string|int, int> $stack_children) : self
Parameters
$stack_children : array<string|int, int>

The numbers of the open pull requests stacked directly on this one. Always a list, empty when none.

Return values
self

setStackedOn()

Sets stacked_on

public setStackedOn(StackRef|null $stacked_on) : self
Parameters
$stacked_on : StackRef|null

The open pull request this one is stacked on, or null when its base is not another open pull request's head.

Return values
self

setters()

Array of attributes to setter functions (for deserialization of responses)

public static setters() : array<string|int, mixed>
Return values
array<string|int, mixed>

setTitle()

Sets title

public setTitle(string $title) : self
Parameters
$title : string

title

Return values
self

setUpdatedAt()

Sets updated_at

public setUpdatedAt(DateTime $updated_at) : self
Parameters
$updated_at : DateTime

updated_at

Return values
self

setUpdateRequest()

Sets update_request

public setUpdateRequest(UpdateRequest|null $update_request) : self
Parameters
$update_request : UpdateRequest|null

An Update branch the forge accepted and that no snapshot has shown landing yet, or null. The server keeps it, so a reload during the wait still shows it. It is dropped once a snapshot from a fetch started after the request shows the pull request no longer behind, or when the pull request is gone. Held in memory per account: a server restart forgets it.

Return values
self

setUrl()

Sets url

public setUrl(string $url) : self
Parameters
$url : string

The real pull request URL on its own forge.

Return values
self

toHeaderValue()

Gets a header-safe presentation of the object

public toHeaderValue() : string
Return values
string

valid()

Validate all the properties in the model return true if all passed

public valid() : bool
Return values
bool —

True if all properties are valid

openAPINullables()

Array of nullable properties

protected static openAPINullables() : array<string|int, mixed>
Return values
array<string|int, mixed>

getOpenAPINullablesSetToNull()

Array of nullable field names deliberately set to null

private getOpenAPINullablesSetToNull() : array<string|int, bool>
Return values
array<string|int, bool>

setIfExists()

Sets $this->container[$variableName] to the given data or to the given default Value; if $variableName is nullable and its value is set to null in the $fields array, then mark it as "set to null" in the $this->openAPINullablesSetToNull array

private setIfExists(string $variableName, array<string|int, mixed> $fields, mixed $defaultValue) : void
Parameters
$variableName : string
$fields : array<string|int, mixed>
$defaultValue : mixed

setOpenAPINullablesSetToNull()

Setter - Array of nullable field names deliberately set to null

private setOpenAPINullablesSetToNull(array<string|int, bool> $openAPINullablesSetToNull) : void
Parameters
$openAPINullablesSetToNull : array<string|int, bool>
On this page

Search results