fix description

This commit is contained in:
James 2019-09-05 17:37:06 +01:00
parent 32c31161ae
commit 918bc83d71
3 changed files with 23 additions and 9 deletions

View File

@ -1,5 +1,9 @@
#!/usr/bin/php
<?php
/******************
* close ALL issues
******************/
// load the config, create the connection and load the repo sepcified on the cmd line args
// we will then have $client and $repo available
require('setup.php');

View File

@ -1,14 +1,14 @@
#!/usr/bin/php
<?php
/*****
** 1a. Adds a no-milestone label to any issues with no milestone
** 1b. Also removes the label if present on an issue with a milestone
** 2a. Adds a no-label label to any issues with no labels (excluding the no-label and no-milestone)
** 2b. Also removes the label if present on an issue with a label (excluding the no-label and no-milestone)
******/
/***************************************************************************************************************
* 1. Adds a 'no-milestone' label to any issues with no milestone
* 2. Removes the 'no-milestone' label if present on an issue with a milestone
* 3. Adds a 'no-label' label to any issues with no labels (excluding 'no-label' and 'no-milestone')
* 4. Removes the 'no-label' label if present on an issue with a label (excluding 'no-label' and 'no-milestone')
****************************************************************************************************************/
// load the config, create the connection and load the repo sepcified on the cmd line args
// we will then have $client and $repo available
// we will then have $client and $repo available
require('setup.php');
//get the labels of interest
@ -37,5 +37,5 @@ $callback=function($issue) use ($nolabelLabel,$nomilestoneLabel){
}
};
//loop through issues and call the callback
//loop through all issues and call the callback
$repo->forIssues($callback);

View File

@ -1,5 +1,15 @@
#!/usr/bin/php
<?php
/***********************************************************************
* This is designed to allow the use of labels to reopen recuring issues
* on a specific day, month or duration (daily/weekly/monthly etc)
* NOTE: This is not 100% implemented/tested. It's a WIP
* It will process any issue that is tagged with 'xxx/repeat' label
* The labels are grouped into days/months
* If an issue is closed then it will be reopened
* If an issue is already open the bot will comment "NAG!" about it
***********************************************************************/
// load the config, create the connection and load the repo sepcified on the cmd line args
// we will then have $client and $repo available
require('setup.php');
@ -14,6 +24,7 @@ $terms=[
/* create the labels */
foreach($terms as $group=>$names){
foreach($names as $name){
$name="{$name}/repeat";
$label=$repo->getLabelByName($name);
if(!$label){
$label=$repo->createLabel([
@ -26,7 +37,6 @@ foreach($terms as $group=>$names){
}
//define the function to process each issue
$daily=function($issue){
$day_updated=date('d/m/Y',strtotime($issue->updated_at));
$day_closed=date('d/m/Y',strtotime($issue->closed_at));