PullRequest
in package
implements
ModelInterface, ArrayAccess, JsonSerializable
PullRequest Class Doc Comment
Tags
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
DISCRIMINATOR
public
mixed
DISCRIMINATOR
= null
KIND_DEPENDENCY
public
mixed
KIND_DEPENDENCY
= 'dependency'
KIND_REGULAR
public
mixed
KIND_REGULAR
= 'regular'
KIND_RELEASE
public
mixed
KIND_RELEASE
= 'release'
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
$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
stringattributeMap()
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>getAllowedActions()
Gets allowed_actions
public
getAllowedActions() : array<string|int, AllowedAction>
Return values
array<string|int, AllowedAction>getAuthor()
Gets author
public
getAuthor() : string
Return values
stringgetAutoMergeAllowed()
Gets auto_merge_allowed
public
getAutoMergeAllowed() : bool|null
Return values
bool|nullgetAutoMergeEnabled()
Gets auto_merge_enabled
public
getAutoMergeEnabled() : bool|null
Return values
bool|nullgetBaseBranch()
Gets base_branch
public
getBaseBranch() : string
Return values
stringgetBehind()
Gets behind
public
getBehind() : bool
Return values
boolgetBotRequest()
Gets bot_request
public
getBotRequest() : BotRequest|null
Return values
BotRequest|nullgetCi()
Gets ci
public
getCi() : CIStatus
Return values
CIStatusgetCreatedAt()
Gets created_at
public
getCreatedAt() : DateTime
Return values
DateTimegetCrossRepository()
Gets cross_repository
public
getCrossRepository() : bool
Return values
boolgetDraft()
Gets draft
public
getDraft() : bool
Return values
boolgetEmpty()
Gets empty
public
getEmpty() : bool
Return values
boolgetForge()
Gets forge
public
getForge() : Forge
Return values
ForgegetHeadBranch()
Gets head_branch
public
getHeadBranch() : string
Return values
stringgetHeadSha()
Gets head_sha
public
getHeadSha() : string
Return values
stringgetKind()
Gets kind
public
getKind() : string
Return values
stringgetKindAllowableValues()
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>getMergeStatus()
Gets merge_status
public
getMergeStatus() : MergeStatus
Return values
MergeStatusgetModelName()
The original name of the model.
public
getModelName() : string
Return values
stringgetNeedsReview()
Gets needs_review
public
getNeedsReview() : bool
Return values
boolgetNumber()
Gets number
public
getNumber() : int
Return values
intgetReadyToMerge()
Gets ready_to_merge
public
getReadyToMerge() : bool
Return values
boolgetRepo()
Gets repo
public
getRepo() : string
Return values
stringgetRequestedReviewerLogins()
Gets requested_reviewer_logins
public
getRequestedReviewerLogins() : array<string|int, string>
Return values
array<string|int, string>getReview()
Gets review
public
getReview() : ReviewState|null
Return values
ReviewState|nullgetReviewRequestedFromMe()
Gets review_requested_from_me
public
getReviewRequestedFromMe() : bool
Return values
boolgetStack()
Gets stack
public
getStack() : StackPosition|null
Return values
StackPosition|nullgetStackChildren()
Gets stack_children
public
getStackChildren() : array<string|int, int>
Return values
array<string|int, int>getStackedOn()
Gets stacked_on
public
getStackedOn() : StackRef|null
Return values
StackRef|nullgetters()
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
stringgetUpdatedAt()
Gets updated_at
public
getUpdatedAt() : DateTime
Return values
DateTimegetUpdateRequest()
Gets update_request
public
getUpdateRequest() : UpdateRequest|null
Return values
UpdateRequest|nullgetUrl()
Gets url
public
getUrl() : string
Return values
stringisNullable()
Checks if a property is nullable
public
static isNullable(string $property) : bool
Parameters
- $property : string
Return values
boolisNullableSetToNull()
Checks if a nullable property is set to null.
public
isNullableSetToNull(string $property) : bool
Parameters
- $property : string
Return values
booljsonSerialize()
Serializes the object to a value that can be serialized natively by json_encode().
public
jsonSerialize() : mixed
Tags
Attributes
- #[ReturnTypeWillChange]
Return values
mixed —Returns data which can be serialized by json_encode(), which is a value of any type other than a resource.
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
booloffsetGet()
Gets offset.
public
offsetGet(int|string $offset) : mixed|null
Parameters
- $offset : int|string
-
Offset
Attributes
- #[ReturnTypeWillChange]
Return values
mixed|nulloffsetSet()
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;
closeis 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
selfsetAuthor()
Sets author
public
setAuthor(string $author) : self
Parameters
- $author : string
-
author
Return values
selfsetAutoMergeAllowed()
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.viewerCanEnableAutoMergefield. 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
selfsetAutoMergeEnabled()
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
selfsetBaseBranch()
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
selfsetBehind()
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
selfsetBotRequest()
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
selfsetCi()
Sets ci
public
setCi(CIStatus $ci) : self
Parameters
- $ci : CIStatus
-
ci
Return values
selfsetCreatedAt()
Sets created_at
public
setCreatedAt(DateTime $created_at) : self
Parameters
- $created_at : DateTime
-
created_at
Return values
selfsetCrossRepository()
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
selfsetDraft()
Sets draft
public
setDraft(bool $draft) : self
Parameters
- $draft : bool
-
draft
Return values
selfsetEmpty()
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
selfsetForge()
Sets forge
public
setForge(Forge $forge) : self
Parameters
- $forge : Forge
-
forge
Return values
selfsetHeadBranch()
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
selfsetHeadSha()
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
selfsetKind()
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 itsautorelease: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
selfsetLabels()
Sets labels
public
setLabels(array<string|int, Label> $labels) : self
Parameters
- $labels : array<string|int, Label>
-
labels
Return values
selfsetMergeStatus()
Sets merge_status
public
setMergeStatus(MergeStatus $merge_status) : self
Parameters
- $merge_status : MergeStatus
-
merge_status
Return values
selfsetNeedsReview()
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
selfsetNumber()
Sets number
public
setNumber(int $number) : self
Parameters
- $number : int
-
number
Return values
selfsetReadyToMerge()
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
selfsetRepo()
Sets repo
public
setRepo(string $repo) : self
Parameters
- $repo : string
-
Owner-qualified repository name.
Return values
selfsetRequestedReviewerLogins()
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
selfsetReview()
Sets review
public
setReview(ReviewState|null $review) : self
Parameters
- $review : ReviewState|null
-
review
Return values
selfsetReviewRequestedFromMe()
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
selfsetStack()
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
selfsetStackChildren()
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
selfsetStackedOn()
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
selfsetters()
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
selfsetUpdatedAt()
Sets updated_at
public
setUpdatedAt(DateTime $updated_at) : self
Parameters
- $updated_at : DateTime
-
updated_at
Return values
selfsetUpdateRequest()
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
selfsetUrl()
Sets url
public
setUrl(string $url) : self
Parameters
- $url : string
-
The real pull request URL on its own forge.
Return values
selftoHeaderValue()
Gets a header-safe presentation of the object
public
toHeaderValue() : string
Return values
stringvalid()
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>