Cygnus issueshttps://gitlab.wmflabs.org/Cygnus/Cygnus/-/issues2018-06-16T23:59:02Zhttps://gitlab.wmflabs.org/Cygnus/Cygnus/-/issues/84Get created pages2018-06-16T23:59:02ZLuke081515luke081515@tools.wmflabs.orgGet created pagesWe should make the bot able to get the list of user contribs. For version 2.1 I will start with created pages.We should make the bot able to get the list of user contribs. For version 2.1 I will start with created pages.Version 2.1Luke081515luke081515@tools.wmflabs.orgLuke081515luke081515@tools.wmflabs.orghttps://gitlab.wmflabs.org/Cygnus/Cygnus/-/issues/83Add new SQL framework to Cygnus2018-02-11T14:57:31ZFreddyAdd new SQL framework to CygnusAdd new SQL framework to CygnusAdd new SQL framework to CygnusVersion 2.2https://gitlab.wmflabs.org/Cygnus/Cygnus/-/issues/82Implement action=clientlogin2018-01-13T00:12:33ZLuke081515luke081515@tools.wmflabs.orgImplement action=clientloginSee #31 for the original issue. We maybe want to implement action=clientloginSee #31 for the original issue. We maybe want to implement action=clientloginVersion 2.2https://gitlab.wmflabs.org/Cygnus/Cygnus/-/issues/81Ban serialized arrays as return value2018-01-12T23:53:10ZLuke081515luke081515@tools.wmflabs.orgBan serialized arrays as return valueSerialized Arrays as return value are bad. The user needs to take care of the API-Answer then. The function should do that for him instead.
Current functions using serialized Arrays:
* [ ] `movePage()`
* [ ] `getCatMembers()`
* [ ] `getPageCats()`
* [ ] `getAllEmbedings()`
* [ ] `getAllPages()`Serialized Arrays as return value are bad. The user needs to take care of the API-Answer then. The function should do that for him instead.
Current functions using serialized Arrays:
* [ ] `movePage()`
* [ ] `getCatMembers()`
* [ ] `getPageCats()`
* [ ] `getAllEmbedings()`
* [ ] `getAllPages()`Version 2.2https://gitlab.wmflabs.org/Cygnus/Cygnus/-/issues/80Change return format of patrol and rollback2018-02-11T12:06:21ZLuke081515luke081515@tools.wmflabs.orgChange return format of patrol and rollbackBoth are using a mix of strings etc, but they can use more simple values, which are taking less ressources to compare later. These methods where introduced in the current alpha, so changing it is no breaking change.Both are using a mix of strings etc, but they can use more simple values, which are taking less ressources to compare later. These methods where introduced in the current alpha, so changing it is no breaking change.Version 2.1Luke081515luke081515@tools.wmflabs.orgLuke081515luke081515@tools.wmflabs.orghttps://gitlab.wmflabs.org/Cygnus/Cygnus/-/issues/79Use similar layout for the docu2018-01-29T01:19:19ZLuke081515luke081515@tools.wmflabs.orgUse similar layout for the docuCurrently the order of @param, @author etc. is different, it would be useful to make that similar.
I'd say we can do:
```php
/** method name
* Short description
* @author Authorname
* @param $param - text here
* @param $param - [default: default value] - text
* @return type: text
*/
```Currently the order of @param, @author etc. is different, it would be useful to make that similar.
I'd say we can do:
```php
/** method name
* Short description
* @author Authorname
* @param $param - text here
* @param $param - [default: default value] - text
* @return type: text
*/
```Version 2.1Luke081515luke081515@tools.wmflabs.orgLuke081515luke081515@tools.wmflabs.orghttps://gitlab.wmflabs.org/Cygnus/Cygnus/-/issues/78Suppress UA at Unit-tests2018-01-31T21:36:41ZLuke081515luke081515@tools.wmflabs.orgSuppress UA at Unit-tests```
+ phpunit --version
$ bash ci/phpunitBasic.sh
PHPUnit 5.7.26 by Sebastian Bergmann and contributors.
.
Used UserAgent: 'User:UTAccount - TestCore - Cygnus-Framework V2.1 alpha'
.
Used UserAgent: 'User:UTAccount - TestCore - Cygnus-Framework V2.1 alpha'
```
The version is already suppressed, now the UA should get suppressed as well.```
+ phpunit --version
$ bash ci/phpunitBasic.sh
PHPUnit 5.7.26 by Sebastian Bergmann and contributors.
.
Used UserAgent: 'User:UTAccount - TestCore - Cygnus-Framework V2.1 alpha'
.
Used UserAgent: 'User:UTAccount - TestCore - Cygnus-Framework V2.1 alpha'
```
The version is already suppressed, now the UA should get suppressed as well.Version 2.1Luke081515luke081515@tools.wmflabs.orgLuke081515luke081515@tools.wmflabs.orghttps://gitlab.wmflabs.org/Cygnus/Cygnus/-/issues/77Remove ununsed vars2018-02-11T14:55:28ZLuke081515luke081515@tools.wmflabs.orgRemove ununsed varsOften there are action like this:
```php
$result = $this->ApiRequest();
$resultUs = unserialize($result);
```
$result gets then not used again, but consumes ram. This should get removed.Often there are action like this:
```php
$result = $this->ApiRequest();
$resultUs = unserialize($result);
```
$result gets then not used again, but consumes ram. This should get removed.Version 2.1Luke081515luke081515@tools.wmflabs.orgLuke081515luke081515@tools.wmflabs.orghttps://gitlab.wmflabs.org/Cygnus/Cygnus/-/issues/76Use identical var names at API-Requests2018-01-31T21:36:41ZLuke081515luke081515@tools.wmflabs.orgUse identical var names at API-RequestsWhen fetching the API results, the same varname scheme should get used. This should get checked.When fetching the API results, the same varname scheme should get used. This should get checked.Version 2.1Luke081515luke081515@tools.wmflabs.orgLuke081515luke081515@tools.wmflabs.orghttps://gitlab.wmflabs.org/Cygnus/Cygnus/-/issues/75Put generic API-params in a function2018-01-30T12:43:13ZLuke081515luke081515@tools.wmflabs.orgPut generic API-params in a functionEach function needs maxlag. Each function needs assert, or at least most. It would be nice if we can put this to a function that get called on each api-call.Each function needs maxlag. Each function needs assert, or at least most. It would be nice if we can put this to a function that get called on each api-call.Version 2.2Luke081515luke081515@tools.wmflabs.orgLuke081515luke081515@tools.wmflabs.orghttps://gitlab.wmflabs.org/Cygnus/Cygnus/-/issues/74BlockGlobal can not handle errors2018-01-16T21:05:14ZLuke081515luke081515@tools.wmflabs.orgBlockGlobal can not handle errors```
Give me the IP:<already blocked ip>
PHP Notice: Undefined index: code in /home/luke/Scripts/Cygnus/BotCore.php on line 1283
PHP Stack trace:
PHP 1. {main}() /home/luke/Scripts/GlobalMassBlock.php:0
PHP 2. GlobalMassBlock->__construct() /home/luke/Scripts/GlobalMassBlock.php:24
PHP 3. GlobalMassBlock->blockGlobal() /home/luke/Scripts/GlobalMassBlock.php:15
Not blocked!
``````
Give me the IP:<already blocked ip>
PHP Notice: Undefined index: code in /home/luke/Scripts/Cygnus/BotCore.php on line 1283
PHP Stack trace:
PHP 1. {main}() /home/luke/Scripts/GlobalMassBlock.php:0
PHP 2. GlobalMassBlock->__construct() /home/luke/Scripts/GlobalMassBlock.php:24
PHP 3. GlobalMassBlock->blockGlobal() /home/luke/Scripts/GlobalMassBlock.php:15
Not blocked!
```Version 2.1Luke081515luke081515@tools.wmflabs.orgLuke081515luke081515@tools.wmflabs.orghttps://gitlab.wmflabs.org/Cygnus/Cygnus/-/issues/73Write a generic query continue2018-01-09T19:41:46ZLuke081515luke081515@tools.wmflabs.orgWrite a generic query continue!77 inspired me. What do you think of:
**A generic query continue!**
The concept itself is simple and nice, implementation may be not.
# What the function does
## Conditions for using
Query functions often have more results then the limit allows, so continue is needed. Currently the functions are doing this until all results are fetched. This may be useless if the user only needs 7000 for example.
## Calling it
Functions are reciving the continue. This continue has a name as well (if using rawcontinue, we may switch to the other continue), so the continue engine can get called, with the params `continuename `and `api-call url` at least. The function will start fetching everything then. It would be useful to implement that recursive, but PHP allows only 50 levels of recursive functions IIRC
# Nice additional features
The user can specify a limit, and the function tries to fetch as much as possible data, if [limit] > [limit of data to fetch in one request]. Then, the function will continue, until the limit is reached.
Please share your opinion on this proposal with me.!77 inspired me. What do you think of:
**A generic query continue!**
The concept itself is simple and nice, implementation may be not.
# What the function does
## Conditions for using
Query functions often have more results then the limit allows, so continue is needed. Currently the functions are doing this until all results are fetched. This may be useless if the user only needs 7000 for example.
## Calling it
Functions are reciving the continue. This continue has a name as well (if using rawcontinue, we may switch to the other continue), so the continue engine can get called, with the params `continuename `and `api-call url` at least. The function will start fetching everything then. It would be useful to implement that recursive, but PHP allows only 50 levels of recursive functions IIRC
# Nice additional features
The user can specify a limit, and the function tries to fetch as much as possible data, if [limit] > [limit of data to fetch in one request]. Then, the function will continue, until the limit is reached.
Please share your opinion on this proposal with me.Version 2.2https://gitlab.wmflabs.org/Cygnus/Cygnus/-/issues/72Check if a page contains a template2018-01-16T21:05:14ZLuke081515luke081515@tools.wmflabs.orgCheck if a page contains a templateWrite a function that checks if a template is present on a page.Write a function that checks if a template is present on a page.Version 2.1Luke081515luke081515@tools.wmflabs.orgLuke081515luke081515@tools.wmflabs.orghttps://gitlab.wmflabs.org/Cygnus/Cygnus/-/issues/71Replace unneeded whiles with for2018-01-13T22:33:44ZLuke081515luke081515@tools.wmflabs.orgReplace unneeded whiles with forwhile's that don't need to be while's should be for.while's that don't need to be while's should be for.Version 2.1Luke081515luke081515@tools.wmflabs.orgLuke081515luke081515@tools.wmflabs.orghttps://gitlab.wmflabs.org/Cygnus/Cygnus/-/issues/70ban goto2018-01-31T21:36:40ZLuke081515luke081515@tools.wmflabs.orgban gotoIt would be useful to ban this not so good piece of coding, which is only used at some places.It would be useful to ban this not so good piece of coding, which is only used at some places.Version 2.1Luke081515luke081515@tools.wmflabs.orgLuke081515luke081515@tools.wmflabs.orghttps://gitlab.wmflabs.org/Cygnus/Cygnus/-/issues/69checkResult: Handle "protectedpage"2017-12-29T19:07:00ZLuke081515luke081515@tools.wmflabs.orgcheckResult: Handle "protectedpage"`protectedpage` is a common error code, and should get handeled as well.`protectedpage` is a common error code, and should get handeled as well.Version 2.1Luke081515luke081515@tools.wmflabs.orgLuke081515luke081515@tools.wmflabs.orghttps://gitlab.wmflabs.org/Cygnus/Cygnus/-/issues/68Echo useragent2018-01-05T22:18:39ZLuke081515luke081515@tools.wmflabs.orgEcho useragentTo find your bot at Special:ApiFeatureUsage, you need the useragent, so we should make it easy to find.To find your bot at Special:ApiFeatureUsage, you need the useragent, so we should make it easy to find.Version 2.1Luke081515luke081515@tools.wmflabs.orgLuke081515luke081515@tools.wmflabs.orghttps://gitlab.wmflabs.org/Cygnus/Cygnus/-/issues/67Debug: let the user retry2018-01-31T21:36:41ZLuke081515luke081515@tools.wmflabs.orgDebug: let the user retryIf you need to specify the function to debug, and you mistyped it, it would be useful if you can try it again without needing to relogin.If you need to specify the function to debug, and you mistyped it, it would be useful if you can try it again without needing to relogin.Version 2.1Luke081515luke081515@tools.wmflabs.orgLuke081515luke081515@tools.wmflabs.orghttps://gitlab.wmflabs.org/Cygnus/Cygnus/-/issues/66Debug: better visualisation for null2018-01-13T22:33:44ZLuke081515luke081515@tools.wmflabs.orgDebug: better visualisation for nullIf any functions returns `null` that should get visualized instead of returning an empty row.If any functions returns `null` that should get visualized instead of returning an empty row.Version 2.1Luke081515luke081515@tools.wmflabs.orgLuke081515luke081515@tools.wmflabs.orghttps://gitlab.wmflabs.org/Cygnus/Cygnus/-/issues/65getPageID returns not the pageID2018-01-13T22:33:44ZLuke081515luke081515@tools.wmflabs.orggetPageID returns not the pageIDLooks like it is returning a non-existant variable. A unit test would be nice to prevent that as well.Looks like it is returning a non-existant variable. A unit test would be nice to prevent that as well.Version 2.1Luke081515luke081515@tools.wmflabs.orgLuke081515luke081515@tools.wmflabs.org