phabricator/tasks: Fix issue and add optional api_token parameter
A couple of slight changes for the Phabricator lister task function:
- Fix task function return type
Previously, the following error was raised when the task has finished
its execution: Object of type ListerStats is not JSON serializable
.
So ensure ListerStats object gets converted to dict before returning it.
- Add optional
api_token
parameter to listing task function
This is useful when one wants to test the lister in the docker environment.
Migrated from D4836 (view on Phabricator)