|
29 | 29 | # Copyright 2016 Dustin Spicuzza <dustin@virtualroadside.com> #
|
30 | 30 | # Copyright 2016 Enix Yu <enix223@163.com> #
|
31 | 31 | # Copyright 2016 Jannis Gebauer <ja.geb@me.com> #
|
32 |
| -# Copyright 2016 Per Øyvind Karlsen <proyvind@moondrake.org> # |
| 32 | +# Copyright 2016 Per Øyvind Karlsen <proyvind@moondrake.org> # |
33 | 33 | # Copyright 2016 Peter Buckley <dx-pbuckley@users.noreply.github.com> #
|
34 | 34 | # Copyright 2016 Sylvus <Sylvus@users.noreply.github.com> #
|
35 | 35 | # Copyright 2016 fukatani <nannyakannya@gmail.com> #
|
|
41 | 41 | # Copyright 2017 Jannis Gebauer <ja.geb@me.com> #
|
42 | 42 | # Copyright 2017 Jason White <jasonwhite@users.noreply.github.com> #
|
43 | 43 | # Copyright 2017 Jimmy Zelinskie <jimmy.zelinskie+git@gmail.com> #
|
44 |
| -# Copyright 2017 Nhomar Hernández [Vauxoo] <nhomar@vauxoo.com> # |
| 44 | +# Copyright 2017 Nhomar Hernández [Vauxoo] <nhomar@vauxoo.com> # |
45 | 45 | # Copyright 2017 Simon <spam@esemi.ru> #
|
46 | 46 | # Copyright 2018 Andrew Smith <espadav8@gmail.com> #
|
47 | 47 | # Copyright 2018 Brian Torres-Gil <btorres-gil@paloaltonetworks.com> #
|
|
52 | 52 | # Copyright 2018 Shinichi TAMURA <shnch.tmr@gmail.com> #
|
53 | 53 | # Copyright 2018 Wan Liuyang <tsfdye@gmail.com> #
|
54 | 54 | # Copyright 2018 sfdye <tsfdye@gmail.com> #
|
| 55 | +# Copyright 2018 Jacopo Notarstefano <jacopo.notarstefano@gmail.com> # |
55 | 56 | # #
|
56 | 57 | # This file is part of PyGithub. #
|
57 | 58 | # http://pygithub.readthedocs.io/ #
|
@@ -126,6 +127,30 @@ class Repository(github.GithubObject.CompletableGithubObject):
|
126 | 127 | def __repr__(self):
|
127 | 128 | return self.get__repr__({"full_name": self._full_name.value})
|
128 | 129 |
|
| 130 | + @property |
| 131 | + def allow_merge_commit(self): |
| 132 | + """ |
| 133 | + :type: bool |
| 134 | + """ |
| 135 | + self._completeIfNotSet(self._allow_merge_commit) |
| 136 | + return self._allow_merge_commit.value |
| 137 | + |
| 138 | + @property |
| 139 | + def allow_rebase_merge(self): |
| 140 | + """ |
| 141 | + :type: bool |
| 142 | + """ |
| 143 | + self._completeIfNotSet(self._allow_rebase_merge) |
| 144 | + return self._allow_rebase_merge.value |
| 145 | + |
| 146 | + @property |
| 147 | + def allow_squash_merge(self): |
| 148 | + """ |
| 149 | + :type: bool |
| 150 | + """ |
| 151 | + self._completeIfNotSet(self._allow_squash_merge) |
| 152 | + return self._allow_squash_merge.value |
| 153 | + |
129 | 154 | @property
|
130 | 155 | def archived(self):
|
131 | 156 | """
|
@@ -350,6 +375,14 @@ def has_issues(self):
|
350 | 375 | self._completeIfNotSet(self._has_issues)
|
351 | 376 | return self._has_issues.value
|
352 | 377 |
|
| 378 | + @property |
| 379 | + def has_projects(self): |
| 380 | + """ |
| 381 | + :type: bool |
| 382 | + """ |
| 383 | + self._completeIfNotSet(self._has_projects) |
| 384 | + return self._has_projects.value |
| 385 | + |
353 | 386 | @property
|
354 | 387 | def has_wiki(self):
|
355 | 388 | """
|
@@ -2536,6 +2569,9 @@ def get_release_asset(self, id):
|
2536 | 2569 | return github.GitReleaseAsset.GitReleaseAsset(self._requester, resp_headers, data, completed=True)
|
2537 | 2570 |
|
2538 | 2571 | def _initAttributes(self):
|
| 2572 | + self._allow_merge_commit = github.GithubObject.NotSet |
| 2573 | + self._allow_rebase_merge = github.GithubObject.NotSet |
| 2574 | + self._allow_squash_merge = github.GithubObject.NotSet |
2539 | 2575 | self._archived = github.GithubObject.NotSet
|
2540 | 2576 | self._archive_url = github.GithubObject.NotSet
|
2541 | 2577 | self._assignees_url = github.GithubObject.NotSet
|
@@ -2564,6 +2600,7 @@ def _initAttributes(self):
|
2564 | 2600 | self._git_url = github.GithubObject.NotSet
|
2565 | 2601 | self._has_downloads = github.GithubObject.NotSet
|
2566 | 2602 | self._has_issues = github.GithubObject.NotSet
|
| 2603 | + self._has_projects = github.GithubObject.NotSet |
2567 | 2604 | self._has_wiki = github.GithubObject.NotSet
|
2568 | 2605 | self._homepage = github.GithubObject.NotSet
|
2569 | 2606 | self._hooks_url = github.GithubObject.NotSet
|
@@ -2612,6 +2649,12 @@ def _initAttributes(self):
|
2612 | 2649 | self._watchers_count = github.GithubObject.NotSet
|
2613 | 2650 |
|
2614 | 2651 | def _useAttributes(self, attributes):
|
| 2652 | + if "allow_merge_commit" in attributes: # pragma no branch |
| 2653 | + self._allow_merge_commit = self._makeBoolAttribute(attributes["allow_merge_commit"]) |
| 2654 | + if "allow_rebase_merge" in attributes: # pragma no branch |
| 2655 | + self._allow_rebase_merge = self._makeBoolAttribute(attributes["allow_rebase_merge"]) |
| 2656 | + if "allow_squash_merge" in attributes: # pragma no branch |
| 2657 | + self._allow_squash_merge = self._makeBoolAttribute(attributes["allow_squash_merge"]) |
2615 | 2658 | if "archived" in attributes: # pragma no branch
|
2616 | 2659 | self._archived = self._makeBoolAttribute(attributes["archived"])
|
2617 | 2660 | if "archive_url" in attributes: # pragma no branch
|
@@ -2668,6 +2711,8 @@ def _useAttributes(self, attributes):
|
2668 | 2711 | self._has_downloads = self._makeBoolAttribute(attributes["has_downloads"])
|
2669 | 2712 | if "has_issues" in attributes: # pragma no branch
|
2670 | 2713 | self._has_issues = self._makeBoolAttribute(attributes["has_issues"])
|
| 2714 | + if "has_projects" in attributes: # pragma no branch |
| 2715 | + self._has_projects = self._makeBoolAttribute(attributes["has_projects"]) |
2671 | 2716 | if "has_wiki" in attributes: # pragma no branch
|
2672 | 2717 | self._has_wiki = self._makeBoolAttribute(attributes["has_wiki"])
|
2673 | 2718 | if "homepage" in attributes: # pragma no branch
|
|
0 commit comments