Command to poll github for new commits

This commit is contained in:
Jimmy Cleuren 2013-11-18 22:49:18 +01:00
commit 4d3372af88
3 changed files with 146 additions and 0 deletions

View file

@ -40,6 +40,7 @@ class ProjectBase extends Model
'type' => null,
'token' => null,
'access_information' => null,
'last_commit' => null,
);
/**
@ -54,6 +55,7 @@ class ProjectBase extends Model
'type' => 'getType',
'token' => 'getToken',
'access_information' => 'getAccessInformation',
'last_commit' => 'getLastCommit',
// Foreign key getters:
);
@ -70,6 +72,7 @@ class ProjectBase extends Model
'type' => 'setType',
'token' => 'setToken',
'access_information' => 'setAccessInformation',
'last_commit' => 'setLastCommit',
// Foreign key setters:
);
@ -115,6 +118,12 @@ class ProjectBase extends Model
'nullable' => true,
'default' => null,
),
'last_commit' => array(
'type' => 'varchar',
'length' => 250,
'nullable' => true,
'default' => null,
),
);
/**
@ -215,6 +224,18 @@ class ProjectBase extends Model
return $rtn;
}
/**
* Get the value of LastCommit / last_commit.
*
* @return string
*/
public function getLastCommit()
{
$rtn = $this->data['last_commit'];
return $rtn;
}
/**
* Set the value of Id / id.
*
@ -349,6 +370,24 @@ class ProjectBase extends Model
$this->_setModified('access_information');
}
/**
* Set the value of LastCommit / last_commit.
*
* @param $value string
*/
public function setLastCommit($value)
{
$this->_validateString('LastCommit', $value);
if ($this->data['last_commit'] === $value) {
return;
}
$this->data['last_commit'] = $value;
$this->_setModified('last_commit');
}
/**
* Get Build models by ProjectId for this Project.
*