diff --git a/venv/lib/python3.10/site-packages/PyGithub-2.6.1.dist-info/COPYING b/venv/lib/python3.10/site-packages/PyGithub-2.6.1.dist-info/COPYING
new file mode 100644
index 0000000000000000000000000000000000000000..94a9ed024d3859793618152ea559a168bbcbb5e2
--- /dev/null
+++ b/venv/lib/python3.10/site-packages/PyGithub-2.6.1.dist-info/COPYING
@@ -0,0 +1,674 @@
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+
+ Copyright (C)
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see .
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ Copyright (C)
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+.
diff --git a/venv/lib/python3.10/site-packages/PyGithub-2.6.1.dist-info/COPYING.LESSER b/venv/lib/python3.10/site-packages/PyGithub-2.6.1.dist-info/COPYING.LESSER
new file mode 100644
index 0000000000000000000000000000000000000000..65c5ca88a67c30becee01c5a8816d964b03862f9
--- /dev/null
+++ b/venv/lib/python3.10/site-packages/PyGithub-2.6.1.dist-info/COPYING.LESSER
@@ -0,0 +1,165 @@
+ GNU LESSER GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc.
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+ This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+ 0. Additional Definitions.
+
+ As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+ "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+ An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+ A "Combined Work" is a work produced by combining or linking an
+Application with the Library. The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+ The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+ The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+ 1. Exception to Section 3 of the GNU GPL.
+
+ You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+ 2. Conveying Modified Versions.
+
+ If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+ a) under this License, provided that you make a good faith effort to
+ ensure that, in the event an Application does not supply the
+ function or data, the facility still operates, and performs
+ whatever part of its purpose remains meaningful, or
+
+ b) under the GNU GPL, with none of the additional permissions of
+ this License applicable to that copy.
+
+ 3. Object Code Incorporating Material from Library Header Files.
+
+ The object code form of an Application may incorporate material from
+a header file that is part of the Library. You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+ a) Give prominent notice with each copy of the object code that the
+ Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the object code with a copy of the GNU GPL and this license
+ document.
+
+ 4. Combined Works.
+
+ You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+ a) Give prominent notice with each copy of the Combined Work that
+ the Library is used in it and that the Library and its use are
+ covered by this License.
+
+ b) Accompany the Combined Work with a copy of the GNU GPL and this license
+ document.
+
+ c) For a Combined Work that displays copyright notices during
+ execution, include the copyright notice for the Library among
+ these notices, as well as a reference directing the user to the
+ copies of the GNU GPL and this license document.
+
+ d) Do one of the following:
+
+ 0) Convey the Minimal Corresponding Source under the terms of this
+ License, and the Corresponding Application Code in a form
+ suitable for, and under terms that permit, the user to
+ recombine or relink the Application with a modified version of
+ the Linked Version to produce a modified Combined Work, in the
+ manner specified by section 6 of the GNU GPL for conveying
+ Corresponding Source.
+
+ 1) Use a suitable shared library mechanism for linking with the
+ Library. A suitable mechanism is one that (a) uses at run time
+ a copy of the Library already present on the user's computer
+ system, and (b) will operate properly with a modified version
+ of the Library that is interface-compatible with the Linked
+ Version.
+
+ e) Provide Installation Information, but only if you would otherwise
+ be required to provide such information under section 6 of the
+ GNU GPL, and only to the extent that such information is
+ necessary to install and execute a modified version of the
+ Combined Work produced by recombining or relinking the
+ Application with a modified version of the Linked Version. (If
+ you use option 4d0, the Installation Information must accompany
+ the Minimal Corresponding Source and Corresponding Application
+ Code. If you use option 4d1, you must provide the Installation
+ Information in the manner specified by section 6 of the GNU GPL
+ for conveying Corresponding Source.)
+
+ 5. Combined Libraries.
+
+ You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+ a) Accompany the combined library with a copy of the same work based
+ on the Library, uncombined with any other library facilities,
+ conveyed under the terms of this License.
+
+ b) Give prominent notice with the combined library that part of it
+ is a work based on the Library, and explaining where to find the
+ accompanying uncombined form of the same work.
+
+ 6. Revised Versions of the GNU Lesser General Public License.
+
+ The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+ If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
diff --git a/venv/lib/python3.10/site-packages/github/AccessToken.py b/venv/lib/python3.10/site-packages/github/AccessToken.py
new file mode 100644
index 0000000000000000000000000000000000000000..a127d77059ab7ada465be547cb2b32980299828f
--- /dev/null
+++ b/venv/lib/python3.10/site-packages/github/AccessToken.py
@@ -0,0 +1,158 @@
+############################ Copyrights and license ############################
+# #
+# Copyright 2012 Vincent Jacques #
+# Copyright 2012 Zearin #
+# Copyright 2013 Vincent Jacques #
+# Copyright 2014 Vincent Jacques #
+# Copyright 2016 Peter Buckley #
+# Copyright 2018 Wan Liuyang #
+# Copyright 2018 sfdye #
+# Copyright 2019 Adam Baratz #
+# Copyright 2019 Nick Campbell #
+# Copyright 2019 Rigas Papathanasopoulos #
+# Copyright 2019 Steve Kowalik #
+# Copyright 2019 Wan Liuyang #
+# Copyright 2020 Steve Kowalik #
+# Copyright 2022 Liuyang Wan #
+# Copyright 2023 Enrico Minack #
+# Copyright 2023 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
+# Copyright 2023 Trim21 #
+# Copyright 2023 chantra #
+# Copyright 2025 Enrico Minack #
+# #
+# This file is part of PyGithub. #
+# http://pygithub.readthedocs.io/ #
+# #
+# PyGithub is free software: you can redistribute it and/or modify it under #
+# the terms of the GNU Lesser General Public License as published by the Free #
+# Software Foundation, either version 3 of the License, or (at your option) #
+# any later version. #
+# #
+# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY #
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS #
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more #
+# details. #
+# #
+# You should have received a copy of the GNU Lesser General Public License #
+# along with PyGithub. If not, see . #
+# #
+################################################################################
+
+from __future__ import annotations
+
+from datetime import datetime, timedelta, timezone
+from typing import Any
+
+from github.GithubObject import Attribute, NonCompletableGithubObject, NotSet
+
+
+class AccessToken(NonCompletableGithubObject):
+ """
+ This class represents access tokens.
+ """
+
+ _created: datetime
+
+ def _initAttributes(self) -> None:
+ self._expires_in: Attribute[int | None] = NotSet
+ self._refresh_expires_in: Attribute[int | None] = NotSet
+ self._refresh_token: Attribute[str] = NotSet
+ self._scope: Attribute[str] = NotSet
+ self._token: Attribute[str] = NotSet
+ self._type: Attribute[str] = NotSet
+
+ def __repr__(self) -> str:
+ return self.get__repr__(
+ {
+ "token": f"{self.token[:5]}...",
+ "scope": self.scope,
+ "type": self.type,
+ "expires_in": self.expires_in,
+ "refresh_token": (f"{self.refresh_token[:5]}..." if self.refresh_token else None),
+ "refresh_token_expires_in": self.refresh_expires_in,
+ }
+ )
+
+ @property
+ def created(self) -> datetime:
+ """
+ :type: datetime
+ """
+ return self._created
+
+ @property
+ def expires_at(self) -> datetime | None:
+ """
+ :type: Optional[datetime]
+ """
+ seconds = self.expires_in
+ if seconds is not None:
+ return self._created + timedelta(seconds=seconds)
+ return None
+
+ @property
+ def expires_in(self) -> int | None:
+ """
+ :type: Optional[int]
+ """
+ return self._expires_in.value
+
+ @property
+ def refresh_expires_at(self) -> datetime | None:
+ """
+ :type: Optional[datetime]
+ """
+ seconds = self.refresh_expires_in
+ if seconds is not None:
+ return self._created + timedelta(seconds=seconds)
+ return None
+
+ @property
+ def refresh_expires_in(self) -> int | None:
+ """
+ :type: Optional[int]
+ """
+ return self._refresh_expires_in.value
+
+ @property
+ def refresh_token(self) -> str | None:
+ """
+ :type: Optional[string]
+ """
+ return self._refresh_token.value
+
+ @property
+ def scope(self) -> str:
+ """
+ :type: string
+ """
+ return self._scope.value
+
+ @property
+ def token(self) -> str:
+ """
+ :type: string
+ """
+ return self._token.value
+
+ @property
+ def type(self) -> str:
+ """
+ :type: string
+ """
+ return self._type.value
+
+ def _useAttributes(self, attributes: dict[str, Any]) -> None:
+ self._created = datetime.now(timezone.utc)
+ if "access_token" in attributes: # pragma no branch
+ self._token = self._makeStringAttribute(attributes["access_token"])
+ if "expires_in" in attributes: # pragma no branch
+ self._expires_in = self._makeIntAttribute(attributes["expires_in"])
+ if "refresh_token" in attributes: # pragma no branch
+ self._refresh_token = self._makeStringAttribute(attributes["refresh_token"])
+ if "refresh_token_expires_in" in attributes: # pragma no branch
+ self._refresh_expires_in = self._makeIntAttribute(attributes["refresh_token_expires_in"])
+ if "scope" in attributes: # pragma no branch
+ self._scope = self._makeStringAttribute(attributes["scope"])
+ if "token_type" in attributes: # pragma no branch
+ self._type = self._makeStringAttribute(attributes["token_type"])
diff --git a/venv/lib/python3.10/site-packages/github/AdvisoryBase.py b/venv/lib/python3.10/site-packages/github/AdvisoryBase.py
new file mode 100644
index 0000000000000000000000000000000000000000..b9008cf0eaa62870402d0d626e84df9b3fbc4c54
--- /dev/null
+++ b/venv/lib/python3.10/site-packages/github/AdvisoryBase.py
@@ -0,0 +1,157 @@
+############################ Copyrights and license ############################
+# #
+# Copyright 2023 Enrico Minack #
+# Copyright 2023 Joseph Henrich #
+# Copyright 2024 Enrico Minack #
+# Copyright 2024 Thomas Cooper #
+# Copyright 2025 Enrico Minack #
+# #
+# This file is part of PyGithub. #
+# http://pygithub.readthedocs.io/ #
+# #
+# PyGithub is free software: you can redistribute it and/or modify it under #
+# the terms of the GNU Lesser General Public License as published by the Free #
+# Software Foundation, either version 3 of the License, or (at your option) #
+# any later version. #
+# #
+# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY #
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS #
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more #
+# details. #
+# #
+# You should have received a copy of the GNU Lesser General Public License #
+# along with PyGithub. If not, see . #
+# #
+################################################################################
+
+from __future__ import annotations
+
+from datetime import datetime
+from typing import Any
+
+from github.CVSS import CVSS
+from github.CWE import CWE
+from github.GithubObject import Attribute, NonCompletableGithubObject, NotSet
+
+
+class AdvisoryBase(NonCompletableGithubObject):
+ """
+ This class represents the shared attributes between GlobalAdvisory, RepositoryAdvisory and DependabotAdvisory
+ https://docs.github.com/en/rest/security-advisories/global-advisories
+ https://docs.github.com/en/rest/security-advisories/repository-advisories
+ https://docs.github.com/en/rest/dependabot/alerts
+ """
+
+ def _initAttributes(self) -> None:
+ self._cve_id: Attribute[str] = NotSet
+ self._cvss: Attribute[CVSS] = NotSet
+ self._cvss_severities: Attribute[dict[str, Any]] = NotSet
+ self._cwes: Attribute[list[CWE]] = NotSet
+ self._description: Attribute[str] = NotSet
+ self._ghsa_id: Attribute[str] = NotSet
+ self._html_url: Attribute[str] = NotSet
+ self._identifiers: Attribute[list[dict]] = NotSet
+ self._published_at: Attribute[datetime] = NotSet
+ self._severity: Attribute[str] = NotSet
+ self._summary: Attribute[str] = NotSet
+ self._updated_at: Attribute[datetime] = NotSet
+ self._url: Attribute[str] = NotSet
+ self._withdrawn_at: Attribute[datetime] = NotSet
+
+ def __repr__(self) -> str:
+ return self.get__repr__({"ghsa_id": self.ghsa_id, "summary": self.summary})
+
+ @property
+ def cve_id(self) -> str:
+ return self._cve_id.value
+
+ @property
+ def cvss(self) -> CVSS:
+ return self._cvss.value
+
+ @property
+ def cvss_severities(self) -> dict[str, Any]:
+ return self._cvss_severities.value
+
+ @property
+ def cwes(self) -> list[CWE]:
+ return self._cwes.value
+
+ @property
+ def description(self) -> str:
+ return self._description.value
+
+ @property
+ def ghsa_id(self) -> str:
+ return self._ghsa_id.value
+
+ @property
+ def html_url(self) -> str:
+ return self._html_url.value
+
+ @property
+ def identifiers(self) -> list[dict]:
+ return self._identifiers.value
+
+ @property
+ def published_at(self) -> datetime:
+ return self._published_at.value
+
+ @property
+ def severity(self) -> str:
+ return self._severity.value
+
+ @property
+ def summary(self) -> str:
+ return self._summary.value
+
+ @property
+ def updated_at(self) -> datetime:
+ return self._updated_at.value
+
+ @property
+ def url(self) -> str:
+ return self._url.value
+
+ @property
+ def withdrawn_at(self) -> datetime:
+ return self._withdrawn_at.value
+
+ def _useAttributes(self, attributes: dict[str, Any]) -> None:
+ if "cve_id" in attributes: # pragma no branch
+ self._cve_id = self._makeStringAttribute(attributes["cve_id"])
+ if "cvss" in attributes: # pragma no branch
+ self._cvss = self._makeClassAttribute(CVSS, attributes["cvss"])
+ if "cvss_severities" in attributes: # pragma no branch
+ self._cvss_severities = self._makeDictAttribute(attributes["cvss_severities"])
+ if "cwes" in attributes: # pragma no branch
+ self._cwes = self._makeListOfClassesAttribute(CWE, attributes["cwes"])
+ if "description" in attributes: # pragma no branch
+ self._description = self._makeStringAttribute(attributes["description"])
+ if "ghsa_id" in attributes: # pragma no branch
+ self._ghsa_id = self._makeStringAttribute(attributes["ghsa_id"])
+ if "html_url" in attributes: # pragma no branch
+ self._html_url = self._makeStringAttribute(attributes["html_url"])
+ if "identifiers" in attributes: # pragma no branch
+ self._identifiers = self._makeListOfDictsAttribute(attributes["identifiers"])
+ if "published_at" in attributes: # pragma no branch
+ assert attributes["published_at"] is None or isinstance(attributes["published_at"], str), attributes[
+ "published_at"
+ ]
+ self._published_at = self._makeDatetimeAttribute(attributes["published_at"])
+ if "severity" in attributes: # pragma no branch
+ self._severity = self._makeStringAttribute(attributes["severity"])
+ if "summary" in attributes: # pragma no branch
+ self._summary = self._makeStringAttribute(attributes["summary"])
+ if "updated_at" in attributes: # pragma no branch
+ assert attributes["updated_at"] is None or isinstance(attributes["updated_at"], str), attributes[
+ "updated_at"
+ ]
+ self._updated_at = self._makeDatetimeAttribute(attributes["updated_at"])
+ if "url" in attributes: # pragma no branch
+ self._url = self._makeStringAttribute(attributes["url"])
+ if "withdrawn_at" in attributes: # pragma no branch
+ assert attributes["withdrawn_at"] is None or isinstance(attributes["withdrawn_at"], str), attributes[
+ "withdrawn_at"
+ ]
+ self._withdrawn_at = self._makeDatetimeAttribute(attributes["withdrawn_at"])
diff --git a/venv/lib/python3.10/site-packages/github/AdvisoryCredit.py b/venv/lib/python3.10/site-packages/github/AdvisoryCredit.py
new file mode 100644
index 0000000000000000000000000000000000000000..9267772050dfabea2bc8f8ee429ff6ed54fa9265
--- /dev/null
+++ b/venv/lib/python3.10/site-packages/github/AdvisoryCredit.py
@@ -0,0 +1,126 @@
+############################ Copyrights and license ############################
+# #
+# Copyright 2023 Enrico Minack #
+# Copyright 2023 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
+# Copyright 2023 Jonathan Leitschuh #
+# Copyright 2023 Joseph Henrich #
+# Copyright 2023 Trim21 #
+# Copyright 2024 Enrico Minack #
+# Copyright 2024 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
+# Copyright 2025 Enrico Minack #
+# #
+# This file is part of PyGithub. #
+# http://pygithub.readthedocs.io/ #
+# #
+# PyGithub is free software: you can redistribute it and/or modify it under #
+# the terms of the GNU Lesser General Public License as published by the Free #
+# Software Foundation, either version 3 of the License, or (at your option) #
+# any later version. #
+# #
+# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY #
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS #
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more #
+# details. #
+# #
+# You should have received a copy of the GNU Lesser General Public License #
+# along with PyGithub. If not, see . #
+# #
+################################################################################
+
+from __future__ import annotations
+
+from typing import Any, Union
+
+from typing_extensions import TypedDict
+
+import github.NamedUser
+from github.GithubObject import Attribute, NonCompletableGithubObject, NotSet
+
+
+class SimpleCredit(TypedDict):
+ """
+ A simple credit for a security advisory.
+ """
+
+ login: str | github.NamedUser.NamedUser
+ type: str
+
+
+Credit = Union[SimpleCredit, "AdvisoryCredit"]
+
+
+class AdvisoryCredit(NonCompletableGithubObject):
+ """
+ This class represents a credit that is assigned to a SecurityAdvisory.
+
+ The reference can be found here
+ https://docs.github.com/en/rest/security-advisories/repository-advisories
+
+ The OpenAPI schema can be found at
+ - /components/schemas/repository-advisory/properties/credits/items
+
+ """
+
+ def _initAttributes(self) -> None:
+ self._login: Attribute[str] = NotSet
+ self._type: Attribute[str] = NotSet
+
+ def __repr__(self) -> str:
+ return self.get__repr__(
+ {
+ "login": self.login,
+ "type": self.type,
+ }
+ )
+
+ @property
+ def login(self) -> str:
+ """
+ :type: string
+ """
+ return self._login.value
+
+ @property
+ def type(self) -> str:
+ """
+ :type: string
+ """
+ return self._type.value
+
+ @staticmethod
+ def _validate_credit(credit: Credit) -> None:
+ assert isinstance(credit, (dict, AdvisoryCredit)), credit
+ if isinstance(credit, dict):
+ assert "login" in credit, credit
+ assert "type" in credit, credit
+ assert isinstance(credit["login"], (str, github.NamedUser.NamedUser)), credit["login"]
+ assert isinstance(credit["type"], str), credit["type"]
+ else:
+ assert isinstance(credit.login, str), credit.login
+ assert isinstance(credit.type, str), credit.type
+
+ @staticmethod
+ def _to_github_dict(credit: Credit) -> SimpleCredit:
+ assert isinstance(credit, (dict, AdvisoryCredit)), credit
+ if isinstance(credit, dict):
+ assert "login" in credit, credit
+ assert "type" in credit, credit
+ assert isinstance(credit["login"], (str, github.NamedUser.NamedUser)), credit["login"]
+ login = credit["login"]
+ if isinstance(login, github.NamedUser.NamedUser):
+ login = login.login
+ return {
+ "login": login,
+ "type": credit["type"],
+ }
+ else:
+ return {
+ "login": credit.login,
+ "type": credit.type,
+ }
+
+ def _useAttributes(self, attributes: dict[str, Any]) -> None:
+ if "login" in attributes: # pragma no branch
+ self._login = self._makeStringAttribute(attributes["login"])
+ if "type" in attributes: # pragma no branch
+ self._type = self._makeStringAttribute(attributes["type"])
diff --git a/venv/lib/python3.10/site-packages/github/AdvisoryCreditDetailed.py b/venv/lib/python3.10/site-packages/github/AdvisoryCreditDetailed.py
new file mode 100644
index 0000000000000000000000000000000000000000..d156843b603f830d26e756057650c05203d56383
--- /dev/null
+++ b/venv/lib/python3.10/site-packages/github/AdvisoryCreditDetailed.py
@@ -0,0 +1,104 @@
+############################ Copyrights and license ############################
+# #
+# Copyright 2012 Vincent Jacques #
+# Copyright 2012 Zearin #
+# Copyright 2013 Vincent Jacques #
+# Copyright 2014 Vincent Jacques #
+# Copyright 2016 Peter Buckley #
+# Copyright 2018 Wan Liuyang #
+# Copyright 2018 sfdye #
+# Copyright 2019 Adam Baratz #
+# Copyright 2019 Nick Campbell #
+# Copyright 2019 Steve Kowalik #
+# Copyright 2019 Wan Liuyang #
+# Copyright 2020 Steve Kowalik #
+# Copyright 2021 Steve Kowalik #
+# Copyright 2023 Enrico Minack #
+# Copyright 2023 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
+# Copyright 2023 Jonathan Leitschuh #
+# Copyright 2023 Joseph Henrich #
+# Copyright 2023 Trim21 #
+# Copyright 2024 Enrico Minack #
+# Copyright 2024 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
+# Copyright 2025 Enrico Minack #
+# #
+# This file is part of PyGithub. #
+# http://pygithub.readthedocs.io/ #
+# #
+# PyGithub is free software: you can redistribute it and/or modify it under #
+# the terms of the GNU Lesser General Public License as published by the Free #
+# Software Foundation, either version 3 of the License, or (at your option) #
+# any later version. #
+# #
+# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY #
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS #
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more #
+# details. #
+# #
+# You should have received a copy of the GNU Lesser General Public License #
+# along with PyGithub. If not, see . #
+# #
+################################################################################
+
+from __future__ import annotations
+
+from typing import Any
+
+import github.NamedUser
+from github.GithubObject import Attribute, NonCompletableGithubObject, NotSet
+
+
+class AdvisoryCreditDetailed(NonCompletableGithubObject):
+ """
+ This class represents a credit that is assigned to a SecurityAdvisory.
+
+ The reference can be found here
+ https://docs.github.com/en/rest/security-advisories/repository-advisories
+
+ The OpenAPI schema can be found at
+ - /components/schemas/global-advisory/properties/credits/items
+ - /components/schemas/repository-advisory-credit
+
+ """
+
+ def _initAttributes(self) -> None:
+ self._state: Attribute[str] = NotSet
+ self._type: Attribute[str] = NotSet
+ self._user: Attribute[github.NamedUser.NamedUser] = NotSet
+
+ def __repr__(self) -> str:
+ return self.get__repr__(
+ {
+ "user": self.user,
+ "type": self.type,
+ }
+ )
+
+ @property
+ def state(self) -> str:
+ """
+ :type: string
+ """
+ return self._state.value
+
+ @property
+ def type(self) -> str:
+ """
+ :type: string
+ """
+ return self._type.value
+
+ @property
+ def user(self) -> github.NamedUser.NamedUser:
+ """
+ :type: :class:`github.NamedUser.NamedUser`
+ """
+ return self._user.value
+
+ def _useAttributes(self, attributes: dict[str, Any]) -> None:
+ if "state" in attributes: # pragma no branch
+ self._state = self._makeStringAttribute(attributes["state"])
+ if "type" in attributes: # pragma no branch
+ self._type = self._makeStringAttribute(attributes["type"])
+ if "user" in attributes: # pragma no branch
+ self._user = self._makeClassAttribute(github.NamedUser.NamedUser, attributes["user"])
diff --git a/venv/lib/python3.10/site-packages/github/AdvisoryVulnerability.py b/venv/lib/python3.10/site-packages/github/AdvisoryVulnerability.py
new file mode 100644
index 0000000000000000000000000000000000000000..c64d29c5af94f9a0e614a06e9678dc91bac9eb17
--- /dev/null
+++ b/venv/lib/python3.10/site-packages/github/AdvisoryVulnerability.py
@@ -0,0 +1,190 @@
+############################ Copyrights and license ############################
+# #
+# Copyright 2023 Enrico Minack #
+# Copyright 2023 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
+# Copyright 2023 Jonathan Leitschuh #
+# Copyright 2023 Joseph Henrich #
+# Copyright 2023 Trim21 #
+# Copyright 2024 Enrico Minack #
+# Copyright 2024 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
+# Copyright 2025 Enrico Minack #
+# #
+# This file is part of PyGithub. #
+# http://pygithub.readthedocs.io/ #
+# #
+# PyGithub is free software: you can redistribute it and/or modify it under #
+# the terms of the GNU Lesser General Public License as published by the Free #
+# Software Foundation, either version 3 of the License, or (at your option) #
+# any later version. #
+# #
+# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY #
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS #
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more #
+# details. #
+# #
+# You should have received a copy of the GNU Lesser General Public License #
+# along with PyGithub. If not, see . #
+# #
+################################################################################
+
+from __future__ import annotations
+
+from typing import TYPE_CHECKING, Any, Union
+
+from typing_extensions import TypedDict
+
+import github.AdvisoryVulnerabilityPackage
+from github.GithubObject import Attribute, NonCompletableGithubObject, NotSet
+
+if TYPE_CHECKING:
+ from github.AdvisoryVulnerabilityPackage import AdvisoryVulnerabilityPackage
+
+
+class SimpleAdvisoryVulnerabilityPackage(TypedDict):
+ """
+ A simple package in an advisory.
+ """
+
+ ecosystem: str
+ name: str | None
+
+
+class SimpleAdvisoryVulnerability(TypedDict):
+ """
+ A simple vulnerability in a security advisory.
+ """
+
+ package: SimpleAdvisoryVulnerabilityPackage
+ patched_versions: str | None
+ vulnerable_functions: list[str] | None
+ vulnerable_version_range: str | None
+
+
+AdvisoryVulnerabilityInput = Union[SimpleAdvisoryVulnerability, "AdvisoryVulnerability"]
+
+
+class AdvisoryVulnerability(NonCompletableGithubObject):
+ """
+ This class represents a package that is vulnerable to a parent SecurityAdvisory.
+
+ The reference can be found here
+ https://docs.github.com/en/rest/security-advisories/repository-advisories
+
+ The OpenAPI schema can be found at
+ - /components/schemas/repository-advisory-vulnerability
+ - /components/schemas/vulnerability
+
+ """
+
+ def _initAttributes(self) -> None:
+ self._first_patched_version: Attribute[str] = NotSet
+ self._package: Attribute[AdvisoryVulnerabilityPackage] = NotSet
+ self._patched_versions: Attribute[str] = NotSet
+ self._vulnerable_functions: Attribute[list[str]] = NotSet
+ self._vulnerable_version_range: Attribute[str] = NotSet
+
+ def __repr__(self) -> str:
+ return self.get__repr__({"package": self.package})
+
+ @property
+ def first_patched_version(self) -> str:
+ return self._first_patched_version.value
+
+ @property
+ def package(
+ self,
+ ) -> AdvisoryVulnerabilityPackage:
+ """
+ :type: :class:`github.AdvisoryVulnerability.AdvisoryVulnerability`
+ """
+ return self._package.value
+
+ @property
+ def patched_versions(self) -> str:
+ """
+ :type: string
+ """
+ return self._patched_versions.value
+
+ @property
+ def vulnerable_functions(self) -> list[str] | None:
+ """
+ :type: list of string
+ """
+ return self._vulnerable_functions.value
+
+ @property
+ def vulnerable_version_range(self) -> str | None:
+ """
+ :type: string
+ """
+ return self._vulnerable_version_range.value
+
+ @classmethod
+ def _validate_vulnerability(cls, vulnerability: AdvisoryVulnerabilityInput) -> None:
+ assert isinstance(vulnerability, (dict, cls)), vulnerability
+ if isinstance(vulnerability, dict):
+ assert "package" in vulnerability, vulnerability
+ package: SimpleAdvisoryVulnerabilityPackage = vulnerability["package"]
+ assert isinstance(package, dict), package
+ assert "ecosystem" in package, package
+ assert isinstance(package["ecosystem"], str), package
+ assert "name" in package, package
+ assert isinstance(package["name"], (str, type(None))), package
+ assert "patched_versions" in vulnerability, vulnerability
+ assert isinstance(vulnerability["patched_versions"], (str, type(None))), vulnerability
+ assert "vulnerable_functions" in vulnerability, vulnerability
+ assert isinstance(vulnerability["vulnerable_functions"], (list, type(None))), vulnerability
+ assert "vulnerable_functions" in vulnerability, vulnerability
+ assert (
+ all(isinstance(vf, str) for vf in vulnerability["vulnerable_functions"])
+ if vulnerability["vulnerable_functions"] is not None
+ else True
+ ), vulnerability
+ assert "vulnerable_version_range" in vulnerability, vulnerability
+ assert isinstance(vulnerability["vulnerable_version_range"], (str, type(None))), vulnerability
+
+ else:
+ assert (
+ vulnerability.package is github.AdvisoryVulnerabilityPackage.AdvisoryVulnerabilityPackage
+ ), vulnerability
+
+ @staticmethod
+ def _to_github_dict(
+ vulnerability: AdvisoryVulnerabilityInput,
+ ) -> SimpleAdvisoryVulnerability:
+ if isinstance(vulnerability, dict):
+ vulnerability_package: SimpleAdvisoryVulnerabilityPackage = vulnerability["package"]
+ return {
+ "package": {
+ "ecosystem": vulnerability_package["ecosystem"],
+ "name": vulnerability_package["name"],
+ },
+ "patched_versions": vulnerability["patched_versions"],
+ "vulnerable_functions": vulnerability["vulnerable_functions"],
+ "vulnerable_version_range": vulnerability["vulnerable_version_range"],
+ }
+ return {
+ "package": {
+ "ecosystem": vulnerability.package.ecosystem,
+ "name": vulnerability.package.name,
+ },
+ "patched_versions": vulnerability.patched_versions,
+ "vulnerable_functions": vulnerability.vulnerable_functions,
+ "vulnerable_version_range": vulnerability.vulnerable_version_range,
+ }
+
+ def _useAttributes(self, attributes: dict[str, Any]) -> None:
+ if "first_patched_version" in attributes: # pragma no branch
+ self._first_patched_version = self._makeStringAttribute(attributes["first_patched_version"])
+ if "package" in attributes: # pragma no branch
+ self._package = self._makeClassAttribute(
+ github.AdvisoryVulnerabilityPackage.AdvisoryVulnerabilityPackage,
+ attributes["package"],
+ )
+ if "patched_versions" in attributes: # pragma no branch
+ self._patched_versions = self._makeStringAttribute(attributes["patched_versions"])
+ if "vulnerable_functions" in attributes: # pragma no branch
+ self._vulnerable_functions = self._makeListOfStringsAttribute(attributes["vulnerable_functions"])
+ if "vulnerable_version_range" in attributes: # pragma no branch
+ self._vulnerable_version_range = self._makeStringAttribute(attributes["vulnerable_version_range"])
diff --git a/venv/lib/python3.10/site-packages/github/AdvisoryVulnerabilityPackage.py b/venv/lib/python3.10/site-packages/github/AdvisoryVulnerabilityPackage.py
new file mode 100644
index 0000000000000000000000000000000000000000..07c85b67016679e8f39ef6be711da57e44bc1b84
--- /dev/null
+++ b/venv/lib/python3.10/site-packages/github/AdvisoryVulnerabilityPackage.py
@@ -0,0 +1,91 @@
+############################ Copyrights and license ############################
+# #
+# Copyright 2012 Vincent Jacques #
+# Copyright 2012 Zearin #
+# Copyright 2013 AKFish #
+# Copyright 2013 Vincent Jacques #
+# Copyright 2014 Vincent Jacques #
+# Copyright 2016 Jannis Gebauer #
+# Copyright 2016 Peter Buckley #
+# Copyright 2018 Wan Liuyang #
+# Copyright 2018 sfdye #
+# Copyright 2019 Steve Kowalik #
+# Copyright 2019 Wan Liuyang #
+# Copyright 2020 Steve Kowalik #
+# Copyright 2021 Steve Kowalik #
+# Copyright 2022 Eric Nieuwland #
+# Copyright 2023 Enrico Minack #
+# Copyright 2023 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
+# Copyright 2023 Jonathan Leitschuh #
+# Copyright 2023 Joseph Henrich #
+# Copyright 2023 Trim21 #
+# Copyright 2024 Enrico Minack #
+# Copyright 2024 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
+# Copyright 2024 Thomas Cooper #
+# Copyright 2025 Enrico Minack #
+# #
+# This file is part of PyGithub. #
+# http://pygithub.readthedocs.io/ #
+# #
+# PyGithub is free software: you can redistribute it and/or modify it under #
+# the terms of the GNU Lesser General Public License as published by the Free #
+# Software Foundation, either version 3 of the License, or (at your option) #
+# any later version. #
+# #
+# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY #
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS #
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more #
+# details. #
+# #
+# You should have received a copy of the GNU Lesser General Public License #
+# along with PyGithub. If not, see . #
+# #
+################################################################################
+
+from __future__ import annotations
+
+from typing import Any
+
+from github.GithubObject import Attribute, NonCompletableGithubObject, NotSet
+
+
+class AdvisoryVulnerabilityPackage(NonCompletableGithubObject):
+ """
+ This class represents an identifier for a package that is vulnerable to a parent SecurityAdvisory.
+
+ The reference can be found here
+ https://docs.github.com/en/rest/security-advisories/repository-advisories
+
+ The OpenAPI schema can be found at
+ - /components/schemas/dependabot-alert-package
+ - /components/schemas/repository-advisory-vulnerability/properties/package
+ - /components/schemas/vulnerability/properties/package
+
+ """
+
+ def _initAttributes(self) -> None:
+ self._ecosystem: Attribute[str] = NotSet
+ self._name: Attribute[str | None] = NotSet
+
+ def __repr__(self) -> str:
+ return self.get__repr__({"name": self.name})
+
+ @property
+ def ecosystem(self) -> str:
+ """
+ :type: string
+ """
+ return self._ecosystem.value
+
+ @property
+ def name(self) -> str | None:
+ """
+ :type: string or None
+ """
+ return self._name.value
+
+ def _useAttributes(self, attributes: dict[str, Any]) -> None:
+ if "ecosystem" in attributes: # pragma no branch
+ self._ecosystem = self._makeStringAttribute(attributes["ecosystem"])
+ if "name" in attributes: # pragma no branch
+ self._name = self._makeStringAttribute(attributes["name"])
diff --git a/venv/lib/python3.10/site-packages/github/AppAuthentication.py b/venv/lib/python3.10/site-packages/github/AppAuthentication.py
new file mode 100644
index 0000000000000000000000000000000000000000..6b9c3b0e8a1c31941e4b3d45b9b83f9011e954e7
--- /dev/null
+++ b/venv/lib/python3.10/site-packages/github/AppAuthentication.py
@@ -0,0 +1,57 @@
+############################ Copyrights and license ############################
+# #
+# Copyright 2012 Vincent Jacques #
+# Copyright 2012 Zearin #
+# Copyright 2013 Vincent Jacques #
+# Copyright 2014 Vincent Jacques #
+# Copyright 2016 Peter Buckley #
+# Copyright 2018 sfdye #
+# Copyright 2019 Steve Kowalik #
+# Copyright 2019 TechnicalPirate <35609336+TechnicalPirate@users.noreply.github.com>#
+# Copyright 2019 Wan Liuyang #
+# Copyright 2020 Steve Kowalik #
+# Copyright 2022 Eric Nieuwland #
+# Copyright 2023 Denis Blanchette #
+# Copyright 2023 Enrico Minack #
+# Copyright 2023 Trim21 #
+# #
+# This file is part of PyGithub. #
+# http://pygithub.readthedocs.io/ #
+# #
+# PyGithub is free software: you can redistribute it and/or modify it under #
+# the terms of the GNU Lesser General Public License as published by the Free #
+# Software Foundation, either version 3 of the License, or (at your option) #
+# any later version. #
+# #
+# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY #
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS #
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more #
+# details. #
+# #
+# You should have received a copy of the GNU Lesser General Public License #
+# along with PyGithub. If not, see . #
+# #
+################################################################################
+
+
+from typing import Dict, Optional, Union
+
+import deprecated
+
+from github.Auth import AppAuth, AppInstallationAuth
+
+
+@deprecated.deprecated("Use github.Auth.AppInstallationAuth instead")
+class AppAuthentication(AppInstallationAuth):
+ def __init__(
+ self,
+ app_id: Union[int, str],
+ private_key: str,
+ installation_id: int,
+ token_permissions: Optional[Dict[str, str]] = None,
+ ):
+ super().__init__(
+ app_auth=AppAuth(app_id, private_key),
+ installation_id=installation_id,
+ token_permissions=token_permissions,
+ )
diff --git a/venv/lib/python3.10/site-packages/github/ApplicationOAuth.py b/venv/lib/python3.10/site-packages/github/ApplicationOAuth.py
new file mode 100644
index 0000000000000000000000000000000000000000..5143aa6217d062c8f2b9d6da05462b185dabaa83
--- /dev/null
+++ b/venv/lib/python3.10/site-packages/github/ApplicationOAuth.py
@@ -0,0 +1,198 @@
+############################ Copyrights and license ############################
+# #
+# Copyright 2019 Rigas Papathanasopoulos #
+# Copyright 2020 Steve Kowalik #
+# Copyright 2021 Mark Walker #
+# Copyright 2021 Steve Kowalik #
+# Copyright 2023 Enrico Minack #
+# Copyright 2023 Trim21 #
+# Copyright 2024 Enrico Minack #
+# Copyright 2024 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
+# Copyright 2025 Enrico Minack #
+# #
+# This file is part of PyGithub. #
+# http://pygithub.readthedocs.io/ #
+# #
+# PyGithub is free software: you can redistribute it and/or modify it under #
+# the terms of the GNU Lesser General Public License as published by the Free #
+# Software Foundation, either version 3 of the License, or (at your option) #
+# any later version. #
+# #
+# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY #
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS #
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more #
+# details. #
+# #
+# You should have received a copy of the GNU Lesser General Public License #
+# along with PyGithub. If not, see . #
+# #
+################################################################################
+
+from __future__ import annotations
+
+import urllib.parse
+from typing import TYPE_CHECKING, Any
+
+import github.AccessToken
+import github.Auth
+from github.Consts import DEFAULT_BASE_URL, DEFAULT_OAUTH_URL
+from github.GithubException import BadCredentialsException, GithubException
+from github.GithubObject import Attribute, NonCompletableGithubObject, NotSet
+from github.Requester import Requester
+
+if TYPE_CHECKING:
+ from github.AccessToken import AccessToken
+ from github.Auth import AppUserAuth
+
+
+class ApplicationOAuth(NonCompletableGithubObject):
+ """
+ This class is used for identifying and authorizing users for Github Apps.
+
+ The reference can be found at
+ https://docs.github.com/en/developers/apps/building-github-apps/identifying-and-authorizing-users-for-github-apps
+
+ """
+
+ def _initAttributes(self) -> None:
+ self._client_id: Attribute[str] = NotSet
+ self._client_secret: Attribute[str] = NotSet
+
+ def __init__(
+ self,
+ requester: Requester,
+ headers: dict[str, Any],
+ attributes: Any,
+ ) -> None:
+ # this object requires a request without authentication
+ requester = requester.withAuth(auth=None)
+ super().__init__(requester, headers, attributes)
+
+ def __repr__(self) -> str:
+ return self.get__repr__({"client_id": self._client_id.value})
+
+ @property
+ def client_id(self) -> str:
+ return self._client_id.value
+
+ @property
+ def client_secret(self) -> str:
+ return self._client_secret.value
+
+ def get_oauth_url(self, path: str) -> str:
+ if not path.startswith("/"):
+ path = f"/{path}"
+
+ if self._requester.base_url == DEFAULT_BASE_URL:
+ base_url = DEFAULT_OAUTH_URL
+ else:
+ base_url = f"{self._requester.scheme}://{self._requester.hostname_and_port}/login/oauth"
+ return f"{base_url}{path}"
+
+ def get_login_url(
+ self,
+ redirect_uri: str | None = None,
+ state: str | None = None,
+ login: str | None = None,
+ ) -> str:
+ """
+ Return the URL you need to redirect a user to in order to authorize your App.
+ """
+ parameters = {"client_id": self.client_id}
+ if redirect_uri is not None:
+ assert isinstance(redirect_uri, str), redirect_uri
+ parameters["redirect_uri"] = redirect_uri
+ if state is not None:
+ assert isinstance(state, str), state
+ parameters["state"] = state
+ if login is not None:
+ assert isinstance(login, str), login
+ parameters["login"] = login
+
+ query = urllib.parse.urlencode(parameters)
+
+ return self.get_oauth_url(f"/authorize?{query}")
+
+ def get_access_token(self, code: str, state: str | None = None) -> AccessToken:
+ """
+ :calls: `POST /login/oauth/access_token `_
+ """
+ assert isinstance(code, str), code
+ post_parameters = {
+ "code": code,
+ "client_id": self.client_id,
+ "client_secret": self.client_secret,
+ }
+
+ if state is not None:
+ post_parameters["state"] = state
+
+ headers, data = self._checkError(
+ *self._requester.requestJsonAndCheck(
+ "POST",
+ self.get_oauth_url("/access_token"),
+ headers={"Accept": "application/json"},
+ input=post_parameters,
+ )
+ )
+
+ return github.AccessToken.AccessToken(
+ requester=self._requester,
+ headers=headers,
+ attributes=data,
+ )
+
+ def get_app_user_auth(self, token: AccessToken) -> AppUserAuth:
+ return github.Auth.AppUserAuth(
+ client_id=self.client_id,
+ client_secret=self.client_secret,
+ token=token.token,
+ token_type=token.type,
+ expires_at=token.expires_at,
+ refresh_token=token.refresh_token,
+ refresh_expires_at=token.refresh_expires_at,
+ requester=self._requester,
+ )
+
+ def refresh_access_token(self, refresh_token: str) -> AccessToken:
+ """
+ :calls: `POST /login/oauth/access_token `_
+ :param refresh_token: string
+ """
+ assert isinstance(refresh_token, str)
+ post_parameters = {
+ "client_id": self.client_id,
+ "client_secret": self.client_secret,
+ "grant_type": "refresh_token",
+ "refresh_token": refresh_token,
+ }
+
+ headers, data = self._checkError(
+ *self._requester.requestJsonAndCheck(
+ "POST",
+ self.get_oauth_url("/access_token"),
+ headers={"Accept": "application/json"},
+ input=post_parameters,
+ )
+ )
+
+ return github.AccessToken.AccessToken(
+ requester=self._requester,
+ headers=headers,
+ attributes=data,
+ )
+
+ @staticmethod
+ def _checkError(headers: dict[str, Any], data: Any) -> tuple[dict[str, Any], Any]:
+ if isinstance(data, dict) and "error" in data:
+ if data["error"] == "bad_verification_code":
+ raise BadCredentialsException(200, data, headers)
+ raise GithubException(200, data, headers)
+
+ return headers, data
+
+ def _useAttributes(self, attributes: dict[str, Any]) -> None:
+ if "client_id" in attributes: # pragma no branch
+ self._client_id = self._makeStringAttribute(attributes["client_id"])
+ if "client_secret" in attributes: # pragma no branch
+ self._client_secret = self._makeStringAttribute(attributes["client_secret"])
diff --git a/venv/lib/python3.10/site-packages/github/Artifact.py b/venv/lib/python3.10/site-packages/github/Artifact.py
new file mode 100644
index 0000000000000000000000000000000000000000..9431aa1f028c85c47eb49c8b692c651e007f778d
--- /dev/null
+++ b/venv/lib/python3.10/site-packages/github/Artifact.py
@@ -0,0 +1,172 @@
+############################ Copyrights and license ############################
+# #
+# Copyright 2012 Vincent Jacques #
+# Copyright 2012 Zearin #
+# Copyright 2013 AKFish #
+# Copyright 2013 Vincent Jacques #
+# Copyright 2014 Vincent Jacques #
+# Copyright 2015 Matt Babineau #
+# Copyright 2016 Jannis Gebauer #
+# Copyright 2016 Martijn Koster #
+# Copyright 2016 Peter Buckley #
+# Copyright 2018 Wan Liuyang #
+# Copyright 2018 sfdye #
+# Copyright 2019 Steve Kowalik #
+# Copyright 2019 Wan Liuyang #
+# Copyright 2020 Colby Gallup #
+# Copyright 2020 Mahesh Raju #
+# Copyright 2020 Steve Kowalik #
+# Copyright 2021 Steve Kowalik #
+# Copyright 2022 Aleksei Fedotov #
+# Copyright 2023 Enrico Minack #
+# Copyright 2023 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
+# Copyright 2023 Trim21 #
+# Copyright 2024 Enrico Minack #
+# Copyright 2024 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
+# Copyright 2025 Enrico Minack #
+# #
+# This file is part of PyGithub. #
+# http://pygithub.readthedocs.io/ #
+# #
+# PyGithub is free software: you can redistribute it and/or modify it under #
+# the terms of the GNU Lesser General Public License as published by the Free #
+# Software Foundation, either version 3 of the License, or (at your option) #
+# any later version. #
+# #
+# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY #
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS #
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more #
+# details. #
+# #
+# You should have received a copy of the GNU Lesser General Public License #
+# along with PyGithub. If not, see . #
+# #
+################################################################################
+
+from __future__ import annotations
+
+from datetime import datetime
+from typing import TYPE_CHECKING, Any
+
+import github.WorkflowRun
+from github.GithubObject import Attribute, NonCompletableGithubObject, NotSet
+
+if TYPE_CHECKING:
+ from github.WorkflowRun import WorkflowRun
+
+
+class Artifact(NonCompletableGithubObject):
+ """
+ This class represents an Artifact of Github Run.
+
+ The OpenAPI schema can be found at
+ - /components/schemas/artifact
+
+ """
+
+ def _initAttributes(self) -> None:
+ self._archive_download_url: Attribute[str] = NotSet
+ self._created_at: Attribute[datetime] = NotSet
+ self._expired: Attribute[bool] = NotSet
+ self._expires_at: Attribute[datetime] = NotSet
+ self._head_sha: Attribute[str] = NotSet
+ self._id: Attribute[int] = NotSet
+ self._name: Attribute[str] = NotSet
+ self._node_id: Attribute[str] = NotSet
+ self._size_in_bytes: Attribute[int] = NotSet
+ self._updated_at: Attribute[datetime] = NotSet
+ self._url: Attribute[str] = NotSet
+ self._workflow_run: Attribute[WorkflowRun] = NotSet
+
+ def __repr__(self) -> str:
+ return self.get__repr__({"name": self._name.value, "id": self._id.value})
+
+ @property
+ def archive_download_url(self) -> str:
+ return self._archive_download_url.value
+
+ @property
+ def created_at(self) -> datetime:
+ return self._created_at.value
+
+ @property
+ def expired(self) -> bool:
+ return self._expired.value
+
+ @property
+ def expires_at(self) -> datetime:
+ return self._expires_at.value
+
+ @property
+ def head_sha(self) -> str:
+ return self._head_sha.value
+
+ @property
+ def id(self) -> int:
+ return self._id.value
+
+ @property
+ def name(self) -> str:
+ return self._name.value
+
+ @property
+ def node_id(self) -> str:
+ return self._node_id.value
+
+ @property
+ def size_in_bytes(self) -> int:
+ return self._size_in_bytes.value
+
+ @property
+ def updated_at(self) -> datetime:
+ return self._updated_at.value
+
+ @property
+ def url(self) -> str:
+ return self._url.value
+
+ @property
+ def workflow_run(self) -> WorkflowRun:
+ return self._workflow_run.value
+
+ def delete(self) -> bool:
+ """
+ :calls: `DELETE /repos/{owner}/{repo}/actions/artifacts/{artifact_id} `_
+ """
+ status, headers, data = self._requester.requestBlob("DELETE", self.url)
+ return status == 204
+
+ def _useAttributes(self, attributes: dict[str, Any]) -> None:
+ if "archive_download_url" in attributes: # pragma no branch
+ self._archive_download_url = self._makeStringAttribute(attributes["archive_download_url"])
+ if "created_at" in attributes: # pragma no branch
+ assert attributes["created_at"] is None or isinstance(attributes["created_at"], (str,)), attributes[
+ "created_at"
+ ]
+ self._created_at = self._makeDatetimeAttribute(attributes["created_at"])
+ if "expired" in attributes: # pragma no branch
+ self._expired = self._makeBoolAttribute(attributes["expired"])
+ if "expires_at" in attributes: # pragma no branch
+ assert attributes["expires_at"] is None or isinstance(attributes["expires_at"], (str,)), attributes[
+ "expires_at"
+ ]
+ self._expires_at = self._makeDatetimeAttribute(attributes["expires_at"])
+ if "head_sha" in attributes: # pragma no branch
+ self._head_sha = self._makeStringAttribute(attributes["head_sha"])
+ if "id" in attributes: # pragma no branch
+ self._id = self._makeIntAttribute(attributes["id"])
+ if "name" in attributes: # pragma no branch
+ self._name = self._makeStringAttribute(attributes["name"])
+ if "node_id" in attributes: # pragma no branch
+ self._node_id = self._makeStringAttribute(attributes["node_id"])
+ if "size_in_bytes" in attributes: # pragma no branch
+ self._size_in_bytes = self._makeIntAttribute(attributes["size_in_bytes"])
+ if "updated_at" in attributes: # pragma no branch
+ assert attributes["updated_at"] is None or isinstance(attributes["updated_at"], (str,)), attributes[
+ "updated_at"
+ ]
+ self._updated_at = self._makeDatetimeAttribute(attributes["updated_at"])
+ if "url" in attributes: # pragma no branch
+ self._url = self._makeStringAttribute(attributes["url"])
+ if "workflow_run" in attributes: # pragma no branch
+ self._workflow_run = self._makeClassAttribute(github.WorkflowRun.WorkflowRun, attributes["workflow_run"])
diff --git a/venv/lib/python3.10/site-packages/github/Auth.py b/venv/lib/python3.10/site-packages/github/Auth.py
new file mode 100644
index 0000000000000000000000000000000000000000..7a71ec8ba198ae2fa3bda545b36bd14cdf148b42
--- /dev/null
+++ b/venv/lib/python3.10/site-packages/github/Auth.py
@@ -0,0 +1,551 @@
+############################ Copyrights and license ############################
+# #
+# Copyright 2023 Enrico Minack #
+# Copyright 2023 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
+# Copyright 2023 Trim21 #
+# Copyright 2023 chantra #
+# Copyright 2024 Enrico Minack #
+# Copyright 2024 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
+# Copyright 2024 Jonathan Kliem #
+# Copyright 2025 Enrico Minack #
+# #
+# This file is part of PyGithub. #
+# http://pygithub.readthedocs.io/ #
+# #
+# PyGithub is free software: you can redistribute it and/or modify it under #
+# the terms of the GNU Lesser General Public License as published by the Free #
+# Software Foundation, either version 3 of the License, or (at your option) #
+# any later version. #
+# #
+# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY #
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS #
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more #
+# details. #
+# #
+# You should have received a copy of the GNU Lesser General Public License #
+# along with PyGithub. If not, see . #
+# #
+################################################################################
+
+import abc
+import base64
+import time
+from abc import ABC
+from datetime import datetime, timedelta, timezone
+from typing import TYPE_CHECKING, Callable, Dict, Optional, Union
+
+import jwt
+from requests import utils
+
+from github import Consts
+from github.InstallationAuthorization import InstallationAuthorization
+from github.Requester import Requester, WithRequester
+
+if TYPE_CHECKING:
+ from github.GithubIntegration import GithubIntegration
+
+PrivateKeyGenerator = Callable[[], Union[str, bytes]]
+DictSignFunction = Callable[[dict], Union[str, bytes]]
+
+# For App authentication, time remaining before token expiration to request a new one
+ACCESS_TOKEN_REFRESH_THRESHOLD_SECONDS = 20
+TOKEN_REFRESH_THRESHOLD_TIMEDELTA = timedelta(seconds=ACCESS_TOKEN_REFRESH_THRESHOLD_SECONDS)
+
+
+# add new implementations of github.Auth.Auth to docs/utilities.rst
+class Auth(abc.ABC):
+ """
+ This class is the base class of all authentication methods for Requester.
+ """
+
+ @property
+ @abc.abstractmethod
+ def token_type(self) -> str:
+ """
+ The type of the auth token as used in the HTTP Authorization header, e.g. Bearer or Basic.
+
+ :return: token type
+
+ """
+
+ @property
+ @abc.abstractmethod
+ def token(self) -> str:
+ """
+ The auth token as used in the HTTP Authorization header.
+
+ :return: token
+
+ """
+
+ def authentication(self, headers: dict) -> None:
+ """
+ Add authorization to the headers.
+ """
+ headers["Authorization"] = f"{self.token_type} {self.token}"
+
+ def mask_authentication(self, headers: dict) -> None:
+ """
+ Mask header, e.g. for logging.
+ """
+ headers["Authorization"] = self._masked_token
+
+ @property
+ def _masked_token(self) -> str:
+ return "(unknown auth removed)"
+
+
+class HTTPBasicAuth(Auth, abc.ABC):
+ @property
+ @abc.abstractmethod
+ def username(self) -> str:
+ """
+ The username.
+ """
+
+ @property
+ @abc.abstractmethod
+ def password(self) -> str:
+ """
+ The password.
+ """
+
+ @property
+ def token_type(self) -> str:
+ return "Basic"
+
+ @property
+ def token(self) -> str:
+ return base64.b64encode(f"{self.username}:{self.password}".encode()).decode("utf-8").replace("\n", "")
+
+ @property
+ def _masked_token(self) -> str:
+ return "Basic (login and password removed)"
+
+
+class Login(HTTPBasicAuth):
+ """
+ This class is used to authenticate with login and password.
+ """
+
+ def __init__(self, login: str, password: str):
+ assert isinstance(login, str)
+ assert len(login) > 0
+ assert isinstance(password, str)
+ assert len(password) > 0
+
+ self._login = login
+ self._password = password
+
+ @property
+ def login(self) -> str:
+ return self._login
+
+ @property
+ def username(self) -> str:
+ return self.login
+
+ @property
+ def password(self) -> str:
+ return self._password
+
+
+class Token(Auth):
+ """
+ This class is used to authenticate with a single constant token.
+ """
+
+ def __init__(self, token: str):
+ assert isinstance(token, str)
+ assert len(token) > 0
+ self._token = token
+
+ @property
+ def token_type(self) -> str:
+ return "token"
+
+ @property
+ def token(self) -> str:
+ return self._token
+
+ @property
+ def _masked_token(self) -> str:
+ return "token (oauth token removed)"
+
+
+class JWT(Auth, ABC):
+ """
+ This class is the base class to authenticate with a JSON Web Token (JWT).
+
+ https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/generating-a-json-web-token-jwt-for-a-github-app
+
+ """
+
+ @property
+ def token_type(self) -> str:
+ return "Bearer"
+
+
+class JwtSigner:
+ def __init__(self, private_key_or_func: Union[str, PrivateKeyGenerator], jwt_algorithm: str):
+ self._private_key_or_func = private_key_or_func
+ self._jwt_algorithm = jwt_algorithm
+
+ def jwt_sign(self, payload: dict) -> Union[str, bytes]:
+ if callable(self._private_key_or_func):
+ private_key = self._private_key_or_func()
+ else:
+ private_key = self._private_key_or_func
+ return jwt.encode(payload, key=private_key, algorithm=self._jwt_algorithm)
+
+
+class AppAuth(JWT):
+ """
+ This class is used to authenticate as a GitHub App.
+
+ https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/authenticating-as-a-github-app
+
+ """
+
+ @staticmethod
+ def create_jwt_sign(private_key_or_func: Union[str, PrivateKeyGenerator], jwt_algorithm: str) -> DictSignFunction:
+ return JwtSigner(private_key_or_func, jwt_algorithm).jwt_sign
+
+ # v3: move * above private_key
+ def __init__(
+ self,
+ app_id: Union[int, str],
+ private_key: Optional[Union[str, PrivateKeyGenerator]] = None,
+ *,
+ sign_func: Optional[DictSignFunction] = None,
+ jwt_expiry: int = Consts.DEFAULT_JWT_EXPIRY,
+ jwt_issued_at: int = Consts.DEFAULT_JWT_ISSUED_AT,
+ ):
+ assert isinstance(app_id, (int, str)), app_id
+ if isinstance(app_id, str):
+ assert len(app_id) > 0, "app_id must not be empty"
+ assert private_key is not None or sign_func is not None, "either private_key or sign_func must be given"
+ assert private_key is None or sign_func is None, "private_key or sign_func cannot both be given"
+ if private_key is not None:
+ assert isinstance(private_key, str) or callable(private_key)
+ if isinstance(private_key, str):
+ assert len(private_key) > 0, "private_key must not be empty"
+ sign_func = AppAuth.create_jwt_sign(private_key, Consts.DEFAULT_JWT_ALGORITHM)
+ assert isinstance(jwt_expiry, int), jwt_expiry
+ assert Consts.MIN_JWT_EXPIRY <= jwt_expiry <= Consts.MAX_JWT_EXPIRY, jwt_expiry
+
+ self._app_id = app_id
+ self._sign_func = sign_func
+ self._jwt_expiry = jwt_expiry
+ self._jwt_issued_at = jwt_issued_at
+
+ @property
+ def app_id(self) -> Union[int, str]:
+ return self._app_id
+
+ @property
+ def token(self) -> str:
+ return self.create_jwt()
+
+ def get_installation_auth(
+ self,
+ installation_id: int,
+ token_permissions: Optional[Dict[str, str]] = None,
+ requester: Optional[Requester] = None,
+ ) -> "AppInstallationAuth":
+ """
+ Creates a github.Auth.AppInstallationAuth instance for an installation.
+
+ :param installation_id: installation id
+ :param token_permissions: optional permissions
+ :param requester: optional requester with app authentication
+ :return:
+
+ """
+ return AppInstallationAuth(self, installation_id, token_permissions, requester)
+
+ def create_jwt(self, expiration: Optional[int] = None) -> str:
+ """
+ Create a signed JWT
+ https://docs.github.com/en/developers/apps/building-github-apps/authenticating-with-github-apps#authenticating-as-a-github-app
+
+ :return string: jwt
+ """
+ if expiration is not None:
+ assert isinstance(expiration, int), expiration
+ assert Consts.MIN_JWT_EXPIRY <= expiration <= Consts.MAX_JWT_EXPIRY, expiration
+
+ now = int(time.time())
+ payload = {
+ "iat": now + self._jwt_issued_at,
+ "exp": now + (expiration if expiration is not None else self._jwt_expiry),
+ "iss": self._app_id,
+ }
+ assert self._sign_func is not None
+ encrypted = self._sign_func(payload)
+
+ if isinstance(encrypted, bytes):
+ return encrypted.decode("utf-8")
+ return encrypted
+
+
+class AppAuthToken(JWT):
+ """
+ This class is used to authenticate as a GitHub App with a single constant JWT.
+
+ https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/authenticating-as-a-github-app
+
+ """
+
+ def __init__(self, token: str):
+ assert isinstance(token, str)
+ assert len(token) > 0
+ self._token = token
+
+ @property
+ def token(self) -> str:
+ return self._token
+
+
+class AppInstallationAuth(Auth, WithRequester["AppInstallationAuth"]):
+ """
+ This class is used to authenticate as a GitHub App Installation.
+
+ https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/authenticating-as-a-github-app-installation
+
+ """
+
+ # used to fetch live access token when calling self.token
+ __integration: Optional["GithubIntegration"] = None
+ __installation_authorization: Optional[InstallationAuthorization] = None
+
+ def __init__(
+ self,
+ app_auth: AppAuth,
+ installation_id: int,
+ token_permissions: Optional[Dict[str, str]] = None,
+ requester: Optional[Requester] = None,
+ ):
+ super().__init__()
+
+ assert isinstance(app_auth, AppAuth), app_auth
+ assert isinstance(installation_id, int), installation_id
+ assert token_permissions is None or isinstance(token_permissions, dict), token_permissions
+ assert requester is None or isinstance(requester, Requester), requester
+
+ self._app_auth = app_auth
+ self._installation_id = installation_id
+ self._token_permissions = token_permissions
+
+ if requester is not None:
+ self.withRequester(requester)
+
+ def withRequester(self, requester: Requester) -> "AppInstallationAuth":
+ assert isinstance(requester, Requester), requester
+ super().withRequester(requester.withAuth(self._app_auth))
+
+ # imported here to avoid circular import
+ from github.GithubIntegration import GithubIntegration
+
+ self.__integration = GithubIntegration(**self.requester.kwargs)
+
+ return self
+
+ @property
+ def app_id(self) -> Union[int, str]:
+ return self._app_auth.app_id
+
+ @property
+ def installation_id(self) -> int:
+ return self._installation_id
+
+ @property
+ def token_permissions(self) -> Optional[Dict[str, str]]:
+ return self._token_permissions
+
+ @property
+ def token_type(self) -> str:
+ return "token"
+
+ @property
+ def token(self) -> str:
+ if self.__installation_authorization is None or self._is_expired:
+ self.__installation_authorization = self._get_installation_authorization()
+ return self.__installation_authorization.token
+
+ @property
+ def _is_expired(self) -> bool:
+ assert self.__installation_authorization is not None
+ token_expires_at = self.__installation_authorization.expires_at - TOKEN_REFRESH_THRESHOLD_TIMEDELTA
+ return token_expires_at < datetime.now(timezone.utc)
+
+ def _get_installation_authorization(self) -> InstallationAuthorization:
+ assert self.__integration is not None, "Method withRequester(Requester) must be called first"
+ return self.__integration.get_access_token(
+ self._installation_id,
+ permissions=self._token_permissions,
+ )
+
+ @property
+ def _masked_token(self) -> str:
+ return "token (oauth token removed)"
+
+
+class AppUserAuth(Auth, WithRequester["AppUserAuth"]):
+ """
+ This class is used to authenticate as a GitHub App on behalf of a user.
+
+ https://docs.github.com/en/apps/creating-github-apps/authenticating-with-a-github-app/authenticating-with-a-github-app-on-behalf-of-a-user
+
+ """
+
+ _client_id: str
+ _client_secret: str
+ _token: str
+ _type: str
+ _scope: Optional[str]
+ _expires_at: Optional[datetime]
+ _refresh_token: Optional[str]
+ _refresh_expires_at: Optional[datetime]
+
+ # imported here to avoid circular import
+ from github.ApplicationOAuth import ApplicationOAuth
+
+ __app: ApplicationOAuth
+
+ def __init__(
+ self,
+ client_id: str,
+ client_secret: str,
+ token: str,
+ token_type: Optional[str] = None,
+ expires_at: Optional[datetime] = None,
+ refresh_token: Optional[str] = None,
+ refresh_expires_at: Optional[datetime] = None,
+ requester: Optional[Requester] = None,
+ ) -> None:
+ super().__init__()
+
+ assert isinstance(client_id, str) and len(client_id) > 0
+ assert isinstance(client_secret, str) and len(client_secret) > 0
+ assert isinstance(token, str) and len(token) > 0
+ assert token_type is None or isinstance(token_type, str) and len(token_type) > 0, token_type
+ assert expires_at is None or isinstance(expires_at, datetime), expires_at
+ assert refresh_token is None or isinstance(refresh_token, str) and len(refresh_token) > 0
+ assert refresh_expires_at is None or isinstance(refresh_expires_at, datetime), refresh_expires_at
+ assert requester is None or isinstance(requester, Requester), requester
+
+ self._client_id = client_id
+ self._client_secret = client_secret
+ self._token = token
+ self._type = token_type or "bearer"
+ self._expires_at = expires_at
+ self._refresh_token = refresh_token
+ self._refresh_expires_at = refresh_expires_at
+
+ if requester is not None:
+ self.withRequester(requester)
+
+ @property
+ def token_type(self) -> str:
+ return self._type
+
+ @property
+ def token(self) -> str:
+ if self._is_expired:
+ self._refresh()
+ return self._token
+
+ def withRequester(self, requester: Requester) -> "AppUserAuth":
+ assert isinstance(requester, Requester), requester
+ super().withRequester(requester.withAuth(None))
+
+ # imported here to avoid circular import
+ from github.ApplicationOAuth import ApplicationOAuth
+
+ self.__app = ApplicationOAuth(
+ # take requester given to super().withRequester, not given to this method
+ super().requester,
+ headers={},
+ attributes={
+ "client_id": self._client_id,
+ "client_secret": self._client_secret,
+ },
+ )
+
+ return self
+
+ @property
+ def _is_expired(self) -> bool:
+ return self._expires_at is not None and self._expires_at < datetime.now(timezone.utc)
+
+ def _refresh(self) -> None:
+ if self._refresh_token is None:
+ raise RuntimeError("Cannot refresh expired token because no refresh token has been provided")
+ if self._refresh_expires_at is not None and self._refresh_expires_at < datetime.now(timezone.utc):
+ raise RuntimeError("Cannot refresh expired token because refresh token also expired")
+
+ # refresh token
+ token = self.__app.refresh_access_token(self._refresh_token)
+
+ # update this auth
+ self._token = token.token
+ self._type = token.type
+ self._scope = token.scope
+ self._expires_at = token.expires_at
+ self._refresh_token = token.refresh_token
+ self._refresh_expires_at = token.refresh_expires_at
+
+ @property
+ def expires_at(self) -> Optional[datetime]:
+ return self._expires_at
+
+ @property
+ def refresh_token(self) -> Optional[str]:
+ return self._refresh_token
+
+ @property
+ def refresh_expires_at(self) -> Optional[datetime]:
+ return self._refresh_expires_at
+
+ @property
+ def _masked_token(self) -> str:
+ return "Bearer (jwt removed)"
+
+
+class NetrcAuth(HTTPBasicAuth, WithRequester["NetrcAuth"]):
+ """
+ This class is used to authenticate via .netrc.
+ """
+
+ def __init__(self) -> None:
+ super().__init__()
+
+ self._login: Optional[str] = None
+ self._password: Optional[str] = None
+
+ @property
+ def username(self) -> str:
+ return self.login
+
+ @property
+ def login(self) -> str:
+ assert self._login is not None, "Method withRequester(Requester) must be called first"
+ return self._login
+
+ @property
+ def password(self) -> str:
+ assert self._password is not None, "Method withRequester(Requester) must be called first"
+ return self._password
+
+ def withRequester(self, requester: Requester) -> "NetrcAuth":
+ assert isinstance(requester, Requester), requester
+ super().withRequester(requester)
+
+ auth = utils.get_netrc_auth(requester.base_url, raise_errors=True)
+ if auth is None:
+ raise RuntimeError(f"Could not get credentials from netrc for host {requester.hostname}")
+
+ self._login, self._password = auth
+
+ return self
diff --git a/venv/lib/python3.10/site-packages/github/AuthenticatedUser.py b/venv/lib/python3.10/site-packages/github/AuthenticatedUser.py
new file mode 100644
index 0000000000000000000000000000000000000000..e1334b61f412347c202759325c73b1a7d38c578c
--- /dev/null
+++ b/venv/lib/python3.10/site-packages/github/AuthenticatedUser.py
@@ -0,0 +1,1167 @@
+############################ Copyrights and license ############################
+# #
+# Copyright 2012 Steve English #
+# Copyright 2012 Vincent Jacques #
+# Copyright 2012 Zearin #
+# Copyright 2013 AKFish #
+# Copyright 2013 Cameron White #
+# Copyright 2013 Vincent Jacques #
+# Copyright 2013 poulp #
+# Copyright 2014 Tomas Radej #
+# Copyright 2014 Vincent Jacques #
+# Copyright 2016 E. Dunham #
+# Copyright 2016 Jannis Gebauer #
+# Copyright 2016 Peter Buckley #
+# Copyright 2017 Balázs Rostás #
+# Copyright 2017 Jannis Gebauer #
+# Copyright 2017 Simon #
+# Copyright 2018 Alice GIRARD #
+# Copyright 2018 Bruce Richardson #
+# Copyright 2018 Riccardo Pittau #
+# Copyright 2018 Shubham Singh <41840111+singh811@users.noreply.github.com> #
+# Copyright 2018 Steve Kowalik #
+# Copyright 2018 Wan Liuyang #
+# Copyright 2018 bryanhuntesl <31992054+bryanhuntesl@users.noreply.github.com> #
+# Copyright 2018 sfdye #
+# Copyright 2019 Adam Baratz #
+# Copyright 2019 Jamie van Brunschot #
+# Copyright 2019 Jon Dufresne #
+# Copyright 2019 Pavan Kunisetty #
+# Copyright 2019 Rigas Papathanasopoulos #
+# Copyright 2019 Steve Kowalik #
+# Copyright 2019 Surya Teja <94suryateja@gmail.com> #
+# Copyright 2019 Wan Liuyang #
+# Copyright 2020 Anuj Bansal #
+# Copyright 2020 Glenn McDonald #
+# Copyright 2020 Steve Kowalik #
+# Copyright 2021 MeggyCal #
+# Copyright 2021 Steve Kowalik #
+# Copyright 2021 Yuya Nakamura #
+# Copyright 2021 sshekdar-VMware <87147229+sshekdar-VMware@users.noreply.github.com>#
+# Copyright 2021 秋葉 #
+# Copyright 2022 KimSia Sim <245021+simkimsia@users.noreply.github.com> #
+# Copyright 2023 Enrico Minack #
+# Copyright 2023 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
+# Copyright 2023 Jonathan Leitschuh #
+# Copyright 2023 Kevin Grandjean #
+# Copyright 2023 Mark Amery #
+# Copyright 2023 Trim21 #
+# Copyright 2023 chantra #
+# Copyright 2024 Chris Wells #
+# Copyright 2024 Eduardo Ramírez #
+# Copyright 2024 Enrico Minack #
+# Copyright 2024 Oskar Jansson <56458534+janssonoskar@users.noreply.github.com>#
+# Copyright 2025 Enrico Minack #
+# #
+# This file is part of PyGithub. #
+# http://pygithub.readthedocs.io/ #
+# #
+# PyGithub is free software: you can redistribute it and/or modify it under #
+# the terms of the GNU Lesser General Public License as published by the Free #
+# Software Foundation, either version 3 of the License, or (at your option) #
+# any later version. #
+# #
+# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY #
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS #
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more #
+# details. #
+# #
+# You should have received a copy of the GNU Lesser General Public License #
+# along with PyGithub. If not, see . #
+# #
+################################################################################
+
+from __future__ import annotations
+
+import urllib.parse
+from datetime import datetime, timezone
+from typing import TYPE_CHECKING, Any, NamedTuple
+
+import github.Authorization
+import github.Event
+import github.Gist
+import github.GithubObject
+import github.Invitation
+import github.Issue
+import github.Membership
+import github.Migration
+import github.NamedUser
+import github.Notification
+import github.Organization
+import github.Plan
+import github.Repository
+import github.UserKey
+from github import Consts
+from github.GithubObject import (
+ Attribute,
+ CompletableGithubObject,
+ NotSet,
+ Opt,
+ is_defined,
+ is_optional,
+ is_optional_list,
+ is_undefined,
+)
+from github.PaginatedList import PaginatedList
+
+if TYPE_CHECKING:
+ from github.Authorization import Authorization
+ from github.Event import Event
+ from github.Gist import Gist
+ from github.InputFileContent import InputFileContent
+ from github.Installation import Installation
+ from github.Invitation import Invitation
+ from github.Issue import Issue
+ from github.Label import Label
+ from github.Membership import Membership
+ from github.Migration import Migration
+ from github.NamedUser import NamedUser
+ from github.Notification import Notification
+ from github.Organization import Organization
+ from github.Plan import Plan
+ from github.Project import Project
+ from github.Repository import Repository
+ from github.Team import Team
+ from github.UserKey import UserKey
+
+
+class EmailData(NamedTuple):
+ email: str
+ primary: bool
+ verified: bool
+ visibility: str
+
+
+class AuthenticatedUser(CompletableGithubObject):
+ """
+ This class represents AuthenticatedUsers as returned by https://docs.github.com/en/rest/reference/users#get-the-authenticated-user
+
+ An AuthenticatedUser object can be created by calling ``get_user()`` on a Github object.
+ """
+
+ def _initAttributes(self) -> None:
+ self._avatar_url: Attribute[str] = NotSet
+ self._bio: Attribute[str] = NotSet
+ self._blog: Attribute[str] = NotSet
+ self._collaborators: Attribute[int] = NotSet
+ self._company: Attribute[str] = NotSet
+ self._created_at: Attribute[datetime] = NotSet
+ self._disk_usage: Attribute[int] = NotSet
+ self._email: Attribute[str] = NotSet
+ self._events_url: Attribute[str] = NotSet
+ self._followers: Attribute[int] = NotSet
+ self._followers_url: Attribute[str] = NotSet
+ self._following: Attribute[int] = NotSet
+ self._following_url: Attribute[str] = NotSet
+ self._gists_url: Attribute[str] = NotSet
+ self._gravatar_id: Attribute[str] = NotSet
+ self._hireable: Attribute[bool] = NotSet
+ self._html_url: Attribute[str] = NotSet
+ self._id: Attribute[int] = NotSet
+ self._location: Attribute[str] = NotSet
+ self._login: Attribute[str] = NotSet
+ self._name: Attribute[str] = NotSet
+ self._node_id: Attribute[str] = NotSet
+ self._organizations_url: Attribute[str] = NotSet
+ self._owned_private_repos: Attribute[int] = NotSet
+ self._plan: Attribute[github.Plan.Plan] = NotSet
+ self._private_gists: Attribute[int] = NotSet
+ self._public_gists: Attribute[int] = NotSet
+ self._public_repos: Attribute[int] = NotSet
+ self._received_events_url: Attribute[str] = NotSet
+ self._repos_url: Attribute[str] = NotSet
+ self._site_admin: Attribute[bool] = NotSet
+ self._starred_url: Attribute[str] = NotSet
+ self._subscriptions_url: Attribute[str] = NotSet
+ self._total_private_repos: Attribute[int] = NotSet
+ self._two_factor_authentication: Attribute[bool] = NotSet
+ self._type: Attribute[str] = NotSet
+ self._updated_at: Attribute[datetime] = NotSet
+ self._url: Attribute[str] = NotSet
+
+ def __repr__(self) -> str:
+ return self.get__repr__({"login": self._login.value})
+
+ @property
+ def avatar_url(self) -> str:
+ self._completeIfNotSet(self._avatar_url)
+ return self._avatar_url.value
+
+ @property
+ def bio(self) -> str:
+ self._completeIfNotSet(self._bio)
+ return self._bio.value
+
+ @property
+ def blog(self) -> str:
+ self._completeIfNotSet(self._blog)
+ return self._blog.value
+
+ @property
+ def collaborators(self) -> int:
+ self._completeIfNotSet(self._collaborators)
+ return self._collaborators.value
+
+ @property
+ def company(self) -> str:
+ self._completeIfNotSet(self._company)
+ return self._company.value
+
+ @property
+ def created_at(self) -> datetime:
+ self._completeIfNotSet(self._created_at)
+ return self._created_at.value
+
+ @property
+ def disk_usage(self) -> int:
+ self._completeIfNotSet(self._disk_usage)
+ return self._disk_usage.value
+
+ @property
+ def email(self) -> str:
+ self._completeIfNotSet(self._email)
+ return self._email.value
+
+ @property
+ def events_url(self) -> str:
+ self._completeIfNotSet(self._events_url)
+ return self._events_url.value
+
+ @property
+ def followers(self) -> int:
+ self._completeIfNotSet(self._followers)
+ return self._followers.value
+
+ @property
+ def followers_url(self) -> str:
+ self._completeIfNotSet(self._followers_url)
+ return self._followers_url.value
+
+ @property
+ def following(self) -> int:
+ self._completeIfNotSet(self._following)
+ return self._following.value
+
+ @property
+ def following_url(self) -> str:
+ self._completeIfNotSet(self._following_url)
+ return self._following_url.value
+
+ @property
+ def gists_url(self) -> str:
+ self._completeIfNotSet(self._gists_url)
+ return self._gists_url.value
+
+ @property
+ def gravatar_id(self) -> str:
+ self._completeIfNotSet(self._gravatar_id)
+ return self._gravatar_id.value
+
+ @property
+ def hireable(self) -> bool:
+ self._completeIfNotSet(self._hireable)
+ return self._hireable.value
+
+ @property
+ def html_url(self) -> str:
+ self._completeIfNotSet(self._html_url)
+ return self._html_url.value
+
+ @property
+ def id(self) -> int:
+ self._completeIfNotSet(self._id)
+ return self._id.value
+
+ @property
+ def location(self) -> str:
+ self._completeIfNotSet(self._location)
+ return self._location.value
+
+ @property
+ def login(self) -> str:
+ self._completeIfNotSet(self._login)
+ return self._login.value
+
+ @property
+ def name(self) -> str:
+ self._completeIfNotSet(self._name)
+ return self._name.value
+
+ @property
+ def node_id(self) -> str:
+ self._completeIfNotSet(self._node_id)
+ return self._node_id.value
+
+ @property
+ def organizations_url(self) -> str:
+ self._completeIfNotSet(self._organizations_url)
+ return self._organizations_url.value
+
+ @property
+ def owned_private_repos(self) -> int:
+ self._completeIfNotSet(self._owned_private_repos)
+ return self._owned_private_repos.value
+
+ @property
+ def plan(self) -> Plan:
+ self._completeIfNotSet(self._plan)
+ return self._plan.value
+
+ @property
+ def private_gists(self) -> int:
+ self._completeIfNotSet(self._private_gists)
+ return self._private_gists.value
+
+ @property
+ def public_gists(self) -> int:
+ self._completeIfNotSet(self._public_gists)
+ return self._public_gists.value
+
+ @property
+ def public_repos(self) -> int:
+ self._completeIfNotSet(self._public_repos)
+ return self._public_repos.value
+
+ @property
+ def received_events_url(self) -> str:
+ self._completeIfNotSet(self._received_events_url)
+ return self._received_events_url.value
+
+ @property
+ def repos_url(self) -> str:
+ self._completeIfNotSet(self._repos_url)
+ return self._repos_url.value
+
+ @property
+ def site_admin(self) -> bool:
+ self._completeIfNotSet(self._site_admin)
+ return self._site_admin.value
+
+ @property
+ def starred_url(self) -> str:
+ self._completeIfNotSet(self._starred_url)
+ return self._starred_url.value
+
+ @property
+ def subscriptions_url(self) -> str:
+ self._completeIfNotSet(self._subscriptions_url)
+ return self._subscriptions_url.value
+
+ @property
+ def total_private_repos(self) -> int:
+ self._completeIfNotSet(self._total_private_repos)
+ return self._total_private_repos.value
+
+ @property
+ def two_factor_authentication(self) -> bool:
+ self._completeIfNotSet(self._two_factor_authentication)
+ return self._two_factor_authentication.value
+
+ @property
+ def type(self) -> str:
+ self._completeIfNotSet(self._type)
+ return self._type.value
+
+ @property
+ def updated_at(self) -> datetime:
+ self._completeIfNotSet(self._updated_at)
+ return self._updated_at.value
+
+ @property
+ def url(self) -> str:
+ self._completeIfNotSet(self._url)
+ return self._url.value
+
+ def add_to_emails(self, *emails: str) -> None:
+ """
+ :calls: `POST /user/emails `_
+ """
+ assert all(isinstance(element, str) for element in emails), emails
+ post_parameters = {"emails": emails}
+ headers, data = self._requester.requestJsonAndCheck("POST", "/user/emails", input=post_parameters)
+
+ def add_to_following(self, following: NamedUser) -> None:
+ """
+ :calls: `PUT /user/following/{user} `_
+ """
+ assert isinstance(following, github.NamedUser.NamedUser), following
+ headers, data = self._requester.requestJsonAndCheck("PUT", f"/user/following/{following._identity}")
+
+ def add_to_starred(self, starred: Repository) -> None:
+ """
+ :calls: `PUT /user/starred/{owner}/{repo} `_
+ """
+ assert isinstance(starred, github.Repository.Repository), starred
+ headers, data = self._requester.requestJsonAndCheck("PUT", f"/user/starred/{starred._identity}")
+
+ def add_to_subscriptions(self, subscription: Repository) -> None:
+ """
+ :calls: `PUT /user/subscriptions/{owner}/{repo} `_
+ """
+ assert isinstance(subscription, github.Repository.Repository), subscription
+ headers, data = self._requester.requestJsonAndCheck("PUT", f"/user/subscriptions/{subscription._identity}")
+
+ def add_to_watched(self, watched: Repository) -> None:
+ """
+ :calls: `PUT /repos/{owner}/{repo}/subscription `_
+ """
+ assert isinstance(watched, github.Repository.Repository), watched
+ headers, data = self._requester.requestJsonAndCheck(
+ "PUT",
+ f"/repos/{watched._identity}/subscription",
+ input={"subscribed": True},
+ )
+
+ def create_authorization(
+ self,
+ scopes: Opt[list[str]] = NotSet,
+ note: Opt[str] = NotSet,
+ note_url: Opt[str] = NotSet,
+ client_id: Opt[str] = NotSet,
+ client_secret: Opt[str] = NotSet,
+ onetime_password: str | None = None,
+ ) -> Authorization:
+ """
+ :calls: `POST /authorizations `_
+ """
+ assert is_optional_list(scopes, str), scopes
+ assert is_optional(note, str), note
+ assert is_optional(note_url, str), note_url
+ assert is_optional(client_id, str), client_id
+ assert is_optional(client_secret, str), client_secret
+ assert onetime_password is None or isinstance(onetime_password, str), onetime_password
+ post_parameters: dict[str, Any] = NotSet.remove_unset_items(
+ {
+ "scopes": scopes,
+ "note": note,
+ "note_url": note_url,
+ "client_id": client_id,
+ "client_secret": client_secret,
+ }
+ )
+
+ if onetime_password is not None:
+ request_header = {Consts.headerOTP: onetime_password} # pragma no cover (Should be covered)
+ else:
+ request_header = None
+ headers, data = self._requester.requestJsonAndCheck(
+ "POST",
+ "/authorizations",
+ input=post_parameters,
+ headers=request_header,
+ )
+ return github.Authorization.Authorization(self._requester, headers, data, completed=True)
+
+ @staticmethod
+ def create_fork(
+ repo: Repository,
+ name: Opt[str] = NotSet,
+ default_branch_only: Opt[bool] = NotSet,
+ ) -> Repository:
+ """
+ :calls: `POST /repos/{owner}/{repo}/forks `_
+ """
+ assert isinstance(repo, github.Repository.Repository), repo
+ return repo.create_fork(
+ organization=github.GithubObject.NotSet,
+ name=name,
+ default_branch_only=default_branch_only,
+ )
+
+ def create_repo_from_template(
+ self,
+ name: str,
+ repo: Repository,
+ description: Opt[str] = NotSet,
+ include_all_branches: Opt[bool] = NotSet,
+ private: Opt[bool] = NotSet,
+ ) -> Repository:
+ """
+ :calls: `POST /repos/{template_owner}/{template_repo}/generate `_
+ """
+ assert isinstance(name, str), name
+ assert isinstance(repo, github.Repository.Repository), repo
+ assert is_optional(description, str), description
+ assert is_optional(include_all_branches, bool), include_all_branches
+ assert is_optional(private, bool), private
+ post_parameters: dict[str, Any] = NotSet.remove_unset_items(
+ {
+ "name": name,
+ "owner": self.login,
+ "description": description,
+ "include_all_branches": include_all_branches,
+ "private": private,
+ }
+ )
+
+ headers, data = self._requester.requestJsonAndCheck(
+ "POST",
+ f"/repos/{repo.owner.login}/{repo.name}/generate",
+ input=post_parameters,
+ headers={"Accept": "application/vnd.github.v3+json"},
+ )
+ return github.Repository.Repository(self._requester, headers, data, completed=True)
+
+ def create_gist(
+ self,
+ public: bool,
+ files: dict[str, InputFileContent],
+ description: Opt[str] = NotSet,
+ ) -> Gist:
+ """
+ :calls: `POST /gists `_
+ """
+ assert isinstance(public, bool), public
+ assert all(isinstance(element, github.InputFileContent) for element in files.values()), files
+ assert is_undefined(description) or isinstance(description, str), description
+ post_parameters = {
+ "public": public,
+ "files": {key: value._identity for key, value in files.items()},
+ }
+ if is_defined(description):
+ post_parameters["description"] = description
+ headers, data = self._requester.requestJsonAndCheck("POST", "/gists", input=post_parameters)
+ return github.Gist.Gist(self._requester, headers, data, completed=True)
+
+ def create_key(self, title: str, key: str) -> UserKey:
+ """
+ :calls: `POST /user/keys `_
+ :param title: string
+ :param key: string
+ :rtype: :class:`github.UserKey.UserKey`
+ """
+ assert isinstance(title, str), title
+ assert isinstance(key, str), key
+ post_parameters = {
+ "title": title,
+ "key": key,
+ }
+ headers, data = self._requester.requestJsonAndCheck("POST", "/user/keys", input=post_parameters)
+ return github.UserKey.UserKey(self._requester, headers, data, completed=True)
+
+ def create_project(self, name: str, body: Opt[str] = NotSet) -> Project:
+ """
+ :calls: `POST /user/projects `_
+ :param name: string
+ :param body: string
+ :rtype: :class:`github.Project.Project`
+ """
+ assert isinstance(name, str), name
+ assert is_undefined(body) or isinstance(body, str), body
+ post_parameters = {
+ "name": name,
+ "body": body,
+ }
+ headers, data = self._requester.requestJsonAndCheck(
+ "POST",
+ "/user/projects",
+ input=post_parameters,
+ headers={"Accept": Consts.mediaTypeProjectsPreview},
+ )
+ return github.Project.Project(self._requester, headers, data, completed=True)
+
+ def create_repo(
+ self,
+ name: str,
+ description: Opt[str] = NotSet,
+ homepage: Opt[str] = NotSet,
+ private: Opt[bool] = NotSet,
+ has_issues: Opt[bool] = NotSet,
+ has_wiki: Opt[bool] = NotSet,
+ has_downloads: Opt[bool] = NotSet,
+ has_projects: Opt[bool] = NotSet,
+ has_discussions: Opt[bool] = NotSet,
+ auto_init: Opt[bool] = NotSet,
+ license_template: Opt[str] = NotSet,
+ gitignore_template: Opt[str] = NotSet,
+ allow_squash_merge: Opt[bool] = NotSet,
+ allow_merge_commit: Opt[bool] = NotSet,
+ allow_rebase_merge: Opt[bool] = NotSet,
+ delete_branch_on_merge: Opt[bool] = NotSet,
+ ) -> Repository:
+ """
+ :calls: `POST /user/repos `_
+ """
+ assert isinstance(name, str), name
+ assert is_optional(description, str), description
+ assert is_optional(homepage, str), homepage
+ assert is_optional(private, bool), private
+ assert is_optional(has_issues, bool), has_issues
+ assert is_optional(has_wiki, bool), has_wiki
+ assert is_optional(has_downloads, bool), has_downloads
+ assert is_optional(has_projects, bool), has_projects
+ assert is_optional(has_discussions, bool), has_discussions
+ assert is_optional(auto_init, bool), auto_init
+ assert is_optional(license_template, str), license_template
+ assert is_optional(gitignore_template, str), gitignore_template
+ assert is_optional(allow_squash_merge, bool), allow_squash_merge
+ assert is_optional(allow_merge_commit, bool), allow_merge_commit
+ assert is_optional(allow_rebase_merge, bool), allow_rebase_merge
+ assert is_optional(delete_branch_on_merge, bool), delete_branch_on_merge
+ post_parameters: dict[str, Any] = NotSet.remove_unset_items(
+ {
+ "name": name,
+ "description": description,
+ "homepage": homepage,
+ "private": private,
+ "has_issues": has_issues,
+ "has_wiki": has_wiki,
+ "has_downloads": has_downloads,
+ "has_projects": has_projects,
+ "has_discussions": has_discussions,
+ "auto_init": auto_init,
+ "license_template": license_template,
+ "gitignore_template": gitignore_template,
+ "allow_squash_merge": allow_squash_merge,
+ "allow_merge_commit": allow_merge_commit,
+ "allow_rebase_merge": allow_rebase_merge,
+ "delete_branch_on_merge": delete_branch_on_merge,
+ }
+ )
+
+ headers, data = self._requester.requestJsonAndCheck("POST", "/user/repos", input=post_parameters)
+ return github.Repository.Repository(self._requester, headers, data, completed=True)
+
+ def edit(
+ self,
+ name: Opt[str] = NotSet,
+ email: Opt[str] = NotSet,
+ blog: Opt[str] = NotSet,
+ company: Opt[str] = NotSet,
+ location: Opt[str] = NotSet,
+ hireable: Opt[bool] = NotSet,
+ bio: Opt[str] = NotSet,
+ ) -> None:
+ """
+ :calls: `PATCH /user `_
+ """
+ assert is_optional(name, str), name
+ assert is_optional(email, str), email
+ assert is_optional(blog, str), blog
+ assert is_optional(company, str), company
+ assert is_optional(location, str), location
+ assert is_optional(hireable, bool), hireable
+ assert is_optional(bio, str), bio
+ post_parameters: dict[str, Any] = NotSet.remove_unset_items(
+ {
+ "name": name,
+ "email": email,
+ "blog": blog,
+ "company": company,
+ "location": location,
+ "hireable": hireable,
+ "bio": bio,
+ }
+ )
+
+ headers, data = self._requester.requestJsonAndCheck("PATCH", "/user", input=post_parameters)
+ self._useAttributes(data)
+
+ def get_authorization(self, id: int) -> Authorization:
+ """
+ :calls: `GET /authorizations/{id} `_
+ """
+ assert isinstance(id, int), id
+ headers, data = self._requester.requestJsonAndCheck("GET", f"/authorizations/{id}")
+ return github.Authorization.Authorization(self._requester, headers, data, completed=True)
+
+ def get_authorizations(self) -> PaginatedList[Authorization]:
+ """
+ :calls: `GET /authorizations `_
+ """
+ return PaginatedList(github.Authorization.Authorization, self._requester, "/authorizations", None)
+
+ def get_emails(self) -> list[EmailData]:
+ """
+ :calls: `GET /user/emails `_
+ """
+ headers, data = self._requester.requestJsonAndCheck("GET", "/user/emails")
+ return [EmailData(**item) for item in data]
+
+ def get_events(self) -> PaginatedList[Event]:
+ """
+ :calls: `GET /events `_
+ """
+ return PaginatedList(github.Event.Event, self._requester, "/events", None)
+
+ def get_followers(self) -> PaginatedList[NamedUser]:
+ """
+ :calls: `GET /user/followers `_
+ """
+ return PaginatedList(github.NamedUser.NamedUser, self._requester, "/user/followers", None)
+
+ def get_following(self) -> PaginatedList[NamedUser]:
+ """
+ :calls: `GET /user/following `_
+ """
+ return PaginatedList(github.NamedUser.NamedUser, self._requester, "/user/following", None)
+
+ def get_gists(self, since: Opt[datetime] = NotSet) -> PaginatedList[Gist]:
+ """
+ :calls: `GET /gists `_
+ :param since: datetime format YYYY-MM-DDTHH:MM:SSZ
+ :rtype: :class:`PaginatedList` of :class:`github.Gist.Gist`
+ """
+ assert is_optional(since, datetime), since
+ url_parameters: dict[str, Any] = {}
+ if is_defined(since):
+ url_parameters["since"] = since.strftime("%Y-%m-%dT%H:%M:%SZ")
+ return PaginatedList(github.Gist.Gist, self._requester, "/gists", url_parameters)
+
+ def get_issues(
+ self,
+ filter: Opt[str] = NotSet,
+ state: Opt[str] = NotSet,
+ labels: Opt[list[Label]] = NotSet,
+ sort: Opt[str] = NotSet,
+ direction: Opt[str] = NotSet,
+ since: Opt[datetime] = NotSet,
+ ) -> PaginatedList[Issue]:
+ """
+ :calls: `GET /issues `_
+ """
+ assert is_optional(filter, str), filter
+ assert is_optional(state, str), state
+ assert is_optional_list(labels, github.Label.Label), labels
+ assert is_optional(sort, str), sort
+ assert is_optional(direction, str), direction
+ assert is_optional(since, datetime), since
+ url_parameters: dict[str, Any] = {}
+ if is_defined(filter):
+ url_parameters["filter"] = filter
+ if is_defined(state):
+ url_parameters["state"] = state
+ if is_defined(labels):
+ url_parameters["labels"] = ",".join(label.name for label in labels)
+ if is_defined(sort):
+ url_parameters["sort"] = sort
+ if is_defined(direction):
+ url_parameters["direction"] = direction
+ if is_defined(since):
+ url_parameters["since"] = since.strftime("%Y-%m-%dT%H:%M:%SZ")
+ return PaginatedList(github.Issue.Issue, self._requester, "/issues", url_parameters)
+
+ def get_user_issues(
+ self,
+ filter: Opt[str] = NotSet,
+ state: Opt[str] = NotSet,
+ labels: Opt[list[Label]] = NotSet,
+ sort: Opt[str] = NotSet,
+ direction: Opt[str] = NotSet,
+ since: Opt[datetime] = NotSet,
+ ) -> PaginatedList[Issue]:
+ """
+ :calls: `GET /user/issues `_
+ """
+ assert is_optional(filter, str), filter
+ assert is_optional(state, str), state
+ assert is_optional_list(labels, github.Label.Label), labels
+ assert is_optional(sort, str), sort
+ assert is_optional(direction, str), direction
+ assert is_optional(since, datetime), since
+ url_parameters: dict[str, Any] = {}
+ if is_defined(filter):
+ url_parameters["filter"] = filter
+ if is_defined(state):
+ url_parameters["state"] = state
+ if is_defined(labels):
+ url_parameters["labels"] = ",".join(label.name for label in labels)
+ if is_defined(sort):
+ url_parameters["sort"] = sort
+ if is_defined(direction):
+ url_parameters["direction"] = direction
+ if is_defined(since):
+ url_parameters["since"] = since.strftime("%Y-%m-%dT%H:%M:%SZ")
+ return PaginatedList(github.Issue.Issue, self._requester, "/user/issues", url_parameters)
+
+ def get_key(self, id: int) -> UserKey:
+ """
+ :calls: `GET /user/keys/{id} `_
+ """
+ assert isinstance(id, int), id
+ headers, data = self._requester.requestJsonAndCheck("GET", f"/user/keys/{id}")
+ return github.UserKey.UserKey(self._requester, headers, data, completed=True)
+
+ def get_keys(self) -> PaginatedList[UserKey]:
+ """
+ :calls: `GET /user/keys `_
+ """
+ return PaginatedList(github.UserKey.UserKey, self._requester, "/user/keys", None)
+
+ def get_notification(self, id: str) -> Notification:
+ """
+ :calls: `GET /notifications/threads/{id} `_
+ """
+
+ assert isinstance(id, str), id
+ headers, data = self._requester.requestJsonAndCheck("GET", f"/notifications/threads/{id}")
+ return github.Notification.Notification(self._requester, headers, data, completed=True)
+
+ def get_notifications(
+ self,
+ all: Opt[bool] = NotSet,
+ participating: Opt[bool] = NotSet,
+ since: Opt[datetime] = NotSet,
+ before: Opt[datetime] = NotSet,
+ ) -> PaginatedList[Notification]:
+ """
+ :calls: `GET /notifications `_
+ """
+
+ assert is_optional(all, bool), all
+ assert is_optional(participating, bool), participating
+ assert is_optional(since, datetime), since
+ assert is_optional(before, datetime), before
+
+ params: dict[str, Any] = {}
+ if is_defined(all):
+ # convert True, False to true, false for api parameters
+ params["all"] = "true" if all else "false"
+ if is_defined(participating):
+ # convert True, False to true, false for api parameters
+ params["participating"] = "true" if participating else "false"
+ if is_defined(since):
+ params["since"] = since.strftime("%Y-%m-%dT%H:%M:%SZ")
+ if is_defined(before):
+ params["before"] = before.strftime("%Y-%m-%dT%H:%M:%SZ")
+
+ return PaginatedList(github.Notification.Notification, self._requester, "/notifications", params)
+
+ def get_organization_events(self, org: Organization) -> PaginatedList[Event]:
+ """
+ :calls: `GET /users/{user}/events/orgs/{org} `_
+ """
+ assert isinstance(org, github.Organization.Organization), org
+ return PaginatedList(
+ github.Event.Event,
+ self._requester,
+ f"/users/{self.login}/events/orgs/{org.login}",
+ None,
+ )
+
+ def get_orgs(self) -> PaginatedList[Organization]:
+ """
+ :calls: `GET /user/orgs `_
+ """
+ return PaginatedList(github.Organization.Organization, self._requester, "/user/orgs", None)
+
+ def get_repo(self, name: str) -> Repository:
+ """
+ :calls: `GET /repos/{owner}/{repo} `_
+ """
+ assert isinstance(name, str), name
+ name = urllib.parse.quote(name)
+ headers, data = self._requester.requestJsonAndCheck("GET", f"/repos/{self.login}/{name}")
+ return github.Repository.Repository(self._requester, headers, data, completed=True)
+
+ def get_repos(
+ self,
+ visibility: Opt[str] = NotSet,
+ affiliation: Opt[str] = NotSet,
+ type: Opt[str] = NotSet,
+ sort: Opt[str] = NotSet,
+ direction: Opt[str] = NotSet,
+ ) -> PaginatedList[Repository]:
+ """
+ :calls: `GET /user/repos `_
+ """
+ assert is_optional(visibility, str), visibility
+ assert is_optional(affiliation, str), affiliation
+ assert is_optional(type, str), type
+ assert is_optional(sort, str), sort
+ assert is_optional(direction, str), direction
+ url_parameters = NotSet.remove_unset_items(
+ {
+ "visibility": visibility,
+ "affiliation": affiliation,
+ "type": type,
+ "sort": sort,
+ "direction": direction,
+ }
+ )
+ return PaginatedList(github.Repository.Repository, self._requester, "/user/repos", url_parameters)
+
+ def get_starred(self) -> PaginatedList[Repository]:
+ """
+ :calls: `GET /user/starred `_
+ """
+ return PaginatedList(github.Repository.Repository, self._requester, "/user/starred", None)
+
+ def get_starred_gists(self) -> PaginatedList[Gist]:
+ """
+ :calls: `GET /gists/starred `_
+ """
+ return PaginatedList(github.Gist.Gist, self._requester, "/gists/starred", None)
+
+ def get_subscriptions(self) -> PaginatedList[Repository]:
+ """
+ :calls: `GET /user/subscriptions `_
+ """
+ return PaginatedList(github.Repository.Repository, self._requester, "/user/subscriptions", None)
+
+ def get_teams(self) -> PaginatedList[Team]:
+ """
+ :calls: `GET /user/teams `_
+ """
+ return PaginatedList(github.Team.Team, self._requester, "/user/teams", None)
+
+ def get_watched(self) -> PaginatedList[Repository]:
+ """
+ :calls: `GET /user/subscriptions `_
+ """
+ return PaginatedList(github.Repository.Repository, self._requester, "/user/subscriptions", None)
+
+ def get_installations(self) -> PaginatedList[Installation]:
+ """
+ :calls: `GET /user/installations `_
+ """
+ return PaginatedList(
+ github.Installation.Installation,
+ self._requester,
+ "/user/installations",
+ None,
+ headers={"Accept": Consts.mediaTypeIntegrationPreview},
+ list_item="installations",
+ )
+
+ def has_in_following(self, following: NamedUser) -> bool:
+ """
+ :calls: `GET /user/following/{user} `_
+ """
+ assert isinstance(following, github.NamedUser.NamedUser), following
+ status, headers, data = self._requester.requestJson("GET", f"/user/following/{following._identity}")
+ return status == 204
+
+ def has_in_starred(self, starred: Repository) -> bool:
+ """
+ :calls: `GET /user/starred/{owner}/{repo} `_
+ """
+ assert isinstance(starred, github.Repository.Repository), starred
+ status, headers, data = self._requester.requestJson("GET", f"/user/starred/{starred._identity}")
+ return status == 204
+
+ def has_in_subscriptions(self, subscription: Repository) -> bool:
+ """
+ :calls: `GET /user/subscriptions/{owner}/{repo} `_
+ """
+ assert isinstance(subscription, github.Repository.Repository), subscription
+ status, headers, data = self._requester.requestJson("GET", f"/user/subscriptions/{subscription._identity}")
+ return status == 204
+
+ def has_in_watched(self, watched: Repository) -> bool:
+ """
+ :calls: `GET /repos/{owner}/{repo}/subscription `_
+ """
+ assert isinstance(watched, github.Repository.Repository), watched
+ status, headers, data = self._requester.requestJson("GET", f"/repos/{watched._identity}/subscription")
+ return status == 200
+
+ def mark_notifications_as_read(self, last_read_at: datetime | None = None) -> None:
+ """
+ :calls: `PUT /notifications `_
+ """
+ if last_read_at is None:
+ last_read_at = datetime.now(timezone.utc)
+ assert isinstance(last_read_at, datetime)
+ put_parameters = {"last_read_at": last_read_at.strftime("%Y-%m-%dT%H:%M:%SZ")}
+
+ headers, data = self._requester.requestJsonAndCheck("PUT", "/notifications", input=put_parameters)
+
+ def remove_from_emails(self, *emails: str) -> None:
+ """
+ :calls: `DELETE /user/emails `_
+ """
+ assert all(isinstance(element, str) for element in emails), emails
+ post_parameters = {"emails": emails}
+ headers, data = self._requester.requestJsonAndCheck("DELETE", "/user/emails", input=post_parameters)
+
+ def remove_from_following(self, following: NamedUser) -> None:
+ """
+ :calls: `DELETE /user/following/{user} `_
+ """
+ assert isinstance(following, github.NamedUser.NamedUser), following
+ headers, data = self._requester.requestJsonAndCheck("DELETE", f"/user/following/{following._identity}")
+
+ def remove_from_starred(self, starred: Repository) -> None:
+ """
+ :calls: `DELETE /user/starred/{owner}/{repo} `_
+ """
+ assert isinstance(starred, github.Repository.Repository), starred
+ headers, data = self._requester.requestJsonAndCheck("DELETE", f"/user/starred/{starred._identity}")
+
+ def remove_from_subscriptions(self, subscription: Repository) -> None:
+ """
+ :calls: `DELETE /user/subscriptions/{owner}/{repo} `_
+ """
+ assert isinstance(subscription, github.Repository.Repository), subscription
+ headers, data = self._requester.requestJsonAndCheck("DELETE", f"/user/subscriptions/{subscription._identity}")
+
+ def remove_from_watched(self, watched: Repository) -> None:
+ """
+ :calls: `DELETE /repos/{owner}/{repo}/subscription `_
+ """
+ assert isinstance(watched, github.Repository.Repository), watched
+ headers, data = self._requester.requestJsonAndCheck("DELETE", f"/repos/{watched._identity}/subscription")
+
+ def accept_invitation(self, invitation: Invitation | int) -> None:
+ """
+ :calls: `PATCH /user/repository_invitations/{invitation_id} `_
+ """
+ assert isinstance(invitation, github.Invitation.Invitation) or isinstance(invitation, int)
+
+ if isinstance(invitation, github.Invitation.Invitation):
+ invitation = invitation.id
+
+ headers, data = self._requester.requestJsonAndCheck(
+ "PATCH", f"/user/repository_invitations/{invitation}", input={}
+ )
+
+ def get_invitations(self) -> PaginatedList[Invitation]:
+ """
+ :calls: `GET /user/repository_invitations `_
+ """
+ return PaginatedList(
+ github.Invitation.Invitation,
+ self._requester,
+ "/user/repository_invitations",
+ None,
+ )
+
+ def create_migration(
+ self,
+ repos: list[Repository] | tuple[Repository],
+ lock_repositories: Opt[bool] = NotSet,
+ exclude_attachments: Opt[bool] = NotSet,
+ ) -> Migration:
+ """
+ :calls: `POST /user/migrations `_
+ """
+ assert isinstance(repos, (list, tuple)), repos
+ assert all(isinstance(repo, str) for repo in repos), repos
+ assert is_optional(lock_repositories, bool), lock_repositories
+ assert is_optional(exclude_attachments, bool), exclude_attachments
+ post_parameters: dict[str, Any] = NotSet.remove_unset_items(
+ {
+ "repositories": repos,
+ "lock_repositories": lock_repositories,
+ "exclude_attachments": exclude_attachments,
+ }
+ )
+
+ headers, data = self._requester.requestJsonAndCheck(
+ "POST",
+ "/user/migrations",
+ input=post_parameters,
+ headers={"Accept": Consts.mediaTypeMigrationPreview},
+ )
+ return github.Migration.Migration(self._requester, headers, data, completed=True)
+
+ def get_migrations(self) -> PaginatedList[Migration]:
+ """
+ :calls: `GET /user/migrations `_
+ """
+ return PaginatedList(
+ github.Migration.Migration,
+ self._requester,
+ "/user/migrations",
+ None,
+ headers={"Accept": Consts.mediaTypeMigrationPreview},
+ )
+
+ def get_organization_memberships(self) -> PaginatedList[Membership]:
+ """
+ :calls: `GET /user/memberships/orgs/ `_
+ """
+ return PaginatedList(
+ github.Membership.Membership,
+ self._requester,
+ "/user/memberships/orgs",
+ None,
+ )
+
+ def get_organization_membership(self, org: str) -> Membership:
+ """
+ :calls: `GET /user/memberships/orgs/{org} `_
+ """
+ assert isinstance(org, str)
+ org = urllib.parse.quote(org)
+ headers, data = self._requester.requestJsonAndCheck("GET", f"/user/memberships/orgs/{org}")
+ return github.Membership.Membership(self._requester, headers, data, completed=True)
+
+ def _useAttributes(self, attributes: dict[str, Any]) -> None:
+ if "avatar_url" in attributes: # pragma no branch
+ self._avatar_url = self._makeStringAttribute(attributes["avatar_url"])
+ if "bio" in attributes: # pragma no branch
+ self._bio = self._makeStringAttribute(attributes["bio"])
+ if "blog" in attributes: # pragma no branch
+ self._blog = self._makeStringAttribute(attributes["blog"])
+ if "collaborators" in attributes: # pragma no branch
+ self._collaborators = self._makeIntAttribute(attributes["collaborators"])
+ if "company" in attributes: # pragma no branch
+ self._company = self._makeStringAttribute(attributes["company"])
+ if "created_at" in attributes: # pragma no branch
+ self._created_at = self._makeDatetimeAttribute(attributes["created_at"])
+ if "disk_usage" in attributes: # pragma no branch
+ self._disk_usage = self._makeIntAttribute(attributes["disk_usage"])
+ if "email" in attributes: # pragma no branch
+ self._email = self._makeStringAttribute(attributes["email"])
+ if "events_url" in attributes: # pragma no branch
+ self._events_url = self._makeStringAttribute(attributes["events_url"])
+ if "followers" in attributes: # pragma no branch
+ self._followers = self._makeIntAttribute(attributes["followers"])
+ if "followers_url" in attributes: # pragma no branch
+ self._followers_url = self._makeStringAttribute(attributes["followers_url"])
+ if "following" in attributes: # pragma no branch
+ self._following = self._makeIntAttribute(attributes["following"])
+ if "following_url" in attributes: # pragma no branch
+ self._following_url = self._makeStringAttribute(attributes["following_url"])
+ if "gists_url" in attributes: # pragma no branch
+ self._gists_url = self._makeStringAttribute(attributes["gists_url"])
+ if "gravatar_id" in attributes: # pragma no branch
+ self._gravatar_id = self._makeStringAttribute(attributes["gravatar_id"])
+ if "hireable" in attributes: # pragma no branch
+ self._hireable = self._makeBoolAttribute(attributes["hireable"])
+ if "html_url" in attributes: # pragma no branch
+ self._html_url = self._makeStringAttribute(attributes["html_url"])
+ if "id" in attributes: # pragma no branch
+ self._id = self._makeIntAttribute(attributes["id"])
+ if "location" in attributes: # pragma no branch
+ self._location = self._makeStringAttribute(attributes["location"])
+ if "login" in attributes: # pragma no branch
+ self._login = self._makeStringAttribute(attributes["login"])
+ if "name" in attributes: # pragma no branch
+ self._name = self._makeStringAttribute(attributes["name"])
+ if "node_id" in attributes: # pragma no branch
+ self._node_id = self._makeStringAttribute(attributes["node_id"])
+ if "organizations_url" in attributes: # pragma no branch
+ self._organizations_url = self._makeStringAttribute(attributes["organizations_url"])
+ if "owned_private_repos" in attributes: # pragma no branch
+ self._owned_private_repos = self._makeIntAttribute(attributes["owned_private_repos"])
+ if "plan" in attributes: # pragma no branch
+ self._plan = self._makeClassAttribute(github.Plan.Plan, attributes["plan"])
+ if "private_gists" in attributes: # pragma no branch
+ self._private_gists = self._makeIntAttribute(attributes["private_gists"])
+ if "public_gists" in attributes: # pragma no branch
+ self._public_gists = self._makeIntAttribute(attributes["public_gists"])
+ if "public_repos" in attributes: # pragma no branch
+ self._public_repos = self._makeIntAttribute(attributes["public_repos"])
+ if "received_events_url" in attributes: # pragma no branch
+ self._received_events_url = self._makeStringAttribute(attributes["received_events_url"])
+ if "repos_url" in attributes: # pragma no branch
+ self._repos_url = self._makeStringAttribute(attributes["repos_url"])
+ if "site_admin" in attributes: # pragma no branch
+ self._site_admin = self._makeBoolAttribute(attributes["site_admin"])
+ if "starred_url" in attributes: # pragma no branch
+ self._starred_url = self._makeStringAttribute(attributes["starred_url"])
+ if "subscriptions_url" in attributes: # pragma no branch
+ self._subscriptions_url = self._makeStringAttribute(attributes["subscriptions_url"])
+ if "total_private_repos" in attributes: # pragma no branch
+ self._total_private_repos = self._makeIntAttribute(attributes["total_private_repos"])
+ if "two_factor_authentication" in attributes:
+ self._two_factor_authentication = self._makeBoolAttribute(attributes["two_factor_authentication"])
+ if "type" in attributes: # pragma no branch
+ self._type = self._makeStringAttribute(attributes["type"])
+ if "updated_at" in attributes: # pragma no branch
+ self._updated_at = self._makeDatetimeAttribute(attributes["updated_at"])
+ if "url" in attributes: # pragma no branch
+ self._url = self._makeStringAttribute(attributes["url"])
diff --git a/venv/lib/python3.10/site-packages/github/Authorization.py b/venv/lib/python3.10/site-packages/github/Authorization.py
new file mode 100644
index 0000000000000000000000000000000000000000..2dbd2505aa990bb732959409a20bf04146183d61
--- /dev/null
+++ b/venv/lib/python3.10/site-packages/github/Authorization.py
@@ -0,0 +1,191 @@
+############################ Copyrights and license ############################
+# #
+# Copyright 2012 Vincent Jacques #
+# Copyright 2012 Zearin #
+# Copyright 2013 AKFish #
+# Copyright 2013 Vincent Jacques #
+# Copyright 2014 Vincent Jacques #
+# Copyright 2016 Jannis Gebauer #
+# Copyright 2016 Peter Buckley #
+# Copyright 2018 Wan Liuyang #
+# Copyright 2018 sfdye #
+# Copyright 2019 Steve Kowalik #
+# Copyright 2019 Wan Liuyang #
+# Copyright 2020 Steve Kowalik #
+# Copyright 2021 Steve Kowalik #
+# Copyright 2023 Enrico Minack #
+# Copyright 2023 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
+# Copyright 2023 Trim21 #
+# Copyright 2024 Enrico Minack #
+# Copyright 2024 Jirka Borovec <6035284+Borda@users.noreply.github.com> #
+# #
+# This file is part of PyGithub. #
+# http://pygithub.readthedocs.io/ #
+# #
+# PyGithub is free software: you can redistribute it and/or modify it under #
+# the terms of the GNU Lesser General Public License as published by the Free #
+# Software Foundation, either version 3 of the License, or (at your option) #
+# any later version. #
+# #
+# PyGithub is distributed in the hope that it will be useful, but WITHOUT ANY #
+# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS #
+# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more #
+# details. #
+# #
+# You should have received a copy of the GNU Lesser General Public License #
+# along with PyGithub. If not, see . #
+# #
+################################################################################
+
+from __future__ import annotations
+
+from datetime import datetime
+from typing import TYPE_CHECKING, Any
+
+import github.AuthorizationApplication
+import github.GithubObject
+from github.GithubObject import Attribute, NotSet, Opt, _NotSetType
+
+if TYPE_CHECKING:
+ from github.AuthorizationApplication import AuthorizationApplication
+
+
+class Authorization(github.GithubObject.CompletableGithubObject):
+ """
+ This class represents Authorizations.
+
+ The reference can be found here
+ https://docs.github.com/en/enterprise-server@3.0/rest/reference/oauth-authorizations
+
+ """
+
+ def _initAttributes(self) -> None:
+ self._app: Attribute[AuthorizationApplication] = NotSet
+ self._created_at: Attribute[datetime] = NotSet
+ self._id: Attribute[int] = NotSet
+ self._note: Attribute[str | None] = NotSet
+ self._note_url: Attribute[str | None] = NotSet
+ self._scopes: Attribute[str] = NotSet
+ self._token: Attribute[str] = NotSet
+ self._updated_at: Attribute[datetime] = NotSet
+ self._url: Attribute[str] = NotSet
+
+ def __repr__(self) -> str:
+ return self.get__repr__({"scopes": self._scopes.value})
+
+ @property
+ def app(self) -> AuthorizationApplication:
+ self._completeIfNotSet(self._app)
+ return self._app.value
+
+ @property
+ def created_at(self) -> datetime:
+ """
+ :type: datetime.datetime
+ """
+ self._completeIfNotSet(self._created_at)
+ return self._created_at.value
+
+ @property
+ def id(self) -> int:
+ self._completeIfNotSet(self._id)
+ return self._id.value
+
+ @property
+ def note(self) -> str | None:
+ self._completeIfNotSet(self._note)
+ return self._note.value
+
+ @property
+ def note_url(self) -> str | None:
+ self._completeIfNotSet(self._note_url)
+ return self._note_url.value
+
+ @property
+ def scopes(self) -> str:
+ self._completeIfNotSet(self._scopes)
+ return self._scopes.value
+
+ @property
+ def token(self) -> str:
+ self._completeIfNotSet(self._token)
+ return self._token.value
+
+ @property
+ def updated_at(self) -> datetime:
+ self._completeIfNotSet(self._updated_at)
+ return self._updated_at.value
+
+ @property
+ def url(self) -> str:
+ self._completeIfNotSet(self._url)
+ return self._url.value
+
+ def delete(self) -> None:
+ """
+ :calls: `DELETE /authorizations/{id} `_
+ """
+ headers, data = self._requester.requestJsonAndCheck("DELETE", self.url)
+
+ def edit(
+ self,
+ scopes: Opt[list[str]] = NotSet,
+ add_scopes: Opt[list[str]] = NotSet,
+ remove_scopes: Opt[list[str]] = NotSet,
+ note: Opt[str] = NotSet,
+ note_url: Opt[str] = NotSet,
+ ) -> None:
+ """
+ :calls: `PATCH /authorizations/{id} `_
+ :param scopes: list of string
+ :param add_scopes: list of string
+ :param remove_scopes: list of string
+ :param note: string
+ :param note_url: string
+ :rtype: None
+ """
+ assert isinstance(scopes, _NotSetType) or all(isinstance(element, str) for element in scopes), scopes
+ assert isinstance(add_scopes, _NotSetType) or all(
+ isinstance(element, str) for element in add_scopes
+ ), add_scopes
+ assert isinstance(remove_scopes, _NotSetType) or all(
+ isinstance(element, str) for element in remove_scopes
+ ), remove_scopes
+ assert isinstance(note, (_NotSetType, str)), note
+ assert isinstance(note_url, (_NotSetType, str)), note_url
+
+ post_parameters = NotSet.remove_unset_items(
+ {
+ "scopes": scopes,
+ "add_scopes": add_scopes,
+ "remove_scopes": remove_scopes,
+ "note": note,
+ "note_url": note_url,
+ }
+ )
+
+ headers, data = self._requester.requestJsonAndCheck("PATCH", self.url, input=post_parameters)
+ self._useAttributes(data)
+
+ def _useAttributes(self, attributes: dict[str, Any]) -> None:
+ if "app" in attributes: # pragma no branch
+ self._app = self._makeClassAttribute(
+ github.AuthorizationApplication.AuthorizationApplication,
+ attributes["app"],
+ )
+ if "created_at" in attributes: # pragma no branch
+ self._created_at = self._makeDatetimeAttribute(attributes["created_at"])
+ if "id" in attributes: # pragma no branch
+ self._id = self._makeIntAttribute(attributes["id"])
+ if "note" in attributes: # pragma no branch
+ self._note = self._makeStringAttribute(attributes["note"])
+ if "note_url" in attributes: # pragma no branch
+ self._note_url = self._makeStringAttribute(attributes["note_url"])
+ if "scopes" in attributes: # pragma no branch
+ self._scopes = self._makeListOfStringsAttribute(attributes["scopes"])
+ if "token" in attributes: # pragma no branch
+ self._token = self._makeStringAttribute(attributes["token"])
+ if "updated_at" in attributes: # pragma no branch
+ self._updated_at = self._makeDatetimeAttribute(attributes["updated_at"])
+ if "url" in attributes: # pragma no branch
+ self._url = self._makeStringAttribute(attributes["url"])
diff --git a/venv/lib/python3.10/site-packages/github/AuthorizationApplication.py b/venv/lib/python3.10/site-packages/github/AuthorizationApplication.py
new file mode 100644
index 0000000000000000000000000000000000000000..afeaa97a386cdc811c58724368d4a0c5648654ba
--- /dev/null
+++ b/venv/lib/python3.10/site-packages/github/AuthorizationApplication.py
@@ -0,0 +1,69 @@
+############################ Copyrights and license ############################
+# #
+# Copyright 2012 Vincent Jacques #
+# Copyright 2012 Zearin #
+# Copyright 2013 AKFish #
+# Copyright 2013 Vincent Jacques #
+# Copyright 2014 Vincent Jacques #
+# Copyright 2016 Jannis Gebauer