Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
monero-project
CCS Backend
Commits
cf1f9603
Commit
cf1f9603
authored
Dec 31, 2018
by
beardedwarrior
Browse files
included states in to pulling mrs and front matter
parent
ea25ce73
Changes
2
Hide whitespace changes
Inline
Side-by-side
app/Console/Commands/FetchMergeRequests.php
View file @
cf1f9603
...
...
@@ -42,12 +42,17 @@ class fetchMergeRequests extends Command
$projects
=
$connection
->
mergeRequests
(
'all'
);
foreach
(
$projects
as
$project
)
{
$state
=
'OPENED'
;
if
(
strpos
(
$project
->
title
,
'[IDEA]'
)
!==
false
)
{
$state
=
'IDEA'
;
}
$title
=
str_replace
(
'[IDEA]'
,
''
,
$project
->
title
);
// create requests that are still pending
$project
=
Project
::
firstOrNew
([
'merge_request_id'
=>
$project
->
id
,
],[
'title'
=>
$title
,
'state'
=>
$state
,
'title'
=>
trim
(
$title
),
'gitlab_state'
=>
$project
->
state
,
'gitlab_username'
=>
$project
->
author
->
username
,
'gitlab_url'
=>
$project
->
web_url
,
...
...
@@ -55,4 +60,10 @@ class fetchMergeRequests extends Command
$project
->
save
();
}
}
// fetch the idea
// check for merged merges.
// if proposal merged search for its md file
//issue payment_id and payment page
//
}
app/Console/Commands/ProcessProposals.php
View file @
cf1f9603
...
...
@@ -37,7 +37,6 @@ class ProcessProposals extends Command
*/
public
function
handle
()
{
$projects
=
Project
::
whereNull
(
'filename'
);
$details
=
[];
$files
=
Storage
::
files
(
'ffs-proposals'
);
foreach
(
$files
as
$file
)
{
...
...
@@ -45,9 +44,12 @@ class ProcessProposals extends Command
$detail
[
'name'
]
=
$file
;
$detail
[
'values'
]
=
$this
->
getAmountFromText
(
$file
);
$details
[]
=
$detail
[
'values'
][
'title'
];
$project
=
$p
roject
s
->
where
(
'title'
,
$detail
[
'values'
][
'title'
])
->
first
();
$project
=
P
roject
::
where
(
'title'
,
$detail
[
'values'
][
'title'
])
->
first
();
if
(
$project
)
{
$project
->
filename
=
$file
;
if
(
$project
->
state
===
'IDEA'
)
{
$project
->
state
=
'FUNDING-REQUIRED'
;
}
$project
->
target_amount
=
$detail
[
'values'
][
'amount'
];
$project
->
save
();
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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