Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F93553332
PhabricatorReleephApplicationConfigOptions.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Fri, Nov 29, 16:42
Size
1 KB
Mime Type
text/x-php
Expires
Sun, Dec 1, 16:42 (2 d)
Engine
blob
Format
Raw Data
Handle
22662839
Attached To
rPH Phabricator
PhabricatorReleephApplicationConfigOptions.php
View Options
<?php
final
class
PhabricatorReleephApplicationConfigOptions
extends
PhabricatorApplicationConfigOptions
{
public
function
getName
()
{
return
pht
(
'Releeph'
);
}
public
function
getDescription
()
{
return
pht
(
'Options for configuring Releeph, the release branch tool.'
);
}
public
function
getFontIcon
()
{
return
'fa-flag-checkered'
;
}
public
function
getOptions
()
{
$default_fields
=
array
(
new
ReleephSummaryFieldSpecification
(),
new
ReleephRequestorFieldSpecification
(),
new
ReleephSeverityFieldSpecification
(),
new
ReleephIntentFieldSpecification
(),
new
ReleephReasonFieldSpecification
(),
new
ReleephAuthorFieldSpecification
(),
new
ReleephRevisionFieldSpecification
(),
new
ReleephOriginalCommitFieldSpecification
(),
new
ReleephBranchCommitFieldSpecification
(),
new
ReleephDiffSizeFieldSpecification
(),
new
ReleephDiffChurnFieldSpecification
(),
new
ReleephDiffMessageFieldSpecification
(),
new
ReleephCommitMessageFieldSpecification
(),
);
$default
=
array
();
foreach
(
$default_fields
as
$default_field
)
{
$default
[
$default_field
->
getFieldKey
()]
=
true
;
}
foreach
(
$default
as
$key
=>
$enabled
)
{
$default
[
$key
]
=
array
(
'disabled'
=>
!
$enabled
,
);
}
$custom_field_type
=
'custom:PhabricatorCustomFieldConfigOptionType'
;
return
array
(
$this
->
newOption
(
'releeph.fields'
,
$custom_field_type
,
$default
)
->
setCustomData
(
'ReleephFieldSpecification'
),
$this
->
newOption
(
'releeph.default-branch-template'
,
'string'
,
'releases/%P/%p-%Y%m%d-%v'
)
->
setDescription
(
pht
(
'The default branch template for new branches in unconfigured '
.
'Releeph projects. This is also configurable on a per-project '
.
'basis.'
)),
);
}
}
Event Timeline
Log In to Comment