Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
C
CCS Backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xiphon
CCS Backend
Commits
05b78da9
Commit
05b78da9
authored
May 21, 2019
by
xiphon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
proposals: hide fr/wip/cp proposals if .md file doesn't exist
parent
f7edbff4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
app/Console/Commands/UpdateSiteProposals.php
app/Console/Commands/UpdateSiteProposals.php
+9
-2
No files found.
app/Console/Commands/UpdateSiteProposals.php
View file @
05b78da9
...
...
@@ -63,6 +63,11 @@ class UpdateSiteProposals extends Command
return
$responseProposals
;
}
private
function
proposalFileExists
(
$filename
)
{
return
\
Storage
::
exists
(
'proposals/'
.
basename
(
$filename
));
}
private
function
ideaProposals
()
{
$group
=
new
stdClass
();
...
...
@@ -92,7 +97,7 @@ class UpdateSiteProposals extends Command
continue
;
}
$project
=
Project
::
where
(
'filename'
,
$filename
)
->
first
();
if
(
$project
)
{
if
(
$project
&&
$this
->
proposalFileExists
(
$filename
)
)
{
$this
->
error
(
"Skipping MR #
$mergeRequest->id
'
$mergeRequest->title
': already have a project
$filename
"
);
continue
;
}
...
...
@@ -137,7 +142,9 @@ class UpdateSiteProposals extends Command
$responseProposals
=
[];
$proposals
=
Project
::
where
(
'state'
,
$state
)
->
get
();
foreach
(
$proposals
as
$proposal
)
{
$responseProposals
[]
=
$this
->
formatProposal
(
$proposal
);
if
(
$this
->
proposalFileExists
(
$proposal
->
filename
))
{
$responseProposals
[]
=
$this
->
formatProposal
(
$proposal
);
}
}
$group
->
proposals
=
$this
->
sortProposalsByDateDesc
(
$responseProposals
);
return
$group
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment