[mapserver-dev] Automated issue closing

Marko Locher marko.locher at eox.at
Fri Mar 29 01:22:08 PDT 2013


if I understand the script correctly you are looping over all (open) issues and then only working on those older than one year. (Using the updated_at value) But according to the Github API (available at [1]) you can already filter the list of returned issues. Thus I would propose to get the issues via a call to something like the following URL


1) You only get open issues (which is the default if you don't specify it, but it is more obvious this way)
2) Issues are already sorted ascending by date of the last update. This allows for exiting the script, once you reach an issue which is not outside the time frame set for auto closing

There are also a bunch of python libraries which abstract the Github API available at [2], maybe it would be worth considering using one of those to externalize updating to API changes

Anyways, just my 2 cents, 

[1] http://developer.github.com/v3/issues/
[2] http://developer.github.com/v3/libraries/#python

----- Original Message -----
> Hi all,
> please find a first version of a python script for automated issue
> closing pushed to the repository [1]. For the time being the script is
> configured to close issues with no activity for longer than a year and
> add a comment and a special tag (see [2] for an example - of course we
> would use a dedicated user for that).
> As discussed during the code sprint this script could be run on a
> regularly basis. So proposal is on the table, what do you think?
> cu
> Stephan
> PS: Sorry if you got spammed by github notification while testing the
> script on the mapserver-import repository.
> [1]
> https://github.com/mapserver/mapserver/blob/master/github_issue_no_activity_closer.py
> [2] https://github.com/mapserver/mapserver-import/issues/2165
> _______________________________________________
> mapserver-dev mailing list
> mapserver-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-dev

EOX - Spatial Observation Information Technology

More information about the mapserver-dev mailing list