Commit Graph
80 Commits
Author SHA1 Message Date
Steve Kowalik babcbcd04f Update most URLs to docs.github.com (#1896)
Now that GitHub have moved their documentation from
developer.github.com, we should update our links. I have also tried to
update the call strings to their new format, but since it was done via
regex, some of them may not match exactly.
2021-03-26 20:43:48 +11:00
Steve Kowalik 290b62726f Switch all string addition to using f-strings (#1774)
Now that we no longer support Python 3.5, stop using string addition
everywhere it makes sense, and move to the best feature 3.6+ gives us,
f-strings!
2021-03-03 14:50:57 +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
Huan-Cheng Chang f7d203c083 Add support for deleting reactions (#1708)
* Delete comment reactions

* Add test case

* update ignore-word-list

* Delete issue reactions

* Delete issue comment reactions

* Delete pull request comment reactions

* check status
2020-10-26 16:40:46 +11:00
Steve Kowalik 136a3e8008 Do not check reaction_type before sending (#1592)
There is a bunch of repeated code checking reactions which has the issue
that it can easily get out of date with what GitHub accepts. Drop the
check, and rely on GitHub returning an error.

Fixes #1554
2020-07-27 14:16:52 +10:00
Steve Kowalik 52ec366be4 Test more attributes (#1526)
To increase coverage, sprinkle in some asserts for attributes that were
not checked -- this uncovered a bug in Issue that two attributes were
not properly initialized to NotSet.
2020-05-21 09:58:50 +10:00
Huw Jones 4ae1a1e523 Search repo issues by string label (#1379)
* Allow use of strings for labels in Repository.get_issues

* Fix unittests

* Update docstring

* Removed brackets from "list of..."
2020-02-09 16:41:33 +11: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
Steve Kowalik d938f80be0 Run black and isort to prepare for release (#1328)
Run black and isort over github/*py and tests/*py to prepare for a new
release.
2019-12-29 11:53:00 +11:00
Nick Campbell 732fd26abd Support github timeline events. (#1302)
Adds support for retrieval of Github timeline events.

Signed-off-by: Nick Campbell <nicholas.j.campbell@gmail.com>
2019-12-29 10:50:05 +11:00
Wan Liuyang 540a085001 Fix isort - add known first and third party 2019-12-11 00:54:59 +08:00
Wan Liuyang 6ceb9e9a15 Apply black to whole codebase (#1303) 2019-12-10 17:14:33 +08:00
Steve Kowalik f93207b4ca Run flake8 in Travis (#1163)
Clean up a few errors I missed, ignore another, and configure flake8 using
a config file to ignore certain errors. The next step would be to remove
the F* ignores.
2019-08-05 15:03:10 +10: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
Filipe LaínsandWan Liuyang ec7bbcf586 issue: add lock/unlock (#1107)
* issue: add lock/unlock

* tests: add test for issue lock/unlock

* tests: add lock/unlock sample data

* Fix tests, add locked and active_lock_reason


Co-authored-by: Wan Liuyang <tsfdye@gmail.com>
2019-05-06 09:38:05 +08:00
Aaron L. Levine 7ac2a2ac97 Adding new attributes to IssueEvent (#857)
See Issue #855 

The class [IssueEvent](https://github.com/PyGithub/PyGithub/blob/master/github/IssueEvent.py) is missing a large number of attributes documented in the [API](https://developer.github.com/v3/issues/events/).

This is also commented about in #653 to a degree

27 of the tests 27 known event types have tests.

**Currently Tested using Issue #30**            
- [x] subscribed
- [x] assigned
- [x] referenced               
- [x] closed                   
- [x] labeled                  

**Currently Tested using Issue/PR #538**
- [x] merged
- [x] mentioned
- [x] review_requested

**Currently Tested using Issue/PR #857**
- [x] reopened
- [x] unassigned
- [x] unlabeled
- [x] renamed
- [x] base_ref_changed
- [x] head_ref_deleted 
- [x] head_ref_restored
- [x] milestoned
- [x] demilestoned
- [x] locked
- [x] unlocked
- [x] review_dismissed
- [x] review_request_removed
- [x] marked_as_duplicate
- [x] unmarked_as_duplicate
- [x] added_to_project       
- [x] moved_columns_in_project
- [x] removed_from_project
- [x] converted_note_to_issue - Note: this event is tied into Issue #866 

This PR is now ready to be merged
2018-08-25 00:01:29 +08:00
Wan Liuyang ae5cdb285e Refactor common header constants and custom media type 2018-08-21 15:01:23 +08:00
Wan Liuyang 3f0caa4057 Sync copyright header 2018-08-19 10:47:41 +08:00
per1234 bed4009361 Fix incorrect formatting in docstrings (#816) 2018-06-11 22:24:27 +08:00
Steve Kowalik 85dcc44650 Correct docstring for set_labels (#766)
Both Issue and PullRequest have a set_labels method whose docstring did
not exactly describe the parameter, correct it.
2018-04-23 14:27:18 +08:00
Shinichi TAMURA 6bf2acc74d Added Issue.as_pull_request() and PullReqest.as_issue() (#630) 2018-03-26 10:25:45 +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
Wan Liuyang a32a17bf81 Fix broken Github reference link in class docstrings 2018-03-13 15:07:07 +08:00
Simon 6bc804dc15 ♻️ Fix all pep8 coding conventions 2018-01-16 13:41:02 -08:00
Nicolas Agustín Torres ba50af53a0 Add Reactions feature (#671)
* List reactions of issue

* Create issue reaction

* List reactions of an issue comment

* Create a reaction on an issue comment

* List reactions of a commit comment

*  Create a reaction on a commit comment

* List reactions of a pull request review comment

* Create a reaction on a pull request review comment

* Delete reaction

* Renames IssueReaction to Reaction

* Fixes docstring in Reaction class

* Removes issue_url on Reaction class

* Fixes string concatenation that does not work on python 2.6
2017-12-14 19:23:33 -08:00
@tmshn 66430d7831 Added "add_to_assignees" & "remove_from_assignees" method to Issue object. 2016-11-27 21:31:30 +09:00
@tmshn 14dd9f0850 Enhance support of "assignees" argument in Issue.edit() 2016-10-10 11:08:41 +09:00
@tmshn e0e5fdf9c0 Added "assignees" attribute to Issue object. 2016-10-09 01:22:03 +09:00
Jannis Gebauer 3a8edc771a add issue assignee param 2016-10-05 11:31:09 +02:00
Jannis Gebauer 8571d87c77 adds a nicer __repr__ 2016-09-08 10:25:48 +02:00
Matt Babineau 3c6f99feb4 Adding "since" param to Issue.get_comments() (#426) 2016-07-21 11:19:13 -04:00
Peter Buckley cb0cf0a680 update doc url everywhere (#420) 2016-07-12 16:38:02 -04:00
Raja Reddy Karri 3aee448428 Fixing https://github.com/PyGithub/PyGithub/issues/335.
Issue.remove_from_labels fails when the label passed is a string with whitespace characters
2015-08-27 15:49:35 +05:30
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
David Farr 10bbfc1def Now accepts strings for assignee.
When calling pygithub for calls associated with assignees you can now simply pass a string instead of a NamedUser object. This applies to the following methods:
- issue.edit()
- repo.create_issue()
- repo.get_issues()
- repo.has_in_assignees()
- repo.has_in_collaborators()
- repo.remove_from_collaborators()
- repo.add_to_collaborators()
2013-12-16 11:15:17 -08:00
Vincent Jacques 22f366b540 Accept strings as well as Label objects (#202)
This should be more generic, but it's a wig work to do it
everywhere. Let's keep that in mind for V2.
2013-11-10 15:45:33 -08:00
Vincent Jacques 072bf24277 Raise exception only when user *accesses* an attribute with a bad value (#195) 2013-09-12 11:45:29 +02:00
Vincent Jacques 597e123029 Factorize the creation of attributes (preparation for #195) 2013-09-12 09:27:25 +02:00
Vincent Jacques 4a5009741a Use ValuedAttribute and NotSet.value (preparation for #195) 2013-09-12 00:40:27 +02:00
Vincent Jacques c0dae31a97 Add many missing attributes 2013-09-06 17:14:59 +02:00
Vincent Jacques f2feb81dae Add default parameters to greatly reduce code redoundancy 2013-09-06 11:01:32 +02:00
Vincent Jacques 64cf539c83 #193: Add a param to Requester.requestXxx for request headers 2013-08-23 11:31:01 +02:00
Vincent Jacques ba5b0d5ea9 Fix merge of #192
One branch modified signature of constructors,
another branch added a call to a constructor.
2013-08-22 10:44:38 +02:00
Vincent Jacques 8a2624e3a1 Merge branch 'topic/RememberHeaders' into develop (#192)
Conflicts:
	github/Issue.py
	github/MainClass.py
	github/PaginatedList.py
	github/Repository.py
	github/Requester.py
2013-08-22 10:30:14 +02:00
Vincent Jacques 5c475c7683 First review of #192 (pep8, headers... nothing important)
./manage.sh check
./manage.sh fix_headers
2013-08-22 10:12:38 +02:00
Vincent Jacques 20107078d2 Fix copyrights (#181 #182 #184 #186 #187) 2013-08-21 16:08:02 +02:00
AKFish 912bec79d2 Update copyright information 2013-08-21 17:45:01 +08:00
AKFish 3c1d17cd64 Update Repository.py 2013-08-21 17:13:03 +08:00