Commit Graph
17 Commits
Author SHA1 Message Date
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
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 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
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
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 c0dae31a97 Add many missing attributes 2013-09-06 17:14:59 +02:00