Commit Graph
36 Commits
Author SHA1 Message Date
Jirka Borovec 13e178a3ab Set line length to 120 characters (#2599) 2023-07-13 17:37:20 +02:00
Jonathan Leitschuh daf62bd461 Add support for new RepositoryAdvisories API 🎉 (#2483) 2023-06-09 13:42:18 -04:00
Gabriele Oliaro 3a6235b56e [WorkflowRun] - Add missing attributes (run_started_at & run_attempt), remove deprecated unicode type (#2273) 2022-10-29 11:26:24 +08:00
karsten-wagner 0245b758ca Allow adding attributes at the end of the list (#1807)
* Allow adding attributes at the end of the list / fix for issue #1806

* Update as per review comments
2021-03-24 10:18:04 +11:00
Steve Kowalik e113e37de1 Add pyupgrade to pre-commit configuration (#1783)
To help us switch to f-strings and other 3.6+ changes, add pyupgrade to
our pre-commit configuration to keep the codebase clean.
2020-12-15 14:07:33 +11:00
Isac Souza 0396a4931a Open file in text mode in scripts/add_attribute.py (#1396) 2020-02-13 12:59:28 +11:00
Wan Liuyang f8bf46f82b black 2020-02-12 02:01:58 +08:00
Steve Kowalik b7894ea00c Drop Python 2 support (#1329)
With the Python 2 deadline gone, it's time to move with the times and
switch to Python 3 only.
2020-01-06 18:01:38 +11:00
Wan Liuyang 6ceb9e9a15 Apply black to whole codebase (#1303) 2019-12-10 17:14:33 +08:00
Steve Kowalik dc2f2ad8cb Switch to using six (#1189)
With the Python 2.7 deadline fast approaching, modernize the codebase
making use of the modernize module to switch to using six, as well as
other upcoming features, such as absolute imports . Stop using 2to3
for Travis, yay!
2019-08-05 14:06:19 +10:00
Steve Kowalik 26c595d9b6 Silence most flake8 warnings (#1162)
Continue my crusade to running flake8 against new contributions by
cleaning up whitespace (and wierdly, the entire indentation of
Migration) to silence most flake8 warnings. AllTests is the remaining
outlier, and requires some thought on how to approach.
2019-07-03 10:35:17 +08:00
Steve Kowalik b8dad9817e Clean up a lot of pyflakes warnings (#1153)
Clean up unused imports or unused variables to mostly silence pyflakes.
We aren't quite yet in a place where we can run it via Travis, but baby
steps.
2019-07-02 18:06:09 +10:00
Yossarian King faca4ce1c0 Add support for projects (#854)
Initial solution for [PyGithub support for projects](https://github.com/PyGithub/PyGithub/issues/606) (#606). Adds comprehensive project querying API.

Currently does not support for modifying projects, columns or cards. (I only need this interface for reporting purposes. Of course once I'm done others are more than welcome to add additional features!)

API that was integrated:
https://developer.github.com/v3/projects
https://developer.github.com/v3/projects/columns
https://developer.github.com/v3/projects/cards

Note that the Github project API is in preview mode - it requires a special header in order for requests to be processed, and the API is subject to change without notice.

## Summary
- new classes: Project, ProjectColumn, ProjectCard
- add Organization.get_projects method
- add Repository.get_projects method
- add MainClass.get_project method
- add test cases to exercise all new classes and methods and verify attributes are as expected; replay data is included, recorded (mostly) from my fork of PyGithub
- updated add_attribute script to:
  - use makeXXXAttribute API
  - be able to add to the end of the current set of properties
  - handle both Completable and NonCompletable class types correctly

## Checklist
Not to be merged until these are done:

- [x] remaining Project properties
- [x] remaining ProjectColumn properties
- [x] remaining ProjectCard properties
- [x] support for archived_state parameter when getting cards: all,archived, or not_archived
- [x] get issue from card, not just pull request ("get_content" method?)
- [x] centralize header management for "preview" access to projects API
- [x] add test for retrieving organization projects
- [x] add test for getting issue / pull request content from card
2018-09-11 13:05:16 +08:00
sfdye 15267c6804 Clean up 2018-03-17 20:33:41 +08:00
sfdye 365a0a24d3 Apply fix_headers script to update copyright info 2018-03-17 20:06:16 +08:00
sfdye 58e1ef9ccb Fix copyright formatting 2018-03-13 22:30:47 +08:00
sfdye 020c136a40 Update doc link in copyright text 2018-03-13 22:07:38 +08:00
Jannis Gebauer 3c20a66e42 upgrade release process based on travis 2016-08-11 17:07:58 +02:00
Peter Buckley cb0cf0a680 update doc url everywhere (#420) 2016-07-12 16:38:02 -04:00
Vincent Jacques abca7a026e pep8
This is strange, maybe Cygwin's version is stricter.
No time to investigate.
2014-05-04 12:54:05 -07:00
Vincent Jacques 6f178f6f08 Merge branch 'pr224' 2014-03-02 20:48:28 -08:00
Thialfihar 6ef3a0220f Fix add_attribute insertion logic
The code didn't work if it couldn't find a property in the file
that is lexicographically greater than the new attribute.
It now accepts _identity as an "end point" to insert before, and
empty lines in _initAttributes() and _useAttributes(), as they mark
the end of the method.

Also add "float" as a possible type, mainly for the "score" attribute
in search results.
2014-02-08 21:06:43 +01:00
Vincent Jacques 8a8505cf30 Add reference of import twitter 2013-12-23 19:56:16 -08:00
Vincent Jacques 54f718a157 Twitt about releases 2013-10-20 20:45:43 -07:00
Vincent Jacques f78311ab48 Github.get_hook (#196) 2013-09-11 23:24:28 +02:00
Vincent Jacques 4e8f36ba39 Small updates of doc 2013-09-06 17:24:06 +02:00
Vincent Jacques c0dae31a97 Add many missing attributes 2013-09-06 17:14:59 +02:00
Vincent Jacques f2de1fbfcc Don't fix headers in /build 2013-08-22 10:22:07 +02:00
Vincent Jacques 20107078d2 Fix copyrights (#181 #182 #184 #186 #187) 2013-08-21 16:08:02 +02:00
Vincent Jacques 600f508343 Check links to ref in :calls: sections 2013-07-16 23:45:57 +02:00
Vincent Jacques 16cb2873e8 Generate doc/apis.rst instead of checking it 2013-07-16 22:19:22 +02:00
Vincent Jacques 8484260dc5 Fix our doc to match URLs described in Github API v3 ref doc 2013-07-16 10:32:57 +02:00
Vincent Jacques d50031b0a0 Add todos 2013-07-14 11:21:17 +02:00
Vincent Jacques f145d9927e Draft a script comparing URLs called in PyGithub to Github API v3 reference 2013-07-14 11:12:59 +02:00
Vincent Jacques 06a3d87098 Change source file header format 2013-07-13 19:03:53 +02:00
Vincent Jacques a55486a809 Add a script to fix file headers 2013-07-13 11:09:14 +02:00