diff --git a/Gemfile.lock b/Gemfile.lock index cf7a31a23bd5..630d567670e4 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -141,6 +141,12 @@ PATH openproject-github_integration (1.0.0) openproject-webhooks +PATH + remote: modules/gitlab_integration + specs: + openproject-gitlab_integration (2.1.6) + openproject-webhooks + PATH remote: modules/grids specs: @@ -1225,6 +1231,7 @@ DEPENDENCIES openproject-documents! openproject-gantt! openproject-github_integration! + openproject-gitlab_integration! openproject-job_status! openproject-ldap_groups! openproject-meeting! @@ -1323,4 +1330,4 @@ RUBY VERSION ruby 3.2.3p157 BUNDLED WITH - 2.5.5 + 2.4.22 diff --git a/Gemfile.modules b/Gemfile.modules index 6e8a38a26e85..1689af163585 100644 --- a/Gemfile.modules +++ b/Gemfile.modules @@ -33,6 +33,7 @@ group :opf_plugins do gem 'openproject-two_factor_authentication', path: 'modules/two_factor_authentication' gem 'openproject-webhooks', path: 'modules/webhooks' gem 'openproject-github_integration', path: 'modules/github_integration' + gem 'openproject-gitlab_integration', path: 'modules/gitlab_integration' gem 'openproject-ldap_groups', path: 'modules/ldap_groups' gem 'openproject-recaptcha', path: 'modules/recaptcha' gem 'openproject-job_status', path: 'modules/job_status' diff --git a/modules/gitlab_integration/LICENSE b/modules/gitlab_integration/LICENSE new file mode 100644 index 000000000000..f288702d2fa1 --- /dev/null +++ b/modules/gitlab_integration/LICENSE @@ -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/modules/gitlab_integration/README.md b/modules/gitlab_integration/README.md new file mode 100644 index 000000000000..f48a136354f4 --- /dev/null +++ b/modules/gitlab_integration/README.md @@ -0,0 +1,234 @@ +## Introducing OpenProject GitLab Integration v2.1.6 GA + +
+ +Based on the OpenProject Github Integration, this plugin offers the same functionalities plus other new features. This is the first version that includes the visualization of the status of the *Pipelines* (by now, it is considered in Beta status). You can test it by activating the Pipelines event in the GitLab webhook. Just keep in mind that not all pipelines will be reflected in OpenProject, only Merge Request type pipelines (for more information see the GitLab issue https://gitlab.com/gitlab-org/gitlab/-/issues/345028). Any feedback about the pipelines feature would be very appreciated, whether it works or if issues arise (you can use this ticket https://github.com/btey/openproject-gitlab-integration/issues/43). + +In this version it has also been implemented that **all linked or referenced** Issues appear in the GitLab tab (https://github.com/btey/openproject-gitlab-integration/issues/34). The opportunity has also been taken to redesign how the information is presented so that it is visually easy to read and at the same time can continue to provide all the information, including labels and pipeline status. + +If there are labels related to the Issue or MR, a button with the label icon will appear. By clicking the button you can show/hide the associated labels. + + +

+ + +## Overview + +OpenProject module for integration with GitLab: +* Latest Gitlab release tested: **16.6.2** +* Latest OpenProject release tested: **13.1.2** (for OP v13.0.X use v2.1.2) + +The reference system is based on the same system as for GitHub integration. You can use a link to the work package or just use “OP#87” or "PP#87" in the title/description of the Issue/MR in GitLab. + +> **Note about the references.** Whether or not to include the reference in certain places depends on the information that GitLab sends through its webhook. If you include the reference in the title/description of an issue, the comments on the issue do not need to include the reference. The same will happen when you generate a Merge Request based on an Issue that already includes the reference; comments from that MR need not include the reference. + +#### Difference between OP and PP + +If you use `OP#` as a reference in an Issue or MR title, all comments will be replicated in OpenProject. However, sometimes you may only want to keep information about the status of an Issue/MR in OpenProject, but you don't want your comments to be published. In this case, you can use `PP#` as a reference. This way the comments will not be published in OpenProject. But if at any time one of your comments in a private Issue/MR is of interest to you to be published in OpenProject you can use `OP#` *directly in that comment*. So only that comment will be published in OpenProject. The rest of the comments will remain private and will not be published. + +## Available events captured in OpenProject + +OpenProject will **add comments** to work package for the following events: + +* Merge Request (Opened, Closed and Merged) +* Issue (Opened, Closed) +* Push commits in Merge Requests + * Since v2.1.5 of the plugin you can activate system hooks for Push events. +* Comments (on Issues, Merge Request, Commits and Snippets) +* Pipelines (Beta feature) + +OpenProject will **update WP status** in this events: + +* Merge Request (opened) - Status: In progress (currently ID=7) +* Merge Request (merged) - Status: Developed (currently ID=8) + +> **Note about the status.** If you want to change the ID of the status you can do this in this section of the [code](https://github.com/btey/openproject-gitlab-integration/blob/master/lib/open_project/gitlab_integration/notification_handler/merge_request_hook.rb#L40-L41). By default is *disabled*, you can enable it by setting to `true` this [lines](https://github.com/btey/openproject-gitlab-integration/blob/master/lib/open_project/gitlab_integration/notification_handler/merge_request_hook.rb#L38-L39). + +## Example workflow + +A typical workflow on GitLab side would be: + +1. **Create Issue.** + + + + > **Issue Opened:** Issue 6 New contact form - OP#18 for Scrum project has been opened by Administrator. + +2. **Comment on issue.** + + If the reference is included in the title, the comments will not need a reference. By default, all comments will use the title as a reference. + + + + > **Commented in Issue:** Administrator commented this WP in Issue 6 New contact form - OP#18 on Scrum project: + > + > New comment on the issue with attachment. + +3. **Create Merge Request.** + + + + > **MR Opened:** Merge request 25 Draft: Resolve "New contact form - OP#18" for Scrum project has been opened by Administrator. + > + > **Status** changed from _Specified_ + > **to** _In progress_ + +4. **Comment in Merge Request.** + + + + > **Commented in MR:** Administrator commented this WP in Merge request 25 Draft: Resolve "New contact form - OP#18" on Scrum project: + > + > New comment on MR. + +5. **Reference in other Issues or Merge Request (comments).** + + If the reference is NOT included in the title of the Issue/MR, the comments will need a reference. In OpenProject the comment will be saved as "referenced" in Issue/MR. + + + + > **Referenced in Issue:** Administrator referenced this WP in Issue 2 New backend pipeline on Scrum project: + > + > OP#18 New comment about... + > + > **Note:** If you use the reference `PP#` in the title of the Issue/MR, you can use `OP#` in the comment to generate the same type of comment in OpenProject. + +6. **New commit in Merge Request.** + + + + > **Pushed in MR:** Administrator pushed fca3d6fb to Scrum project at 2021-03-08T08:01:57+00:00: + > + > Update readme.md OP#18 + +7. **Comment in a new commit of the Merge Request.** + + + + > **Referenced in Commit:** Administrator referenced this WP in a Commit Note 0bf0e3e9 on Scrum project: + > + > This change is for OP#18. + +8. **Merge Request merged (generates up to 3 events).** + + + + > **Pushed in MR:** Administrator pushed 1da09cb4 to Scrum project at 2021-03-05T14:57:37+00:00: + > + > Merge branch '5-new-contact-form-op-18' into 'master' + > + > Resolve "New contact form - OP#18" + > + > Closes #6 + > + > See merge request root/scrum!9 + + + + > **MR Merged:** Merge request 24 Resolve "New contact form - OP#18" for Scrum project has been merged by Administrator. + > + > **Status** changed from _In progress_ + > **to** _Developed_ + + + + > **Issue Closed:** Issue 6 New contact form - OP#18 for Scrum project has been closed by Administrator. + +## Configuration + +You will have to configure both **OpenProject** and **Gitlab** for the integration to work. + +In case of **Docker** installation, follow the official OpenProject documentation [here](https://www.openproject.org/docs/installation-and-operations/installation/docker/#openproject-plugins). If for some reason the installation with Docker described in the official documentation does not work for you, you can try building your own docker image: +* Clone from the Openproject Repo: `git clone https://github.com/opf/openproject.git --branch=stable/13 --depth=1 .` +* Clone the plugin inside the modules folder: `git clone https://github.com/btey/openproject-gitlab-integration.git --depth=1 modules/gitlab_integration` +* Apply the changes below in Gemfile.lock and Gemfile.modules (the same ones you would do in a manual install). +* Build the container: `docker build -t openproject-docker --file=docker/prod/Dockerfile .` +* Now run the image following the official documentation. + +In case of **DEB/RPM** based instalation, follow the official OpenProject documentation [here](https://www.openproject.org/docs/installation-and-operations/configuration/plugins/). + +In case of [**manual**](https://www.openproject.org/docs/installation-and-operations/installation/manual/) installation, this plugin should be installed in the same place as the Github plugin that comes bundled with OpenProject. + +- **Github plugin path:** `modules/github_integration` + +- **Path to put Gitlab plugin:** `modules/gitlab_integration` + +But first you must modify **Gemfile.lock** and **Gemfile.modules** so that OpenProject detects the new module. + +Add the following in **Gemfile.lock**: + +```yml +PATH + remote: modules/gitlab_integration + specs: + openproject-gitlab_integration (2.1.6) + openproject-webhooks +``` + +And add this other line in DEPENDENCIES section: + +```yml +DEPENDENCIES +... + openproject-github_integration! + openproject-gitlab_integration! + openproject-job_status! +... +``` + +Add the following in **Gemfile.modules**: + +```yml +group :opf_plugins do +... + gem 'openproject-gitlab_integration', path: 'modules/gitlab_integration' +... +end +``` + +**Note:** It's possible that you need to use these commands before and after the `bundle install` if you get an error in this step warning about a change in the Gemfile: + +```shell +bundle config unset deployment +bundle install --deployment --without mysql2 sqlite development test therubyracer docker +bundle config set deployment +``` + +### The GitLab Bot user in OpenProject + +First you will need to create a user in OpenProject that will make the comments. The user will have to be added to each project with a role that allows them to comment on work packages and change status. + +Once the user is created you need to generate an OpenProject API token for it to use later on the Gitlab side: + +* Login as the newly created user. +* Go to My Account (click on Avatar in top right corner). +* Go to Access Token. +* Click on generate in the API row. +* Copy the generated key. You can now configure the necessary webhook in Gitlab. + +### The webhook in GitLab + +In GitLab you have to [set up a webhook](https://docs.gitlab.com/ee/user/project/integrations/webhooks.html#configure-a-webhook-in-gitlab) in each project or in a group ([Premium Users](https://docs.gitlab.com/ee/user/project/integrations/webhooks.html#group-webhooks)) to be integrated with OpenProject. + +You need to configure just two things in the webhook: + +1. The URL must point to your OpenProject server’s GitLab webhook endpoint (/webhooks/gitlab). Append it to the URL as a simple GET parameter named key. In the end the URL should look something like this: + + ``` + http://openproject-url.com/webhooks/gitlab?key=[previous_generated_access_token_key] + ``` + +2. Enable the required triggers: + 1. Push events (project hooks or systems hooks) + 2. Comments + 3. Issues events + 4. Merge request events + 5. Pipeline events + +Now the integration is set up on both sides and you can use it. + +> **Note:** If you are installing and configuring OpenProject on the same server as GitLab you will need to enable in Gitlab the option [`Allow requests to the local network from web hooks and services`](https://docs.gitlab.com/ee/security/webhooks.html#allow-requests-to-the-local-network-from-webhooks-and-integrations) so that it can send the data locally to the OpenProject webhook since they will be on the same machine. + +## How to report bugs or issues + +Any error, bug or issue can be reported by creating a new [issue](https://github.com/btey/openproject-gitlab-integration/issues/new). diff --git a/modules/gitlab_integration/app/models/gitlab_issue.rb b/modules/gitlab_integration/app/models/gitlab_issue.rb new file mode 100644 index 000000000000..d7fe501a8a4c --- /dev/null +++ b/modules/gitlab_integration/app/models/gitlab_issue.rb @@ -0,0 +1,86 @@ +#-- encoding: UTF-8 + +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ + +class GitlabIssue < ApplicationRecord + LABEL_KEYS = %w[color title].freeze + + has_and_belongs_to_many :work_packages + belongs_to :gitlab_user, optional: true + + enum state: { + opened: 'opened', + closed: 'closed' + } + + validates_presence_of :gitlab_html_url, + :number, + :repository, + :state, + :title, + :gitlab_updated_at + validates_presence_of :body, + unless: :partial? + validate :validate_labels_schema + + scope :without_work_package, -> { left_outer_joins(:work_packages).where(work_packages: { id: nil }) } + + def self.find_by_gitlab_identifiers(id: nil, url: nil, initialize: false) + raise ArgumentError, "needs an id or an url" if id.nil? && url.blank? + + found = where(gitlab_id: id).or(where(gitlab_html_url: url)).take + + if found + found + elsif initialize + new(gitlab_id: id, gitlab_html_url: url) + end + end + + def partial? + [body].all?(&:nil?) + end + + private + + def validate_labels_schema + return if labels.nil? + return if labels.all? { |label| label.keys.sort == LABEL_KEYS } + + errors.add(:labels, 'invalid schema') + end + + def with_logging + yield if block_given? + rescue StandardError => e + Rails.logger.error "Error at gitlab issue: #{e} #{e.message}" + raise e + end +end diff --git a/modules/gitlab_integration/app/models/gitlab_merge_request.rb b/modules/gitlab_integration/app/models/gitlab_merge_request.rb new file mode 100644 index 000000000000..4449e85810b2 --- /dev/null +++ b/modules/gitlab_integration/app/models/gitlab_merge_request.rb @@ -0,0 +1,100 @@ +#-- encoding: UTF-8 + +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ + +class GitlabMergeRequest < ApplicationRecord + LABEL_KEYS = %w[color title].freeze + + has_and_belongs_to_many :work_packages + has_many :gitlab_pipelines, dependent: :destroy + belongs_to :gitlab_user, optional: true + belongs_to :merged_by, optional: true, class_name: 'GitlabUser' + + enum state: { + opened: 'opened', + merged: 'merged', + closed: 'closed' + } + + validates_presence_of :gitlab_html_url, + :number, + :repository, + :state, + :title, + :gitlab_updated_at + validates_presence_of :body, + unless: :partial? + validate :validate_labels_schema + + scope :without_work_package, -> { left_outer_joins(:work_packages).where(work_packages: { id: nil }) } + + def self.find_by_gitlab_identifiers(id: nil, url: nil, initialize: false) + raise ArgumentError, "needs an id or an url" if id.nil? && url.blank? + + found = where(gitlab_id: id).or(where(gitlab_html_url: url)).take + + if found + found + elsif initialize + new(gitlab_id: id, gitlab_html_url: url) + end + end + + ## + # When a MR lives long enough and receives many pushes, the same pipeline CI can be run multiple times. + # This method only returns the latest. + + def latest_pipelines + with_logging do + gitlab_pipelines.select("DISTINCT ON (gitlab_pipelines.project_id, gitlab_pipelines.name) *") + .order(project_id: :asc, name: :asc, started_at: :desc) + end + end + + def partial? + [body].all?(&:nil?) + end + + private + + def validate_labels_schema + return if labels.nil? + return if labels.all? { |label| label.keys.sort == LABEL_KEYS } + + errors.add(:labels, 'invalid schema') + end + + def with_logging + yield if block_given? + rescue StandardError => e + Rails.logger.error "Error at latest_pipeline: #{e} #{e.message}" + raise e + end +end diff --git a/modules/gitlab_integration/app/models/gitlab_pipeline.rb b/modules/gitlab_integration/app/models/gitlab_pipeline.rb new file mode 100644 index 000000000000..24b4c1633122 --- /dev/null +++ b/modules/gitlab_integration/app/models/gitlab_pipeline.rb @@ -0,0 +1,58 @@ +#-- encoding: UTF-8 + +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ + +class GitlabPipeline < ApplicationRecord + belongs_to :gitlab_merge_request, touch: true + + # TODO: confirm with the gitlab documentation what are the different statuses. + enum status: { + created: 'created', + running: 'running', + success: 'success', + waiting: 'waiting', + preparing: 'preparing', + failed: 'failed', + pending: 'pending', + canceled: 'canceled', + skipped: 'skipped', + manual: 'manual', + scheduled: 'scheduled' + } + + validates_presence_of :gitlab_user_avatar_url, + :gitlab_html_url, + :gitlab_id, + :status, + :name, + :ci_details, + :commit_id, + :username +end diff --git a/modules/gitlab_integration/app/models/gitlab_user.rb b/modules/gitlab_integration/app/models/gitlab_user.rb new file mode 100644 index 000000000000..1e0015824da7 --- /dev/null +++ b/modules/gitlab_integration/app/models/gitlab_user.rb @@ -0,0 +1,40 @@ +#-- encoding: UTF-8 + +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ + +class GitlabUser < ApplicationRecord + has_many :gitlab_merge_requests + + validates_presence_of :gitlab_id, + :gitlab_name, + :gitlab_username, + :gitlab_email, + :gitlab_avatar_url +end diff --git a/modules/gitlab_integration/app/workers/cron/clear_old_merge_requests_job.rb b/modules/gitlab_integration/app/workers/cron/clear_old_merge_requests_job.rb new file mode 100644 index 000000000000..ce3806f326dc --- /dev/null +++ b/modules/gitlab_integration/app/workers/cron/clear_old_merge_requests_job.rb @@ -0,0 +1,44 @@ +#-- encoding: UTF-8 + +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ + +module Cron + class ClearOldMergeRequestsJob < CronJob + priority_number :low + + # runs at 1:25 nightly + self.cron_expression = '25 1 * * *' + + def perform + GitlabMergeRequest.without_work_package + .find_each(&:destroy!) + end + end +end diff --git a/modules/gitlab_integration/config/locales/crowdin/ar.yml b/modules/gitlab_integration/config/locales/crowdin/ar.yml new file mode 100644 index 000000000000..4640bb302244 --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/ar.yml @@ -0,0 +1,93 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +ar: + project_module_gitlab: "Gitlab" + permission_show_gitlab_content: "Show Gitlab content" + gitlab_integration: + merge_request_opened_comment: > + **MR Opened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_closed_comment: > + **MR Closed:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_merged_comment: > + **MR Merged:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been merged by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_reopened_comment: > + **MR Reopened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + note_commit_referenced_comment: > + **Referenced in Commit:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + a Commit Note [%{commit_id}](%{commit_url}) on [%{repository}](%{repository_url}): + + %{commit_note} + note_mr_referenced_comment: > + **Referenced in MR:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_mr_commented_comment: > + **Commented in MR:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_issue_referenced_comment: > + **Referenced in Issue:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_issue_commented_comment: > + **Commented in Issue:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_snippet_referenced_comment: > + **Referenced in Snippet:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Snippet %{snippet_number} [%{snippet_title}](%{snippet_url}) on [%{repository}](%{repository_url}): + + %{snippet_note} + issue_opened_referenced_comment: > + **Issue Opened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + issue_closed_referenced_comment: > + **Issue Closed:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + issue_reopened_referenced_comment: > + **Issue Reopened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + push_single_commit_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} + push_multiple_commits_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed multiple commits [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} diff --git a/modules/gitlab_integration/config/locales/crowdin/bg.yml b/modules/gitlab_integration/config/locales/crowdin/bg.yml new file mode 100644 index 000000000000..ac16b593442b --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/bg.yml @@ -0,0 +1,93 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +bg: + project_module_gitlab: "Gitlab" + permission_show_gitlab_content: "Show Gitlab content" + gitlab_integration: + merge_request_opened_comment: > + **MR Opened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_closed_comment: > + **MR Closed:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_merged_comment: > + **MR Merged:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been merged by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_reopened_comment: > + **MR Reopened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + note_commit_referenced_comment: > + **Referenced in Commit:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + a Commit Note [%{commit_id}](%{commit_url}) on [%{repository}](%{repository_url}): + + %{commit_note} + note_mr_referenced_comment: > + **Referenced in MR:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_mr_commented_comment: > + **Commented in MR:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_issue_referenced_comment: > + **Referenced in Issue:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_issue_commented_comment: > + **Commented in Issue:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_snippet_referenced_comment: > + **Referenced in Snippet:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Snippet %{snippet_number} [%{snippet_title}](%{snippet_url}) on [%{repository}](%{repository_url}): + + %{snippet_note} + issue_opened_referenced_comment: > + **Issue Opened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + issue_closed_referenced_comment: > + **Issue Closed:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + issue_reopened_referenced_comment: > + **Issue Reopened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + push_single_commit_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} + push_multiple_commits_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed multiple commits [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} diff --git a/modules/gitlab_integration/config/locales/crowdin/ca.yml b/modules/gitlab_integration/config/locales/crowdin/ca.yml new file mode 100644 index 000000000000..7c4b926621bb --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/ca.yml @@ -0,0 +1,93 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +ca: + project_module_gitlab: "Gitlab" + permission_show_gitlab_content: "Show Gitlab content" + gitlab_integration: + merge_request_opened_comment: > + **MR Opened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_closed_comment: > + **MR Closed:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_merged_comment: > + **MR Merged:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been merged by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_reopened_comment: > + **MR Reopened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + note_commit_referenced_comment: > + **Referenced in Commit:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + a Commit Note [%{commit_id}](%{commit_url}) on [%{repository}](%{repository_url}): + + %{commit_note} + note_mr_referenced_comment: > + **Referenced in MR:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_mr_commented_comment: > + **Commented in MR:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_issue_referenced_comment: > + **Referenced in Issue:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_issue_commented_comment: > + **Commented in Issue:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_snippet_referenced_comment: > + **Referenced in Snippet:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Snippet %{snippet_number} [%{snippet_title}](%{snippet_url}) on [%{repository}](%{repository_url}): + + %{snippet_note} + issue_opened_referenced_comment: > + **Issue Opened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + issue_closed_referenced_comment: > + **Issue Closed:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + issue_reopened_referenced_comment: > + **Issue Reopened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + push_single_commit_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} + push_multiple_commits_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed multiple commits [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} diff --git a/modules/gitlab_integration/config/locales/crowdin/cs.yml b/modules/gitlab_integration/config/locales/crowdin/cs.yml new file mode 100644 index 000000000000..5f7350af23d0 --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/cs.yml @@ -0,0 +1,93 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +cs: + project_module_gitlab: "Gitlab" + permission_show_gitlab_content: "Show Gitlab content" + gitlab_integration: + merge_request_opened_comment: > + **MR Opened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_closed_comment: > + **MR Closed:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_merged_comment: > + **MR Merged:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been merged by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_reopened_comment: > + **MR Reopened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + note_commit_referenced_comment: > + **Referenced in Commit:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + a Commit Note [%{commit_id}](%{commit_url}) on [%{repository}](%{repository_url}): + + %{commit_note} + note_mr_referenced_comment: > + **Referenced in MR:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_mr_commented_comment: > + **Commented in MR:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_issue_referenced_comment: > + **Referenced in Issue:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_issue_commented_comment: > + **Commented in Issue:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_snippet_referenced_comment: > + **Referenced in Snippet:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Snippet %{snippet_number} [%{snippet_title}](%{snippet_url}) on [%{repository}](%{repository_url}): + + %{snippet_note} + issue_opened_referenced_comment: > + **Issue Opened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + issue_closed_referenced_comment: > + **Issue Closed:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + issue_reopened_referenced_comment: > + **Issue Reopened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + push_single_commit_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} + push_multiple_commits_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed multiple commits [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} diff --git a/modules/gitlab_integration/config/locales/crowdin/da.yml b/modules/gitlab_integration/config/locales/crowdin/da.yml new file mode 100644 index 000000000000..f275e1d3ae93 --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/da.yml @@ -0,0 +1,93 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +da: + project_module_gitlab: "Gitlab" + permission_show_gitlab_content: "Show Gitlab content" + gitlab_integration: + merge_request_opened_comment: > + **MR Opened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_closed_comment: > + **MR Closed:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_merged_comment: > + **MR Merged:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been merged by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_reopened_comment: > + **MR Reopened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + note_commit_referenced_comment: > + **Referenced in Commit:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + a Commit Note [%{commit_id}](%{commit_url}) on [%{repository}](%{repository_url}): + + %{commit_note} + note_mr_referenced_comment: > + **Referenced in MR:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_mr_commented_comment: > + **Commented in MR:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_issue_referenced_comment: > + **Referenced in Issue:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_issue_commented_comment: > + **Commented in Issue:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_snippet_referenced_comment: > + **Referenced in Snippet:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Snippet %{snippet_number} [%{snippet_title}](%{snippet_url}) on [%{repository}](%{repository_url}): + + %{snippet_note} + issue_opened_referenced_comment: > + **Issue Opened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + issue_closed_referenced_comment: > + **Issue Closed:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + issue_reopened_referenced_comment: > + **Issue Reopened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + push_single_commit_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} + push_multiple_commits_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed multiple commits [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} diff --git a/modules/gitlab_integration/config/locales/crowdin/de.yml b/modules/gitlab_integration/config/locales/crowdin/de.yml new file mode 100644 index 000000000000..7b9219629559 --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/de.yml @@ -0,0 +1,93 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +de: + project_module_gitlab: "Gitlab" + permission_show_gitlab_content: "Show Gitlab content" + gitlab_integration: + merge_request_opened_comment: > + **MR Opened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_closed_comment: > + **MR Closed:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_merged_comment: > + **MR Merged:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been merged by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_reopened_comment: > + **MR Reopened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + note_commit_referenced_comment: > + **Referenced in Commit:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + a Commit Note [%{commit_id}](%{commit_url}) on [%{repository}](%{repository_url}): + + %{commit_note} + note_mr_referenced_comment: > + **Referenced in MR:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_mr_commented_comment: > + **Commented in MR:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_issue_referenced_comment: > + **Referenced in Issue:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_issue_commented_comment: > + **Commented in Issue:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_snippet_referenced_comment: > + **Referenced in Snippet:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Snippet %{snippet_number} [%{snippet_title}](%{snippet_url}) on [%{repository}](%{repository_url}): + + %{snippet_note} + issue_opened_referenced_comment: > + **Issue Opened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + issue_closed_referenced_comment: > + **Issue Closed:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + issue_reopened_referenced_comment: > + **Issue Reopened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + push_single_commit_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} + push_multiple_commits_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed multiple commits [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} diff --git a/modules/gitlab_integration/config/locales/crowdin/el.yml b/modules/gitlab_integration/config/locales/crowdin/el.yml new file mode 100644 index 000000000000..f98c9606f96b --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/el.yml @@ -0,0 +1,93 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +el: + project_module_gitlab: "Gitlab" + permission_show_gitlab_content: "Show Gitlab content" + gitlab_integration: + merge_request_opened_comment: > + **MR Opened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_closed_comment: > + **MR Closed:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_merged_comment: > + **MR Merged:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been merged by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_reopened_comment: > + **MR Reopened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + note_commit_referenced_comment: > + **Referenced in Commit:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + a Commit Note [%{commit_id}](%{commit_url}) on [%{repository}](%{repository_url}): + + %{commit_note} + note_mr_referenced_comment: > + **Referenced in MR:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_mr_commented_comment: > + **Commented in MR:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_issue_referenced_comment: > + **Referenced in Issue:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_issue_commented_comment: > + **Commented in Issue:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_snippet_referenced_comment: > + **Referenced in Snippet:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Snippet %{snippet_number} [%{snippet_title}](%{snippet_url}) on [%{repository}](%{repository_url}): + + %{snippet_note} + issue_opened_referenced_comment: > + **Issue Opened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + issue_closed_referenced_comment: > + **Issue Closed:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + issue_reopened_referenced_comment: > + **Issue Reopened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + push_single_commit_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} + push_multiple_commits_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed multiple commits [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} diff --git a/modules/gitlab_integration/config/locales/crowdin/es.yml b/modules/gitlab_integration/config/locales/crowdin/es.yml new file mode 100644 index 000000000000..964afa0aeb38 --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/es.yml @@ -0,0 +1,93 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +es: + project_module_gitlab: "Gitlab" + permission_show_gitlab_content: "Show Gitlab content" + gitlab_integration: + merge_request_opened_comment: > + **MR Opened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_closed_comment: > + **MR Closed:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_merged_comment: > + **MR Merged:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been merged by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_reopened_comment: > + **MR Reopened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + note_commit_referenced_comment: > + **Referenced in Commit:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + a Commit Note [%{commit_id}](%{commit_url}) on [%{repository}](%{repository_url}): + + %{commit_note} + note_mr_referenced_comment: > + **Referenced in MR:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_mr_commented_comment: > + **Commented in MR:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_issue_referenced_comment: > + **Referenced in Issue:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_issue_commented_comment: > + **Commented in Issue:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_snippet_referenced_comment: > + **Referenced in Snippet:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Snippet %{snippet_number} [%{snippet_title}](%{snippet_url}) on [%{repository}](%{repository_url}): + + %{snippet_note} + issue_opened_referenced_comment: > + **Issue Opened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + issue_closed_referenced_comment: > + **Issue Closed:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + issue_reopened_referenced_comment: > + **Issue Reopened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + push_single_commit_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} + push_multiple_commits_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed multiple commits [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} diff --git a/modules/gitlab_integration/config/locales/crowdin/fi.yml b/modules/gitlab_integration/config/locales/crowdin/fi.yml new file mode 100644 index 000000000000..c6c1df440e7b --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/fi.yml @@ -0,0 +1,93 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +fi: + project_module_gitlab: "Gitlab" + permission_show_gitlab_content: "Show Gitlab content" + gitlab_integration: + merge_request_opened_comment: > + **MR Opened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_closed_comment: > + **MR Closed:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_merged_comment: > + **MR Merged:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been merged by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_reopened_comment: > + **MR Reopened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + note_commit_referenced_comment: > + **Referenced in Commit:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + a Commit Note [%{commit_id}](%{commit_url}) on [%{repository}](%{repository_url}): + + %{commit_note} + note_mr_referenced_comment: > + **Referenced in MR:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_mr_commented_comment: > + **Commented in MR:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_issue_referenced_comment: > + **Referenced in Issue:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_issue_commented_comment: > + **Commented in Issue:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_snippet_referenced_comment: > + **Referenced in Snippet:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Snippet %{snippet_number} [%{snippet_title}](%{snippet_url}) on [%{repository}](%{repository_url}): + + %{snippet_note} + issue_opened_referenced_comment: > + **Issue Opened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + issue_closed_referenced_comment: > + **Issue Closed:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + issue_reopened_referenced_comment: > + **Issue Reopened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + push_single_commit_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} + push_multiple_commits_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed multiple commits [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} diff --git a/modules/gitlab_integration/config/locales/crowdin/fil.yml b/modules/gitlab_integration/config/locales/crowdin/fil.yml new file mode 100644 index 000000000000..b2a456b5c216 --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/fil.yml @@ -0,0 +1,93 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +fil: + project_module_gitlab: "Gitlab" + permission_show_gitlab_content: "Show Gitlab content" + gitlab_integration: + merge_request_opened_comment: > + **MR Opened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_closed_comment: > + **MR Closed:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_merged_comment: > + **MR Merged:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been merged by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_reopened_comment: > + **MR Reopened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + note_commit_referenced_comment: > + **Referenced in Commit:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + a Commit Note [%{commit_id}](%{commit_url}) on [%{repository}](%{repository_url}): + + %{commit_note} + note_mr_referenced_comment: > + **Referenced in MR:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_mr_commented_comment: > + **Commented in MR:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_issue_referenced_comment: > + **Referenced in Issue:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_issue_commented_comment: > + **Commented in Issue:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_snippet_referenced_comment: > + **Referenced in Snippet:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Snippet %{snippet_number} [%{snippet_title}](%{snippet_url}) on [%{repository}](%{repository_url}): + + %{snippet_note} + issue_opened_referenced_comment: > + **Issue Opened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + issue_closed_referenced_comment: > + **Issue Closed:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + issue_reopened_referenced_comment: > + **Issue Reopened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + push_single_commit_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} + push_multiple_commits_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed multiple commits [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} diff --git a/modules/gitlab_integration/config/locales/crowdin/fr.yml b/modules/gitlab_integration/config/locales/crowdin/fr.yml new file mode 100644 index 000000000000..fef1f113818c --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/fr.yml @@ -0,0 +1,93 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +fr: + project_module_gitlab: "Gitlab" + permission_show_gitlab_content: "Show Gitlab content" + gitlab_integration: + merge_request_opened_comment: > + **MR Opened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_closed_comment: > + **MR Closed:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_merged_comment: > + **MR Merged:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been merged by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_reopened_comment: > + **MR Reopened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + note_commit_referenced_comment: > + **Referenced in Commit:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + a Commit Note [%{commit_id}](%{commit_url}) on [%{repository}](%{repository_url}): + + %{commit_note} + note_mr_referenced_comment: > + **Referenced in MR:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_mr_commented_comment: > + **Commented in MR:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_issue_referenced_comment: > + **Referenced in Issue:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_issue_commented_comment: > + **Commented in Issue:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_snippet_referenced_comment: > + **Referenced in Snippet:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Snippet %{snippet_number} [%{snippet_title}](%{snippet_url}) on [%{repository}](%{repository_url}): + + %{snippet_note} + issue_opened_referenced_comment: > + **Issue Opened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + issue_closed_referenced_comment: > + **Issue Closed:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + issue_reopened_referenced_comment: > + **Issue Reopened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + push_single_commit_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} + push_multiple_commits_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed multiple commits [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} diff --git a/modules/gitlab_integration/config/locales/crowdin/hr.yml b/modules/gitlab_integration/config/locales/crowdin/hr.yml new file mode 100644 index 000000000000..308f94c45cd7 --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/hr.yml @@ -0,0 +1,93 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +hr: + project_module_gitlab: "Gitlab" + permission_show_gitlab_content: "Show Gitlab content" + gitlab_integration: + merge_request_opened_comment: > + **MR Opened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_closed_comment: > + **MR Closed:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_merged_comment: > + **MR Merged:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been merged by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_reopened_comment: > + **MR Reopened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + note_commit_referenced_comment: > + **Referenced in Commit:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + a Commit Note [%{commit_id}](%{commit_url}) on [%{repository}](%{repository_url}): + + %{commit_note} + note_mr_referenced_comment: > + **Referenced in MR:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_mr_commented_comment: > + **Commented in MR:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_issue_referenced_comment: > + **Referenced in Issue:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_issue_commented_comment: > + **Commented in Issue:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_snippet_referenced_comment: > + **Referenced in Snippet:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Snippet %{snippet_number} [%{snippet_title}](%{snippet_url}) on [%{repository}](%{repository_url}): + + %{snippet_note} + issue_opened_referenced_comment: > + **Issue Opened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + issue_closed_referenced_comment: > + **Issue Closed:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + issue_reopened_referenced_comment: > + **Issue Reopened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + push_single_commit_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} + push_multiple_commits_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed multiple commits [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} diff --git a/modules/gitlab_integration/config/locales/crowdin/hu.yml b/modules/gitlab_integration/config/locales/crowdin/hu.yml new file mode 100644 index 000000000000..a95e80575304 --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/hu.yml @@ -0,0 +1,93 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +hu: + project_module_gitlab: "Gitlab" + permission_show_gitlab_content: "Show Gitlab content" + gitlab_integration: + merge_request_opened_comment: > + **MR Opened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_closed_comment: > + **MR Closed:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_merged_comment: > + **MR Merged:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been merged by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_reopened_comment: > + **MR Reopened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + note_commit_referenced_comment: > + **Referenced in Commit:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + a Commit Note [%{commit_id}](%{commit_url}) on [%{repository}](%{repository_url}): + + %{commit_note} + note_mr_referenced_comment: > + **Referenced in MR:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_mr_commented_comment: > + **Commented in MR:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_issue_referenced_comment: > + **Referenced in Issue:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_issue_commented_comment: > + **Commented in Issue:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_snippet_referenced_comment: > + **Referenced in Snippet:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Snippet %{snippet_number} [%{snippet_title}](%{snippet_url}) on [%{repository}](%{repository_url}): + + %{snippet_note} + issue_opened_referenced_comment: > + **Issue Opened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + issue_closed_referenced_comment: > + **Issue Closed:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + issue_reopened_referenced_comment: > + **Issue Reopened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + push_single_commit_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} + push_multiple_commits_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed multiple commits [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} diff --git a/modules/gitlab_integration/config/locales/crowdin/id.yml b/modules/gitlab_integration/config/locales/crowdin/id.yml new file mode 100644 index 000000000000..bb4954d3c5ef --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/id.yml @@ -0,0 +1,93 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +id: + project_module_gitlab: "Gitlab" + permission_show_gitlab_content: "Show Gitlab content" + gitlab_integration: + merge_request_opened_comment: > + **MR Opened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_closed_comment: > + **MR Closed:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_merged_comment: > + **MR Merged:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been merged by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_reopened_comment: > + **MR Reopened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + note_commit_referenced_comment: > + **Referenced in Commit:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + a Commit Note [%{commit_id}](%{commit_url}) on [%{repository}](%{repository_url}): + + %{commit_note} + note_mr_referenced_comment: > + **Referenced in MR:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_mr_commented_comment: > + **Commented in MR:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_issue_referenced_comment: > + **Referenced in Issue:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_issue_commented_comment: > + **Commented in Issue:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_snippet_referenced_comment: > + **Referenced in Snippet:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Snippet %{snippet_number} [%{snippet_title}](%{snippet_url}) on [%{repository}](%{repository_url}): + + %{snippet_note} + issue_opened_referenced_comment: > + **Issue Opened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + issue_closed_referenced_comment: > + **Issue Closed:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + issue_reopened_referenced_comment: > + **Issue Reopened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + push_single_commit_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} + push_multiple_commits_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed multiple commits [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} diff --git a/modules/gitlab_integration/config/locales/crowdin/it.yml b/modules/gitlab_integration/config/locales/crowdin/it.yml new file mode 100644 index 000000000000..a10cdf8223a1 --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/it.yml @@ -0,0 +1,93 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +it: + project_module_gitlab: "Gitlab" + permission_show_gitlab_content: "Show Gitlab content" + gitlab_integration: + merge_request_opened_comment: > + **MR Opened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_closed_comment: > + **MR Closed:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_merged_comment: > + **MR Merged:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been merged by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_reopened_comment: > + **MR Reopened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + note_commit_referenced_comment: > + **Referenced in Commit:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + a Commit Note [%{commit_id}](%{commit_url}) on [%{repository}](%{repository_url}): + + %{commit_note} + note_mr_referenced_comment: > + **Referenced in MR:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_mr_commented_comment: > + **Commented in MR:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_issue_referenced_comment: > + **Referenced in Issue:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_issue_commented_comment: > + **Commented in Issue:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_snippet_referenced_comment: > + **Referenced in Snippet:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Snippet %{snippet_number} [%{snippet_title}](%{snippet_url}) on [%{repository}](%{repository_url}): + + %{snippet_note} + issue_opened_referenced_comment: > + **Issue Opened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + issue_closed_referenced_comment: > + **Issue Closed:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + issue_reopened_referenced_comment: > + **Issue Reopened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + push_single_commit_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} + push_multiple_commits_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed multiple commits [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} diff --git a/modules/gitlab_integration/config/locales/crowdin/ja.yml b/modules/gitlab_integration/config/locales/crowdin/ja.yml new file mode 100644 index 000000000000..cd098bdacdc9 --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/ja.yml @@ -0,0 +1,93 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +ja: + project_module_gitlab: "Gitlab" + permission_show_gitlab_content: "Show Gitlab content" + gitlab_integration: + merge_request_opened_comment: > + **MR Opened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_closed_comment: > + **MR Closed:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_merged_comment: > + **MR Merged:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been merged by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_reopened_comment: > + **MR Reopened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + note_commit_referenced_comment: > + **Referenced in Commit:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + a Commit Note [%{commit_id}](%{commit_url}) on [%{repository}](%{repository_url}): + + %{commit_note} + note_mr_referenced_comment: > + **Referenced in MR:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_mr_commented_comment: > + **Commented in MR:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_issue_referenced_comment: > + **Referenced in Issue:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_issue_commented_comment: > + **Commented in Issue:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_snippet_referenced_comment: > + **Referenced in Snippet:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Snippet %{snippet_number} [%{snippet_title}](%{snippet_url}) on [%{repository}](%{repository_url}): + + %{snippet_note} + issue_opened_referenced_comment: > + **Issue Opened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + issue_closed_referenced_comment: > + **Issue Closed:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + issue_reopened_referenced_comment: > + **Issue Reopened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + push_single_commit_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} + push_multiple_commits_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed multiple commits [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} diff --git a/modules/gitlab_integration/config/locales/crowdin/js-ar.yml b/modules/gitlab_integration/config/locales/crowdin/js-ar.yml new file mode 100644 index 000000000000..f575fa9efb78 --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/js-ar.yml @@ -0,0 +1,56 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +ar: + js: + gitlab_integration: + work_packages: + tab_name: "GitLab" + tab_header_issue: + title: "Issues" + tab_header_mr: + title: "Merge requests" + create_mr: + label: Create MR + description: Create a Merge Request + copy_menu: + label: Git snippets + description: Copy git snippets to clipboard + git_actions: + branch_name: Branch name + commit_message: Commit message + cmd: Create branch with empty commit + title: Quick snippets for Git + copy_success: ✅ Copied! + copy_error: ❌ Copy failed! + tab_issue: + empty: There are no issues linked yet. Link an existing issue by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the issue title/description or create a new issue. + tab_mrs: + empty: There are no merge requests linked yet. Link an existing MR by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the MR title/description or create a new MR. + gitlab_pipelines: Pipelines + updated_on: Updated on diff --git a/modules/gitlab_integration/config/locales/crowdin/js-bg.yml b/modules/gitlab_integration/config/locales/crowdin/js-bg.yml new file mode 100644 index 000000000000..78c2bb6ec51a --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/js-bg.yml @@ -0,0 +1,56 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +bg: + js: + gitlab_integration: + work_packages: + tab_name: "GitLab" + tab_header_issue: + title: "Issues" + tab_header_mr: + title: "Merge requests" + create_mr: + label: Create MR + description: Create a Merge Request + copy_menu: + label: Git snippets + description: Copy git snippets to clipboard + git_actions: + branch_name: Branch name + commit_message: Commit message + cmd: Create branch with empty commit + title: Quick snippets for Git + copy_success: ✅ Copied! + copy_error: ❌ Copy failed! + tab_issue: + empty: There are no issues linked yet. Link an existing issue by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the issue title/description or create a new issue. + tab_mrs: + empty: There are no merge requests linked yet. Link an existing MR by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the MR title/description or create a new MR. + gitlab_pipelines: Pipelines + updated_on: Updated on diff --git a/modules/gitlab_integration/config/locales/crowdin/js-ca.yml b/modules/gitlab_integration/config/locales/crowdin/js-ca.yml new file mode 100644 index 000000000000..723b26e95bc5 --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/js-ca.yml @@ -0,0 +1,56 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +ca: + js: + gitlab_integration: + work_packages: + tab_name: "GitLab" + tab_header_issue: + title: "Issues" + tab_header_mr: + title: "Merge requests" + create_mr: + label: Create MR + description: Create a Merge Request + copy_menu: + label: Git snippets + description: Copy git snippets to clipboard + git_actions: + branch_name: Branch name + commit_message: Commit message + cmd: Create branch with empty commit + title: Quick snippets for Git + copy_success: ✅ Copied! + copy_error: ❌ Copy failed! + tab_issue: + empty: There are no issues linked yet. Link an existing issue by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the issue title/description or create a new issue. + tab_mrs: + empty: There are no merge requests linked yet. Link an existing MR by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the MR title/description or create a new MR. + gitlab_pipelines: Pipelines + updated_on: Updated on diff --git a/modules/gitlab_integration/config/locales/crowdin/js-cs.yml b/modules/gitlab_integration/config/locales/crowdin/js-cs.yml new file mode 100644 index 000000000000..a8905380a2be --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/js-cs.yml @@ -0,0 +1,56 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +cs: + js: + gitlab_integration: + work_packages: + tab_name: "GitLab" + tab_header_issue: + title: "Issues" + tab_header_mr: + title: "Merge requests" + create_mr: + label: Create MR + description: Create a Merge Request + copy_menu: + label: Git snippets + description: Copy git snippets to clipboard + git_actions: + branch_name: Branch name + commit_message: Commit message + cmd: Create branch with empty commit + title: Quick snippets for Git + copy_success: ✅ Copied! + copy_error: ❌ Copy failed! + tab_issue: + empty: There are no issues linked yet. Link an existing issue by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the issue title/description or create a new issue. + tab_mrs: + empty: There are no merge requests linked yet. Link an existing MR by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the MR title/description or create a new MR. + gitlab_pipelines: Pipelines + updated_on: Updated on diff --git a/modules/gitlab_integration/config/locales/crowdin/js-da.yml b/modules/gitlab_integration/config/locales/crowdin/js-da.yml new file mode 100644 index 000000000000..c168aaeb6d57 --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/js-da.yml @@ -0,0 +1,56 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +da: + js: + gitlab_integration: + work_packages: + tab_name: "GitLab" + tab_header_issue: + title: "Issues" + tab_header_mr: + title: "Merge requests" + create_mr: + label: Create MR + description: Create a Merge Request + copy_menu: + label: Git snippets + description: Copy git snippets to clipboard + git_actions: + branch_name: Branch name + commit_message: Commit message + cmd: Create branch with empty commit + title: Quick snippets for Git + copy_success: ✅ Copied! + copy_error: ❌ Copy failed! + tab_issue: + empty: There are no issues linked yet. Link an existing issue by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the issue title/description or create a new issue. + tab_mrs: + empty: There are no merge requests linked yet. Link an existing MR by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the MR title/description or create a new MR. + gitlab_pipelines: Pipelines + updated_on: Updated on diff --git a/modules/gitlab_integration/config/locales/crowdin/js-de.yml b/modules/gitlab_integration/config/locales/crowdin/js-de.yml new file mode 100644 index 000000000000..066a38968913 --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/js-de.yml @@ -0,0 +1,56 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +de: + js: + gitlab_integration: + work_packages: + tab_name: "GitLab" + tab_header_issue: + title: "Issues" + tab_header_mr: + title: "Merge requests" + create_mr: + label: Create MR + description: Create a Merge Request + copy_menu: + label: Git snippets + description: Copy git snippets to clipboard + git_actions: + branch_name: Branch name + commit_message: Commit message + cmd: Create branch with empty commit + title: Quick snippets for Git + copy_success: ✅ Copied! + copy_error: ❌ Copy failed! + tab_issue: + empty: There are no issues linked yet. Link an existing issue by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the issue title/description or create a new issue. + tab_mrs: + empty: There are no merge requests linked yet. Link an existing MR by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the MR title/description or create a new MR. + gitlab_pipelines: Pipelines + updated_on: Updated on diff --git a/modules/gitlab_integration/config/locales/crowdin/js-el.yml b/modules/gitlab_integration/config/locales/crowdin/js-el.yml new file mode 100644 index 000000000000..6ae410420ed6 --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/js-el.yml @@ -0,0 +1,56 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +el: + js: + gitlab_integration: + work_packages: + tab_name: "GitLab" + tab_header_issue: + title: "Issues" + tab_header_mr: + title: "Merge requests" + create_mr: + label: Create MR + description: Create a Merge Request + copy_menu: + label: Git snippets + description: Copy git snippets to clipboard + git_actions: + branch_name: Branch name + commit_message: Commit message + cmd: Create branch with empty commit + title: Quick snippets for Git + copy_success: ✅ Copied! + copy_error: ❌ Copy failed! + tab_issue: + empty: There are no issues linked yet. Link an existing issue by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the issue title/description or create a new issue. + tab_mrs: + empty: There are no merge requests linked yet. Link an existing MR by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the MR title/description or create a new MR. + gitlab_pipelines: Pipelines + updated_on: Updated on diff --git a/modules/gitlab_integration/config/locales/crowdin/js-es.yml b/modules/gitlab_integration/config/locales/crowdin/js-es.yml new file mode 100644 index 000000000000..4955957a802d --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/js-es.yml @@ -0,0 +1,56 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +es: + js: + gitlab_integration: + work_packages: + tab_name: "GitLab" + tab_header_issue: + title: "Issues" + tab_header_mr: + title: "Merge requests" + create_mr: + label: Create MR + description: Create a Merge Request + copy_menu: + label: Git snippets + description: Copy git snippets to clipboard + git_actions: + branch_name: Branch name + commit_message: Commit message + cmd: Create branch with empty commit + title: Quick snippets for Git + copy_success: ✅ Copied! + copy_error: ❌ Copy failed! + tab_issue: + empty: There are no issues linked yet. Link an existing issue by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the issue title/description or create a new issue. + tab_mrs: + empty: There are no merge requests linked yet. Link an existing MR by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the MR title/description or create a new MR. + gitlab_pipelines: Pipelines + updated_on: Updated on diff --git a/modules/gitlab_integration/config/locales/crowdin/js-fi.yml b/modules/gitlab_integration/config/locales/crowdin/js-fi.yml new file mode 100644 index 000000000000..007068090482 --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/js-fi.yml @@ -0,0 +1,56 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +fi: + js: + gitlab_integration: + work_packages: + tab_name: "GitLab" + tab_header_issue: + title: "Issues" + tab_header_mr: + title: "Merge requests" + create_mr: + label: Create MR + description: Create a Merge Request + copy_menu: + label: Git snippets + description: Copy git snippets to clipboard + git_actions: + branch_name: Branch name + commit_message: Commit message + cmd: Create branch with empty commit + title: Quick snippets for Git + copy_success: ✅ Copied! + copy_error: ❌ Copy failed! + tab_issue: + empty: There are no issues linked yet. Link an existing issue by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the issue title/description or create a new issue. + tab_mrs: + empty: There are no merge requests linked yet. Link an existing MR by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the MR title/description or create a new MR. + gitlab_pipelines: Pipelines + updated_on: Updated on diff --git a/modules/gitlab_integration/config/locales/crowdin/js-fil.yml b/modules/gitlab_integration/config/locales/crowdin/js-fil.yml new file mode 100644 index 000000000000..5df298917221 --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/js-fil.yml @@ -0,0 +1,56 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +fil: + js: + gitlab_integration: + work_packages: + tab_name: "GitLab" + tab_header_issue: + title: "Issues" + tab_header_mr: + title: "Merge requests" + create_mr: + label: Create MR + description: Create a Merge Request + copy_menu: + label: Git snippets + description: Copy git snippets to clipboard + git_actions: + branch_name: Branch name + commit_message: Commit message + cmd: Create branch with empty commit + title: Quick snippets for Git + copy_success: ✅ Copied! + copy_error: ❌ Copy failed! + tab_issue: + empty: There are no issues linked yet. Link an existing issue by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the issue title/description or create a new issue. + tab_mrs: + empty: There are no merge requests linked yet. Link an existing MR by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the MR title/description or create a new MR. + gitlab_pipelines: Pipelines + updated_on: Updated on diff --git a/modules/gitlab_integration/config/locales/crowdin/js-fr.yml b/modules/gitlab_integration/config/locales/crowdin/js-fr.yml new file mode 100644 index 000000000000..a4cc350aacd5 --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/js-fr.yml @@ -0,0 +1,56 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +fr: + js: + gitlab_integration: + work_packages: + tab_name: "GitLab" + tab_header_issue: + title: "Issues" + tab_header_mr: + title: "Merge requests" + create_mr: + label: Create MR + description: Create a Merge Request + copy_menu: + label: Git snippets + description: Copy git snippets to clipboard + git_actions: + branch_name: Branch name + commit_message: Commit message + cmd: Create branch with empty commit + title: Quick snippets for Git + copy_success: ✅ Copied! + copy_error: ❌ Copy failed! + tab_issue: + empty: There are no issues linked yet. Link an existing issue by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the issue title/description or create a new issue. + tab_mrs: + empty: There are no merge requests linked yet. Link an existing MR by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the MR title/description or create a new MR. + gitlab_pipelines: Pipelines + updated_on: Updated on diff --git a/modules/gitlab_integration/config/locales/crowdin/js-hr.yml b/modules/gitlab_integration/config/locales/crowdin/js-hr.yml new file mode 100644 index 000000000000..cb34ab81c26f --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/js-hr.yml @@ -0,0 +1,56 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +hr: + js: + gitlab_integration: + work_packages: + tab_name: "GitLab" + tab_header_issue: + title: "Issues" + tab_header_mr: + title: "Merge requests" + create_mr: + label: Create MR + description: Create a Merge Request + copy_menu: + label: Git snippets + description: Copy git snippets to clipboard + git_actions: + branch_name: Branch name + commit_message: Commit message + cmd: Create branch with empty commit + title: Quick snippets for Git + copy_success: ✅ Copied! + copy_error: ❌ Copy failed! + tab_issue: + empty: There are no issues linked yet. Link an existing issue by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the issue title/description or create a new issue. + tab_mrs: + empty: There are no merge requests linked yet. Link an existing MR by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the MR title/description or create a new MR. + gitlab_pipelines: Pipelines + updated_on: Updated on diff --git a/modules/gitlab_integration/config/locales/crowdin/js-hu.yml b/modules/gitlab_integration/config/locales/crowdin/js-hu.yml new file mode 100644 index 000000000000..b584ba1d94d4 --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/js-hu.yml @@ -0,0 +1,56 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +hu: + js: + gitlab_integration: + work_packages: + tab_name: "GitLab" + tab_header_issue: + title: "Issues" + tab_header_mr: + title: "Merge requests" + create_mr: + label: Create MR + description: Create a Merge Request + copy_menu: + label: Git snippets + description: Copy git snippets to clipboard + git_actions: + branch_name: Branch name + commit_message: Commit message + cmd: Create branch with empty commit + title: Quick snippets for Git + copy_success: ✅ Copied! + copy_error: ❌ Copy failed! + tab_issue: + empty: There are no issues linked yet. Link an existing issue by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the issue title/description or create a new issue. + tab_mrs: + empty: There are no merge requests linked yet. Link an existing MR by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the MR title/description or create a new MR. + gitlab_pipelines: Pipelines + updated_on: Updated on diff --git a/modules/gitlab_integration/config/locales/crowdin/js-id.yml b/modules/gitlab_integration/config/locales/crowdin/js-id.yml new file mode 100644 index 000000000000..922c5bf1d2d2 --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/js-id.yml @@ -0,0 +1,56 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +id: + js: + gitlab_integration: + work_packages: + tab_name: "GitLab" + tab_header_issue: + title: "Issues" + tab_header_mr: + title: "Merge requests" + create_mr: + label: Create MR + description: Create a Merge Request + copy_menu: + label: Git snippets + description: Copy git snippets to clipboard + git_actions: + branch_name: Branch name + commit_message: Commit message + cmd: Create branch with empty commit + title: Quick snippets for Git + copy_success: ✅ Copied! + copy_error: ❌ Copy failed! + tab_issue: + empty: There are no issues linked yet. Link an existing issue by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the issue title/description or create a new issue. + tab_mrs: + empty: There are no merge requests linked yet. Link an existing MR by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the MR title/description or create a new MR. + gitlab_pipelines: Pipelines + updated_on: Updated on diff --git a/modules/gitlab_integration/config/locales/crowdin/js-it.yml b/modules/gitlab_integration/config/locales/crowdin/js-it.yml new file mode 100644 index 000000000000..f1c7409c29bb --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/js-it.yml @@ -0,0 +1,56 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +it: + js: + gitlab_integration: + work_packages: + tab_name: "GitLab" + tab_header_issue: + title: "Issues" + tab_header_mr: + title: "Merge requests" + create_mr: + label: Create MR + description: Create a Merge Request + copy_menu: + label: Git snippets + description: Copy git snippets to clipboard + git_actions: + branch_name: Branch name + commit_message: Commit message + cmd: Create branch with empty commit + title: Quick snippets for Git + copy_success: ✅ Copied! + copy_error: ❌ Copy failed! + tab_issue: + empty: There are no issues linked yet. Link an existing issue by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the issue title/description or create a new issue. + tab_mrs: + empty: There are no merge requests linked yet. Link an existing MR by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the MR title/description or create a new MR. + gitlab_pipelines: Pipelines + updated_on: Updated on diff --git a/modules/gitlab_integration/config/locales/crowdin/js-ja.yml b/modules/gitlab_integration/config/locales/crowdin/js-ja.yml new file mode 100644 index 000000000000..40a8e5fb36ce --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/js-ja.yml @@ -0,0 +1,56 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +ja: + js: + gitlab_integration: + work_packages: + tab_name: "GitLab" + tab_header_issue: + title: "Issues" + tab_header_mr: + title: "Merge requests" + create_mr: + label: Create MR + description: Create a Merge Request + copy_menu: + label: Git snippets + description: Copy git snippets to clipboard + git_actions: + branch_name: Branch name + commit_message: Commit message + cmd: Create branch with empty commit + title: Quick snippets for Git + copy_success: ✅ Copied! + copy_error: ❌ Copy failed! + tab_issue: + empty: There are no issues linked yet. Link an existing issue by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the issue title/description or create a new issue. + tab_mrs: + empty: There are no merge requests linked yet. Link an existing MR by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the MR title/description or create a new MR. + gitlab_pipelines: Pipelines + updated_on: Updated on diff --git a/modules/gitlab_integration/config/locales/crowdin/js-ko.yml b/modules/gitlab_integration/config/locales/crowdin/js-ko.yml new file mode 100644 index 000000000000..3f58d75b8801 --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/js-ko.yml @@ -0,0 +1,56 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +ko: + js: + gitlab_integration: + work_packages: + tab_name: "GitLab" + tab_header_issue: + title: "Issues" + tab_header_mr: + title: "Merge requests" + create_mr: + label: Create MR + description: Create a Merge Request + copy_menu: + label: Git snippets + description: Copy git snippets to clipboard + git_actions: + branch_name: Branch name + commit_message: Commit message + cmd: Create branch with empty commit + title: Quick snippets for Git + copy_success: ✅ Copied! + copy_error: ❌ Copy failed! + tab_issue: + empty: There are no issues linked yet. Link an existing issue by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the issue title/description or create a new issue. + tab_mrs: + empty: There are no merge requests linked yet. Link an existing MR by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the MR title/description or create a new MR. + gitlab_pipelines: Pipelines + updated_on: Updated on diff --git a/modules/gitlab_integration/config/locales/crowdin/js-lt.yml b/modules/gitlab_integration/config/locales/crowdin/js-lt.yml new file mode 100644 index 000000000000..b612d1be67dc --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/js-lt.yml @@ -0,0 +1,56 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +lt: + js: + gitlab_integration: + work_packages: + tab_name: "GitLab" + tab_header_issue: + title: "Issues" + tab_header_mr: + title: "Merge requests" + create_mr: + label: Create MR + description: Create a Merge Request + copy_menu: + label: Git snippets + description: Copy git snippets to clipboard + git_actions: + branch_name: Branch name + commit_message: Commit message + cmd: Create branch with empty commit + title: Quick snippets for Git + copy_success: ✅ Copied! + copy_error: ❌ Copy failed! + tab_issue: + empty: There are no issues linked yet. Link an existing issue by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the issue title/description or create a new issue. + tab_mrs: + empty: There are no merge requests linked yet. Link an existing MR by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the MR title/description or create a new MR. + gitlab_pipelines: Pipelines + updated_on: Updated on diff --git a/modules/gitlab_integration/config/locales/crowdin/js-nl.yml b/modules/gitlab_integration/config/locales/crowdin/js-nl.yml new file mode 100644 index 000000000000..b0c8d39b54b9 --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/js-nl.yml @@ -0,0 +1,56 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +nl: + js: + gitlab_integration: + work_packages: + tab_name: "GitLab" + tab_header_issue: + title: "Issues" + tab_header_mr: + title: "Merge requests" + create_mr: + label: Create MR + description: Create a Merge Request + copy_menu: + label: Git snippets + description: Copy git snippets to clipboard + git_actions: + branch_name: Branch name + commit_message: Commit message + cmd: Create branch with empty commit + title: Quick snippets for Git + copy_success: ✅ Copied! + copy_error: ❌ Copy failed! + tab_issue: + empty: There are no issues linked yet. Link an existing issue by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the issue title/description or create a new issue. + tab_mrs: + empty: There are no merge requests linked yet. Link an existing MR by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the MR title/description or create a new MR. + gitlab_pipelines: Pipelines + updated_on: Updated on diff --git a/modules/gitlab_integration/config/locales/crowdin/js-no.yml b/modules/gitlab_integration/config/locales/crowdin/js-no.yml new file mode 100644 index 000000000000..d8983e51a0c5 --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/js-no.yml @@ -0,0 +1,56 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +"no": + js: + gitlab_integration: + work_packages: + tab_name: "GitLab" + tab_header_issue: + title: "Issues" + tab_header_mr: + title: "Merge requests" + create_mr: + label: Create MR + description: Create a Merge Request + copy_menu: + label: Git snippets + description: Copy git snippets to clipboard + git_actions: + branch_name: Branch name + commit_message: Commit message + cmd: Create branch with empty commit + title: Quick snippets for Git + copy_success: ✅ Copied! + copy_error: ❌ Copy failed! + tab_issue: + empty: There are no issues linked yet. Link an existing issue by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the issue title/description or create a new issue. + tab_mrs: + empty: There are no merge requests linked yet. Link an existing MR by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the MR title/description or create a new MR. + gitlab_pipelines: Pipelines + updated_on: Updated on diff --git a/modules/gitlab_integration/config/locales/crowdin/js-pl.yml b/modules/gitlab_integration/config/locales/crowdin/js-pl.yml new file mode 100644 index 000000000000..35e9c52f07b7 --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/js-pl.yml @@ -0,0 +1,56 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +pl: + js: + gitlab_integration: + work_packages: + tab_name: "GitLab" + tab_header_issue: + title: "Issues" + tab_header_mr: + title: "Merge requests" + create_mr: + label: Create MR + description: Create a Merge Request + copy_menu: + label: Git snippets + description: Copy git snippets to clipboard + git_actions: + branch_name: Branch name + commit_message: Commit message + cmd: Create branch with empty commit + title: Quick snippets for Git + copy_success: ✅ Copied! + copy_error: ❌ Copy failed! + tab_issue: + empty: There are no issues linked yet. Link an existing issue by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the issue title/description or create a new issue. + tab_mrs: + empty: There are no merge requests linked yet. Link an existing MR by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the MR title/description or create a new MR. + gitlab_pipelines: Pipelines + updated_on: Updated on diff --git a/modules/gitlab_integration/config/locales/crowdin/js-pt.yml b/modules/gitlab_integration/config/locales/crowdin/js-pt.yml new file mode 100644 index 000000000000..b265a3a11bc2 --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/js-pt.yml @@ -0,0 +1,56 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +pt: + js: + gitlab_integration: + work_packages: + tab_name: "GitLab" + tab_header_issue: + title: "Issues" + tab_header_mr: + title: "Merge requests" + create_mr: + label: Create MR + description: Create a Merge Request + copy_menu: + label: Git snippets + description: Copy git snippets to clipboard + git_actions: + branch_name: Branch name + commit_message: Commit message + cmd: Create branch with empty commit + title: Quick snippets for Git + copy_success: ✅ Copied! + copy_error: ❌ Copy failed! + tab_issue: + empty: There are no issues linked yet. Link an existing issue by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the issue title/description or create a new issue. + tab_mrs: + empty: There are no merge requests linked yet. Link an existing MR by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the MR title/description or create a new MR. + gitlab_pipelines: Pipelines + updated_on: Updated on diff --git a/modules/gitlab_integration/config/locales/crowdin/js-ro.yml b/modules/gitlab_integration/config/locales/crowdin/js-ro.yml new file mode 100644 index 000000000000..fc8bbb0003e6 --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/js-ro.yml @@ -0,0 +1,56 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +ro: + js: + gitlab_integration: + work_packages: + tab_name: "GitLab" + tab_header_issue: + title: "Issues" + tab_header_mr: + title: "Merge requests" + create_mr: + label: Create MR + description: Create a Merge Request + copy_menu: + label: Git snippets + description: Copy git snippets to clipboard + git_actions: + branch_name: Branch name + commit_message: Commit message + cmd: Create branch with empty commit + title: Quick snippets for Git + copy_success: ✅ Copied! + copy_error: ❌ Copy failed! + tab_issue: + empty: There are no issues linked yet. Link an existing issue by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the issue title/description or create a new issue. + tab_mrs: + empty: There are no merge requests linked yet. Link an existing MR by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the MR title/description or create a new MR. + gitlab_pipelines: Pipelines + updated_on: Updated on diff --git a/modules/gitlab_integration/config/locales/crowdin/js-ru.yml b/modules/gitlab_integration/config/locales/crowdin/js-ru.yml new file mode 100644 index 000000000000..e1877b525340 --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/js-ru.yml @@ -0,0 +1,56 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +ru: + js: + gitlab_integration: + work_packages: + tab_name: GitLab + tab_header_issue: + title: Обсуждения + tab_header_mr: + title: Запросы на слияние + create_mr: + label: Создать запрос на слияние + description: Создать запрос на слияние + copy_menu: + label: Git-подсказки + description: Скопипастить Git-подсказки + git_actions: + branch_name: Имя ветки + commit_message: Описание коммита + cmd: Создать ветку с пустым коммитом + title: Git-подсказки + copy_success: ✅ Скопировано + copy_error: ❌ Не получилось скопировать + tab_issue: + empty: Нет связанных обсуждений. Привязать обсуждение можно путём вставки кода OP#%{wp_id} (или PP#%{wp_id} для приватных ссылок) в заголовке/описании при создании/редактировании обсуждения. + tab_mrs: + empty: Нет связанных запросов на слияние. Привязать запрос на слияние можно путём вставки кода OP#%{wp_id} (или PP#%{wp_id} для приватных ссылок) в заголовке/описании при создании/редактировании запроса на слияние. + gitlab_pipelines: Сборочные линии (pipelines) + updated_on: Обновлено diff --git a/modules/gitlab_integration/config/locales/crowdin/js-sk.yml b/modules/gitlab_integration/config/locales/crowdin/js-sk.yml new file mode 100644 index 000000000000..2899069e371c --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/js-sk.yml @@ -0,0 +1,56 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +sk: + js: + gitlab_integration: + work_packages: + tab_name: "GitLab" + tab_header_issue: + title: "Issues" + tab_header_mr: + title: "Merge requests" + create_mr: + label: Create MR + description: Create a Merge Request + copy_menu: + label: Git snippets + description: Copy git snippets to clipboard + git_actions: + branch_name: Branch name + commit_message: Commit message + cmd: Create branch with empty commit + title: Quick snippets for Git + copy_success: ✅ Copied! + copy_error: ❌ Copy failed! + tab_issue: + empty: There are no issues linked yet. Link an existing issue by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the issue title/description or create a new issue. + tab_mrs: + empty: There are no merge requests linked yet. Link an existing MR by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the MR title/description or create a new MR. + gitlab_pipelines: Pipelines + updated_on: Updated on diff --git a/modules/gitlab_integration/config/locales/crowdin/js-sl.yml b/modules/gitlab_integration/config/locales/crowdin/js-sl.yml new file mode 100644 index 000000000000..3cbbfd9a6415 --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/js-sl.yml @@ -0,0 +1,56 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +sl: + js: + gitlab_integration: + work_packages: + tab_name: "GitLab" + tab_header_issue: + title: "Issues" + tab_header_mr: + title: "Merge requests" + create_mr: + label: Create MR + description: Create a Merge Request + copy_menu: + label: Git snippets + description: Copy git snippets to clipboard + git_actions: + branch_name: Branch name + commit_message: Commit message + cmd: Create branch with empty commit + title: Quick snippets for Git + copy_success: ✅ Copied! + copy_error: ❌ Copy failed! + tab_issue: + empty: There are no issues linked yet. Link an existing issue by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the issue title/description or create a new issue. + tab_mrs: + empty: There are no merge requests linked yet. Link an existing MR by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the MR title/description or create a new MR. + gitlab_pipelines: Pipelines + updated_on: Updated on diff --git a/modules/gitlab_integration/config/locales/crowdin/js-sv.yml b/modules/gitlab_integration/config/locales/crowdin/js-sv.yml new file mode 100644 index 000000000000..48f132e89919 --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/js-sv.yml @@ -0,0 +1,56 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +sv: + js: + gitlab_integration: + work_packages: + tab_name: "GitLab" + tab_header_issue: + title: "Issues" + tab_header_mr: + title: "Merge requests" + create_mr: + label: Create MR + description: Create a Merge Request + copy_menu: + label: Git snippets + description: Copy git snippets to clipboard + git_actions: + branch_name: Branch name + commit_message: Commit message + cmd: Create branch with empty commit + title: Quick snippets for Git + copy_success: ✅ Copied! + copy_error: ❌ Copy failed! + tab_issue: + empty: There are no issues linked yet. Link an existing issue by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the issue title/description or create a new issue. + tab_mrs: + empty: There are no merge requests linked yet. Link an existing MR by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the MR title/description or create a new MR. + gitlab_pipelines: Pipelines + updated_on: Updated on diff --git a/modules/gitlab_integration/config/locales/crowdin/js-tr.yml b/modules/gitlab_integration/config/locales/crowdin/js-tr.yml new file mode 100644 index 000000000000..c5e59b0d4668 --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/js-tr.yml @@ -0,0 +1,56 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +tr: + js: + gitlab_integration: + work_packages: + tab_name: "GitLab" + tab_header_issue: + title: "Issues" + tab_header_mr: + title: "Merge requests" + create_mr: + label: Create MR + description: Create a Merge Request + copy_menu: + label: Git snippets + description: Copy git snippets to clipboard + git_actions: + branch_name: Branch name + commit_message: Commit message + cmd: Create branch with empty commit + title: Quick snippets for Git + copy_success: ✅ Copied! + copy_error: ❌ Copy failed! + tab_issue: + empty: There are no issues linked yet. Link an existing issue by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the issue title/description or create a new issue. + tab_mrs: + empty: There are no merge requests linked yet. Link an existing MR by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the MR title/description or create a new MR. + gitlab_pipelines: Pipelines + updated_on: Updated on diff --git a/modules/gitlab_integration/config/locales/crowdin/js-uk.yml b/modules/gitlab_integration/config/locales/crowdin/js-uk.yml new file mode 100644 index 000000000000..b3088532bdd7 --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/js-uk.yml @@ -0,0 +1,56 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +uk: + js: + gitlab_integration: + work_packages: + tab_name: "GitLab" + tab_header_issue: + title: "Issues" + tab_header_mr: + title: "Merge requests" + create_mr: + label: Create MR + description: Create a Merge Request + copy_menu: + label: Git snippets + description: Copy git snippets to clipboard + git_actions: + branch_name: Branch name + commit_message: Commit message + cmd: Create branch with empty commit + title: Quick snippets for Git + copy_success: ✅ Copied! + copy_error: ❌ Copy failed! + tab_issue: + empty: There are no issues linked yet. Link an existing issue by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the issue title/description or create a new issue. + tab_mrs: + empty: There are no merge requests linked yet. Link an existing MR by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the MR title/description or create a new MR. + gitlab_pipelines: Pipelines + updated_on: Updated on diff --git a/modules/gitlab_integration/config/locales/crowdin/js-vi.yml b/modules/gitlab_integration/config/locales/crowdin/js-vi.yml new file mode 100644 index 000000000000..e1dffccfdeb5 --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/js-vi.yml @@ -0,0 +1,56 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +vi: + js: + gitlab_integration: + work_packages: + tab_name: "GitLab" + tab_header_issue: + title: "Issues" + tab_header_mr: + title: "Merge requests" + create_mr: + label: Create MR + description: Create a Merge Request + copy_menu: + label: Git snippets + description: Copy git snippets to clipboard + git_actions: + branch_name: Branch name + commit_message: Commit message + cmd: Create branch with empty commit + title: Quick snippets for Git + copy_success: ✅ Copied! + copy_error: ❌ Copy failed! + tab_issue: + empty: There are no issues linked yet. Link an existing issue by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the issue title/description or create a new issue. + tab_mrs: + empty: There are no merge requests linked yet. Link an existing MR by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the MR title/description or create a new MR. + gitlab_pipelines: Pipelines + updated_on: Updated on diff --git a/modules/gitlab_integration/config/locales/crowdin/js-zh-CN.yml b/modules/gitlab_integration/config/locales/crowdin/js-zh-CN.yml new file mode 100644 index 000000000000..59d1d96f0233 --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/js-zh-CN.yml @@ -0,0 +1,56 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +zh-CN: + js: + gitlab_integration: + work_packages: + tab_name: "GitLab" + tab_header_issue: + title: "Issues" + tab_header_mr: + title: "Merge requests" + create_mr: + label: Create MR + description: Create a Merge Request + copy_menu: + label: Git snippets + description: Copy git snippets to clipboard + git_actions: + branch_name: Branch name + commit_message: Commit message + cmd: Create branch with empty commit + title: Quick snippets for Git + copy_success: ✅ Copied! + copy_error: ❌ Copy failed! + tab_issue: + empty: There are no issues linked yet. Link an existing issue by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the issue title/description or create a new issue. + tab_mrs: + empty: There are no merge requests linked yet. Link an existing MR by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the MR title/description or create a new MR. + gitlab_pipelines: Pipelines + updated_on: Updated on diff --git a/modules/gitlab_integration/config/locales/crowdin/js-zh-TW.yml b/modules/gitlab_integration/config/locales/crowdin/js-zh-TW.yml new file mode 100644 index 000000000000..2b5dddb91aa6 --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/js-zh-TW.yml @@ -0,0 +1,56 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +zh-TW: + js: + gitlab_integration: + work_packages: + tab_name: "GitLab" + tab_header_issue: + title: "Issues" + tab_header_mr: + title: "Merge requests" + create_mr: + label: Create MR + description: Create a Merge Request + copy_menu: + label: Git snippets + description: Copy git snippets to clipboard + git_actions: + branch_name: Branch name + commit_message: Commit message + cmd: Create branch with empty commit + title: Quick snippets for Git + copy_success: ✅ Copied! + copy_error: ❌ Copy failed! + tab_issue: + empty: There are no issues linked yet. Link an existing issue by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the issue title/description or create a new issue. + tab_mrs: + empty: There are no merge requests linked yet. Link an existing MR by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the MR title/description or create a new MR. + gitlab_pipelines: Pipelines + updated_on: Updated on diff --git a/modules/gitlab_integration/config/locales/crowdin/ko.yml b/modules/gitlab_integration/config/locales/crowdin/ko.yml new file mode 100644 index 000000000000..cff63d5f4b2c --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/ko.yml @@ -0,0 +1,93 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +ko: + project_module_gitlab: "Gitlab" + permission_show_gitlab_content: "Show Gitlab content" + gitlab_integration: + merge_request_opened_comment: > + **MR Opened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_closed_comment: > + **MR Closed:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_merged_comment: > + **MR Merged:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been merged by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_reopened_comment: > + **MR Reopened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + note_commit_referenced_comment: > + **Referenced in Commit:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + a Commit Note [%{commit_id}](%{commit_url}) on [%{repository}](%{repository_url}): + + %{commit_note} + note_mr_referenced_comment: > + **Referenced in MR:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_mr_commented_comment: > + **Commented in MR:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_issue_referenced_comment: > + **Referenced in Issue:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_issue_commented_comment: > + **Commented in Issue:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_snippet_referenced_comment: > + **Referenced in Snippet:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Snippet %{snippet_number} [%{snippet_title}](%{snippet_url}) on [%{repository}](%{repository_url}): + + %{snippet_note} + issue_opened_referenced_comment: > + **Issue Opened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + issue_closed_referenced_comment: > + **Issue Closed:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + issue_reopened_referenced_comment: > + **Issue Reopened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + push_single_commit_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} + push_multiple_commits_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed multiple commits [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} diff --git a/modules/gitlab_integration/config/locales/crowdin/lt.yml b/modules/gitlab_integration/config/locales/crowdin/lt.yml new file mode 100644 index 000000000000..1fe1bc3535bc --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/lt.yml @@ -0,0 +1,93 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +lt: + project_module_gitlab: "Gitlab" + permission_show_gitlab_content: "Show Gitlab content" + gitlab_integration: + merge_request_opened_comment: > + **MR Opened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_closed_comment: > + **MR Closed:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_merged_comment: > + **MR Merged:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been merged by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_reopened_comment: > + **MR Reopened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + note_commit_referenced_comment: > + **Referenced in Commit:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + a Commit Note [%{commit_id}](%{commit_url}) on [%{repository}](%{repository_url}): + + %{commit_note} + note_mr_referenced_comment: > + **Referenced in MR:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_mr_commented_comment: > + **Commented in MR:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_issue_referenced_comment: > + **Referenced in Issue:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_issue_commented_comment: > + **Commented in Issue:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_snippet_referenced_comment: > + **Referenced in Snippet:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Snippet %{snippet_number} [%{snippet_title}](%{snippet_url}) on [%{repository}](%{repository_url}): + + %{snippet_note} + issue_opened_referenced_comment: > + **Issue Opened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + issue_closed_referenced_comment: > + **Issue Closed:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + issue_reopened_referenced_comment: > + **Issue Reopened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + push_single_commit_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} + push_multiple_commits_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed multiple commits [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} diff --git a/modules/gitlab_integration/config/locales/crowdin/nl.yml b/modules/gitlab_integration/config/locales/crowdin/nl.yml new file mode 100644 index 000000000000..2af08592ddc6 --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/nl.yml @@ -0,0 +1,93 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +nl: + project_module_gitlab: "Gitlab" + permission_show_gitlab_content: "Show Gitlab content" + gitlab_integration: + merge_request_opened_comment: > + **MR Opened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_closed_comment: > + **MR Closed:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_merged_comment: > + **MR Merged:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been merged by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_reopened_comment: > + **MR Reopened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + note_commit_referenced_comment: > + **Referenced in Commit:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + a Commit Note [%{commit_id}](%{commit_url}) on [%{repository}](%{repository_url}): + + %{commit_note} + note_mr_referenced_comment: > + **Referenced in MR:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_mr_commented_comment: > + **Commented in MR:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_issue_referenced_comment: > + **Referenced in Issue:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_issue_commented_comment: > + **Commented in Issue:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_snippet_referenced_comment: > + **Referenced in Snippet:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Snippet %{snippet_number} [%{snippet_title}](%{snippet_url}) on [%{repository}](%{repository_url}): + + %{snippet_note} + issue_opened_referenced_comment: > + **Issue Opened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + issue_closed_referenced_comment: > + **Issue Closed:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + issue_reopened_referenced_comment: > + **Issue Reopened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + push_single_commit_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} + push_multiple_commits_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed multiple commits [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} diff --git a/modules/gitlab_integration/config/locales/crowdin/no.yml b/modules/gitlab_integration/config/locales/crowdin/no.yml new file mode 100644 index 000000000000..37d905e95408 --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/no.yml @@ -0,0 +1,93 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +"no": + project_module_gitlab: "Gitlab" + permission_show_gitlab_content: "Show Gitlab content" + gitlab_integration: + merge_request_opened_comment: > + **MR Opened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_closed_comment: > + **MR Closed:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_merged_comment: > + **MR Merged:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been merged by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_reopened_comment: > + **MR Reopened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + note_commit_referenced_comment: > + **Referenced in Commit:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + a Commit Note [%{commit_id}](%{commit_url}) on [%{repository}](%{repository_url}): + + %{commit_note} + note_mr_referenced_comment: > + **Referenced in MR:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_mr_commented_comment: > + **Commented in MR:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_issue_referenced_comment: > + **Referenced in Issue:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_issue_commented_comment: > + **Commented in Issue:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_snippet_referenced_comment: > + **Referenced in Snippet:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Snippet %{snippet_number} [%{snippet_title}](%{snippet_url}) on [%{repository}](%{repository_url}): + + %{snippet_note} + issue_opened_referenced_comment: > + **Issue Opened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + issue_closed_referenced_comment: > + **Issue Closed:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + issue_reopened_referenced_comment: > + **Issue Reopened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + push_single_commit_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} + push_multiple_commits_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed multiple commits [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} diff --git a/modules/gitlab_integration/config/locales/crowdin/pl.yml b/modules/gitlab_integration/config/locales/crowdin/pl.yml new file mode 100644 index 000000000000..1be5da1f1162 --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/pl.yml @@ -0,0 +1,93 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +pl: + project_module_gitlab: "Gitlab" + permission_show_gitlab_content: "Show Gitlab content" + gitlab_integration: + merge_request_opened_comment: > + **MR Opened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_closed_comment: > + **MR Closed:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_merged_comment: > + **MR Merged:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been merged by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_reopened_comment: > + **MR Reopened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + note_commit_referenced_comment: > + **Referenced in Commit:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + a Commit Note [%{commit_id}](%{commit_url}) on [%{repository}](%{repository_url}): + + %{commit_note} + note_mr_referenced_comment: > + **Referenced in MR:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_mr_commented_comment: > + **Commented in MR:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_issue_referenced_comment: > + **Referenced in Issue:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_issue_commented_comment: > + **Commented in Issue:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_snippet_referenced_comment: > + **Referenced in Snippet:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Snippet %{snippet_number} [%{snippet_title}](%{snippet_url}) on [%{repository}](%{repository_url}): + + %{snippet_note} + issue_opened_referenced_comment: > + **Issue Opened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + issue_closed_referenced_comment: > + **Issue Closed:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + issue_reopened_referenced_comment: > + **Issue Reopened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + push_single_commit_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} + push_multiple_commits_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed multiple commits [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} diff --git a/modules/gitlab_integration/config/locales/crowdin/pt.yml b/modules/gitlab_integration/config/locales/crowdin/pt.yml new file mode 100644 index 000000000000..473327d92560 --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/pt.yml @@ -0,0 +1,93 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +pt: + project_module_gitlab: "Gitlab" + permission_show_gitlab_content: "Show Gitlab content" + gitlab_integration: + merge_request_opened_comment: > + **MR Opened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_closed_comment: > + **MR Closed:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_merged_comment: > + **MR Merged:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been merged by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_reopened_comment: > + **MR Reopened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + note_commit_referenced_comment: > + **Referenced in Commit:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + a Commit Note [%{commit_id}](%{commit_url}) on [%{repository}](%{repository_url}): + + %{commit_note} + note_mr_referenced_comment: > + **Referenced in MR:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_mr_commented_comment: > + **Commented in MR:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_issue_referenced_comment: > + **Referenced in Issue:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_issue_commented_comment: > + **Commented in Issue:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_snippet_referenced_comment: > + **Referenced in Snippet:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Snippet %{snippet_number} [%{snippet_title}](%{snippet_url}) on [%{repository}](%{repository_url}): + + %{snippet_note} + issue_opened_referenced_comment: > + **Issue Opened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + issue_closed_referenced_comment: > + **Issue Closed:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + issue_reopened_referenced_comment: > + **Issue Reopened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + push_single_commit_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} + push_multiple_commits_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed multiple commits [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} diff --git a/modules/gitlab_integration/config/locales/crowdin/ro.yml b/modules/gitlab_integration/config/locales/crowdin/ro.yml new file mode 100644 index 000000000000..2032891af2d9 --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/ro.yml @@ -0,0 +1,93 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +ro: + project_module_gitlab: "Gitlab" + permission_show_gitlab_content: "Show Gitlab content" + gitlab_integration: + merge_request_opened_comment: > + **MR Opened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_closed_comment: > + **MR Closed:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_merged_comment: > + **MR Merged:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been merged by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_reopened_comment: > + **MR Reopened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + note_commit_referenced_comment: > + **Referenced in Commit:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + a Commit Note [%{commit_id}](%{commit_url}) on [%{repository}](%{repository_url}): + + %{commit_note} + note_mr_referenced_comment: > + **Referenced in MR:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_mr_commented_comment: > + **Commented in MR:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_issue_referenced_comment: > + **Referenced in Issue:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_issue_commented_comment: > + **Commented in Issue:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_snippet_referenced_comment: > + **Referenced in Snippet:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Snippet %{snippet_number} [%{snippet_title}](%{snippet_url}) on [%{repository}](%{repository_url}): + + %{snippet_note} + issue_opened_referenced_comment: > + **Issue Opened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + issue_closed_referenced_comment: > + **Issue Closed:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + issue_reopened_referenced_comment: > + **Issue Reopened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + push_single_commit_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} + push_multiple_commits_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed multiple commits [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} diff --git a/modules/gitlab_integration/config/locales/crowdin/ru.yml b/modules/gitlab_integration/config/locales/crowdin/ru.yml new file mode 100644 index 000000000000..829c50e3fcbd --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/ru.yml @@ -0,0 +1,93 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +ru: + project_module_gitlab: GitLab + permission_show_gitlab_content: Показывать GitLab-контент + gitlab_integration: + merge_request_opened_comment: > + **MR Открыт:** Запрос на слияние %{mr_number} [%{mr_title}](%{mr_url}) в [%{repository}](%{repository_url}) + был открыт [%{gitlab_user}](%{gitlab_user_url}). + merge_request_closed_comment: > + **MR Закрыт:** Запрос на слияние %{mr_number} [%{mr_title}](%{mr_url}) в [%{repository}](%{repository_url}) + был закрыт by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_merged_comment: > + **MR Смержен:** Запрос на слияние %{mr_number} [%{mr_title}](%{mr_url}) в [%{repository}](%{repository_url}) + был смержен [%{gitlab_user}](%{gitlab_user_url}). + merge_request_reopened_comment: > + **MR Переоткрыт:** Запрос на слияние %{mr_number} [%{mr_title}](%{mr_url}) в [%{repository}](%{repository_url}) + был переоткрыт [%{gitlab_user}](%{gitlab_user_url}). + note_commit_referenced_comment: > + **Упомянут в коммите:** [%{gitlab_user}](%{gitlab_user_url}) отметил эту задачу в + a коммите [%{commit_id}](%{commit_url}) в [%{repository}](%{repository_url}): + + %{commit_note} + note_mr_referenced_comment: > + **Упомянут в MR:** [%{gitlab_user}](%{gitlab_user_url}) отметил эту задачу в + запросе на слияние %{mr_number} [%{mr_title}](%{mr_url}) в [%{repository}](%{repository_url}): + + %{mr_note} + note_mr_commented_comment: > + **Комментарий в MR:** [%{gitlab_user}](%{gitlab_user_url}) комментировал эту задачу в + запросе на слияние %{mr_number} [%{mr_title}](%{mr_url}) в [%{repository}](%{repository_url}): + + %{mr_note} + note_issue_referenced_comment: > + **Упомянут в обсуждении:** [%{gitlab_user}](%{gitlab_user_url}) отметил эту задачу в + Обсуждение %{issue_number} [%{issue_title}](%{issue_url}) в [%{repository}](%{repository_url}): + + %{issue_note} + note_issue_commented_comment: > + **Комментарий в обсуждении:** [%{gitlab_user}](%{gitlab_user_url}) комментировал эту задачу в + обсуждении %{issue_number} [%{issue_title}](%{issue_url}) в [%{repository}](%{repository_url}): + + %{issue_note} + note_snippet_referenced_comment: > + **Упомянут в Snippet:** [%{gitlab_user}](%{gitlab_user_url}) отметил эту задачу в + Snippet %{snippet_number} [%{snippet_title}](%{snippet_url}) в [%{repository}](%{repository_url}): + + %{snippet_note} + issue_opened_referenced_comment: > + **Обсуждение открыто:** Обсуждение %{issue_number} [%{issue_title}](%{issue_url}) в [%{repository}](%{repository_url}) + был открыт [%{gitlab_user}](%{gitlab_user_url}). + issue_closed_referenced_comment: > + **Обсуждение закрыто:** Обсуждение %{issue_number} [%{issue_title}](%{issue_url}) в [%{repository}](%{repository_url}) + был закрыт [%{gitlab_user}](%{gitlab_user_url}). + issue_reopened_referenced_comment: > + **Обсуждение переоткрыто:** Обсуждение %{issue_number} [%{issue_title}](%{issue_url}) в [%{repository}](%{repository_url}) + было переоткрыто [%{gitlab_user}](%{gitlab_user_url}). + push_single_commit_comment: > + **Коммит:** [%{gitlab_user}](%{gitlab_user_url}) закоммитил [%{commit_number}](%{commit_url}) + в [%{repository}](%{repository_url}) %{commit_timestamp}: + + %{commit_note} + push_multiple_commits_comment: > + **Коммит в MR:** [%{gitlab_user}](%{gitlab_user_url}) закоммитил несколько коммитов [%{commit_number}](%{commit_url}) + в [%{repository}](%{repository_url}) %{commit_timestamp}: + + %{commit_note} diff --git a/modules/gitlab_integration/config/locales/crowdin/sk.yml b/modules/gitlab_integration/config/locales/crowdin/sk.yml new file mode 100644 index 000000000000..424d97842e61 --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/sk.yml @@ -0,0 +1,93 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +sk: + project_module_gitlab: "Gitlab" + permission_show_gitlab_content: "Show Gitlab content" + gitlab_integration: + merge_request_opened_comment: > + **MR Opened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_closed_comment: > + **MR Closed:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_merged_comment: > + **MR Merged:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been merged by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_reopened_comment: > + **MR Reopened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + note_commit_referenced_comment: > + **Referenced in Commit:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + a Commit Note [%{commit_id}](%{commit_url}) on [%{repository}](%{repository_url}): + + %{commit_note} + note_mr_referenced_comment: > + **Referenced in MR:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_mr_commented_comment: > + **Commented in MR:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_issue_referenced_comment: > + **Referenced in Issue:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_issue_commented_comment: > + **Commented in Issue:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_snippet_referenced_comment: > + **Referenced in Snippet:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Snippet %{snippet_number} [%{snippet_title}](%{snippet_url}) on [%{repository}](%{repository_url}): + + %{snippet_note} + issue_opened_referenced_comment: > + **Issue Opened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + issue_closed_referenced_comment: > + **Issue Closed:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + issue_reopened_referenced_comment: > + **Issue Reopened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + push_single_commit_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} + push_multiple_commits_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed multiple commits [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} diff --git a/modules/gitlab_integration/config/locales/crowdin/sl.yml b/modules/gitlab_integration/config/locales/crowdin/sl.yml new file mode 100644 index 000000000000..e25178e640a9 --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/sl.yml @@ -0,0 +1,93 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +sl: + project_module_gitlab: "Gitlab" + permission_show_gitlab_content: "Show Gitlab content" + gitlab_integration: + merge_request_opened_comment: > + **MR Opened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_closed_comment: > + **MR Closed:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_merged_comment: > + **MR Merged:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been merged by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_reopened_comment: > + **MR Reopened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + note_commit_referenced_comment: > + **Referenced in Commit:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + a Commit Note [%{commit_id}](%{commit_url}) on [%{repository}](%{repository_url}): + + %{commit_note} + note_mr_referenced_comment: > + **Referenced in MR:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_mr_commented_comment: > + **Commented in MR:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_issue_referenced_comment: > + **Referenced in Issue:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_issue_commented_comment: > + **Commented in Issue:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_snippet_referenced_comment: > + **Referenced in Snippet:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Snippet %{snippet_number} [%{snippet_title}](%{snippet_url}) on [%{repository}](%{repository_url}): + + %{snippet_note} + issue_opened_referenced_comment: > + **Issue Opened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + issue_closed_referenced_comment: > + **Issue Closed:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + issue_reopened_referenced_comment: > + **Issue Reopened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + push_single_commit_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} + push_multiple_commits_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed multiple commits [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} diff --git a/modules/gitlab_integration/config/locales/crowdin/sv.yml b/modules/gitlab_integration/config/locales/crowdin/sv.yml new file mode 100644 index 000000000000..34fed669dcd9 --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/sv.yml @@ -0,0 +1,93 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +sv: + project_module_gitlab: "Gitlab" + permission_show_gitlab_content: "Show Gitlab content" + gitlab_integration: + merge_request_opened_comment: > + **MR Opened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_closed_comment: > + **MR Closed:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_merged_comment: > + **MR Merged:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been merged by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_reopened_comment: > + **MR Reopened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + note_commit_referenced_comment: > + **Referenced in Commit:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + a Commit Note [%{commit_id}](%{commit_url}) on [%{repository}](%{repository_url}): + + %{commit_note} + note_mr_referenced_comment: > + **Referenced in MR:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_mr_commented_comment: > + **Commented in MR:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_issue_referenced_comment: > + **Referenced in Issue:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_issue_commented_comment: > + **Commented in Issue:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_snippet_referenced_comment: > + **Referenced in Snippet:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Snippet %{snippet_number} [%{snippet_title}](%{snippet_url}) on [%{repository}](%{repository_url}): + + %{snippet_note} + issue_opened_referenced_comment: > + **Issue Opened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + issue_closed_referenced_comment: > + **Issue Closed:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + issue_reopened_referenced_comment: > + **Issue Reopened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + push_single_commit_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} + push_multiple_commits_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed multiple commits [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} diff --git a/modules/gitlab_integration/config/locales/crowdin/tr.yml b/modules/gitlab_integration/config/locales/crowdin/tr.yml new file mode 100644 index 000000000000..0c8fd994f742 --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/tr.yml @@ -0,0 +1,93 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +tr: + project_module_gitlab: "Gitlab" + permission_show_gitlab_content: "Show Gitlab content" + gitlab_integration: + merge_request_opened_comment: > + **MR Opened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_closed_comment: > + **MR Closed:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_merged_comment: > + **MR Merged:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been merged by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_reopened_comment: > + **MR Reopened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + note_commit_referenced_comment: > + **Referenced in Commit:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + a Commit Note [%{commit_id}](%{commit_url}) on [%{repository}](%{repository_url}): + + %{commit_note} + note_mr_referenced_comment: > + **Referenced in MR:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_mr_commented_comment: > + **Commented in MR:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_issue_referenced_comment: > + **Referenced in Issue:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_issue_commented_comment: > + **Commented in Issue:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_snippet_referenced_comment: > + **Referenced in Snippet:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Snippet %{snippet_number} [%{snippet_title}](%{snippet_url}) on [%{repository}](%{repository_url}): + + %{snippet_note} + issue_opened_referenced_comment: > + **Issue Opened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + issue_closed_referenced_comment: > + **Issue Closed:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + issue_reopened_referenced_comment: > + **Issue Reopened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + push_single_commit_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} + push_multiple_commits_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed multiple commits [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} diff --git a/modules/gitlab_integration/config/locales/crowdin/uk.yml b/modules/gitlab_integration/config/locales/crowdin/uk.yml new file mode 100644 index 000000000000..039c8ca03e44 --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/uk.yml @@ -0,0 +1,93 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +uk: + project_module_gitlab: "Gitlab" + permission_show_gitlab_content: "Show Gitlab content" + gitlab_integration: + merge_request_opened_comment: > + **MR Opened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_closed_comment: > + **MR Closed:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_merged_comment: > + **MR Merged:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been merged by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_reopened_comment: > + **MR Reopened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + note_commit_referenced_comment: > + **Referenced in Commit:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + a Commit Note [%{commit_id}](%{commit_url}) on [%{repository}](%{repository_url}): + + %{commit_note} + note_mr_referenced_comment: > + **Referenced in MR:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_mr_commented_comment: > + **Commented in MR:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_issue_referenced_comment: > + **Referenced in Issue:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_issue_commented_comment: > + **Commented in Issue:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_snippet_referenced_comment: > + **Referenced in Snippet:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Snippet %{snippet_number} [%{snippet_title}](%{snippet_url}) on [%{repository}](%{repository_url}): + + %{snippet_note} + issue_opened_referenced_comment: > + **Issue Opened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + issue_closed_referenced_comment: > + **Issue Closed:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + issue_reopened_referenced_comment: > + **Issue Reopened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + push_single_commit_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} + push_multiple_commits_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed multiple commits [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} diff --git a/modules/gitlab_integration/config/locales/crowdin/vi.yml b/modules/gitlab_integration/config/locales/crowdin/vi.yml new file mode 100644 index 000000000000..0f293629c13b --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/vi.yml @@ -0,0 +1,93 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +vi: + project_module_gitlab: "Gitlab" + permission_show_gitlab_content: "Show Gitlab content" + gitlab_integration: + merge_request_opened_comment: > + **MR Opened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_closed_comment: > + **MR Closed:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_merged_comment: > + **MR Merged:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been merged by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_reopened_comment: > + **MR Reopened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + note_commit_referenced_comment: > + **Referenced in Commit:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + a Commit Note [%{commit_id}](%{commit_url}) on [%{repository}](%{repository_url}): + + %{commit_note} + note_mr_referenced_comment: > + **Referenced in MR:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_mr_commented_comment: > + **Commented in MR:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_issue_referenced_comment: > + **Referenced in Issue:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_issue_commented_comment: > + **Commented in Issue:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_snippet_referenced_comment: > + **Referenced in Snippet:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Snippet %{snippet_number} [%{snippet_title}](%{snippet_url}) on [%{repository}](%{repository_url}): + + %{snippet_note} + issue_opened_referenced_comment: > + **Issue Opened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + issue_closed_referenced_comment: > + **Issue Closed:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + issue_reopened_referenced_comment: > + **Issue Reopened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + push_single_commit_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} + push_multiple_commits_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed multiple commits [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} diff --git a/modules/gitlab_integration/config/locales/crowdin/zh-CN.yml b/modules/gitlab_integration/config/locales/crowdin/zh-CN.yml new file mode 100644 index 000000000000..57a96873f18d --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/zh-CN.yml @@ -0,0 +1,93 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +zh-CN: + project_module_gitlab: "Gitlab" + permission_show_gitlab_content: "Show Gitlab content" + gitlab_integration: + merge_request_opened_comment: > + **MR Opened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_closed_comment: > + **MR Closed:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_merged_comment: > + **MR Merged:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been merged by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_reopened_comment: > + **MR Reopened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + note_commit_referenced_comment: > + **Referenced in Commit:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + a Commit Note [%{commit_id}](%{commit_url}) on [%{repository}](%{repository_url}): + + %{commit_note} + note_mr_referenced_comment: > + **Referenced in MR:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_mr_commented_comment: > + **Commented in MR:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_issue_referenced_comment: > + **Referenced in Issue:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_issue_commented_comment: > + **Commented in Issue:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_snippet_referenced_comment: > + **Referenced in Snippet:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Snippet %{snippet_number} [%{snippet_title}](%{snippet_url}) on [%{repository}](%{repository_url}): + + %{snippet_note} + issue_opened_referenced_comment: > + **Issue Opened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + issue_closed_referenced_comment: > + **Issue Closed:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + issue_reopened_referenced_comment: > + **Issue Reopened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + push_single_commit_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} + push_multiple_commits_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed multiple commits [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} diff --git a/modules/gitlab_integration/config/locales/crowdin/zh-TW.yml b/modules/gitlab_integration/config/locales/crowdin/zh-TW.yml new file mode 100644 index 000000000000..2361760b3f2c --- /dev/null +++ b/modules/gitlab_integration/config/locales/crowdin/zh-TW.yml @@ -0,0 +1,93 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +zh-TW: + project_module_gitlab: "Gitlab" + permission_show_gitlab_content: "Show Gitlab content" + gitlab_integration: + merge_request_opened_comment: > + **MR Opened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_closed_comment: > + **MR Closed:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_merged_comment: > + **MR Merged:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been merged by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_reopened_comment: > + **MR Reopened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + note_commit_referenced_comment: > + **Referenced in Commit:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + a Commit Note [%{commit_id}](%{commit_url}) on [%{repository}](%{repository_url}): + + %{commit_note} + note_mr_referenced_comment: > + **Referenced in MR:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_mr_commented_comment: > + **Commented in MR:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Merge request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_issue_referenced_comment: > + **Referenced in Issue:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_issue_commented_comment: > + **Commented in Issue:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_snippet_referenced_comment: > + **Referenced in Snippet:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Snippet %{snippet_number} [%{snippet_title}](%{snippet_url}) on [%{repository}](%{repository_url}): + + %{snippet_note} + issue_opened_referenced_comment: > + **Issue Opened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + issue_closed_referenced_comment: > + **Issue Closed:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + issue_reopened_referenced_comment: > + **Issue Reopened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + push_single_commit_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} + push_multiple_commits_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed multiple commits [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} diff --git a/modules/gitlab_integration/config/locales/de.yml b/modules/gitlab_integration/config/locales/de.yml new file mode 100644 index 000000000000..af758b73f718 --- /dev/null +++ b/modules/gitlab_integration/config/locales/de.yml @@ -0,0 +1,95 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ + +de: + project_module_gitlab: "Gitlab" + permission_show_gitlab_content: "Show Gitlab content" + + gitlab_integration: + merge_request_opened_comment: > + **MR Opened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_closed_comment: > + **MR Closed:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_merged_comment: > + **MR Merged:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been merged by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_reopened_comment: > + **MR Reopened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + note_commit_referenced_comment: > + **Referenced in Commit:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + a Commit Note [%{commit_id}](%{commit_url}) on [%{repository}](%{repository_url}): + + %{commit_note} + note_mr_referenced_comment: > + **Referenced in MR:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Merge Request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_mr_commented_comment: > + **Commented in MR:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Merge Request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_issue_referenced_comment: > + **Referenced in Issue:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_issue_commented_comment: > + **Commented in Issue:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_snippet_referenced_comment: > + **Referenced in Snippet:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Snippet %{snippet_number} [%{snippet_title}](%{snippet_url}) on [%{repository}](%{repository_url}): + + %{snippet_note} + issue_opened_referenced_comment: > + **Issue Opened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + issue_closed_referenced_comment: > + **Issue Closed:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + issue_reopened_referenced_comment: > + **Issue Reopened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + push_single_commit_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} + push_multiple_commits_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed multiple commits [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} diff --git a/modules/gitlab_integration/config/locales/en.yml b/modules/gitlab_integration/config/locales/en.yml new file mode 100644 index 000000000000..76dbbd1af51f --- /dev/null +++ b/modules/gitlab_integration/config/locales/en.yml @@ -0,0 +1,95 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ + +en: + project_module_gitlab: "Gitlab" + permission_show_gitlab_content: "Show Gitlab content" + + gitlab_integration: + merge_request_opened_comment: > + **MR Opened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_closed_comment: > + **MR Closed:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_merged_comment: > + **MR Merged:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been merged by [%{gitlab_user}](%{gitlab_user_url}). + merge_request_reopened_comment: > + **MR Reopened:** Merge request %{mr_number} [%{mr_title}](%{mr_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + note_commit_referenced_comment: > + **Referenced in Commit:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + a Commit Note [%{commit_id}](%{commit_url}) on [%{repository}](%{repository_url}): + + %{commit_note} + note_mr_referenced_comment: > + **Referenced in MR:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Merge Request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_mr_commented_comment: > + **Commented in MR:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Merge Request %{mr_number} [%{mr_title}](%{mr_url}) on [%{repository}](%{repository_url}): + + %{mr_note} + note_issue_referenced_comment: > + **Referenced in Issue:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_issue_commented_comment: > + **Commented in Issue:** [%{gitlab_user}](%{gitlab_user_url}) commented this WP in + Issue %{issue_number} [%{issue_title}](%{issue_url}) on [%{repository}](%{repository_url}): + + %{issue_note} + note_snippet_referenced_comment: > + **Referenced in Snippet:** [%{gitlab_user}](%{gitlab_user_url}) referenced this WP in + Snippet %{snippet_number} [%{snippet_title}](%{snippet_url}) on [%{repository}](%{repository_url}): + + %{snippet_note} + issue_opened_referenced_comment: > + **Issue Opened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been opened by [%{gitlab_user}](%{gitlab_user_url}). + issue_closed_referenced_comment: > + **Issue Closed:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been closed by [%{gitlab_user}](%{gitlab_user_url}). + issue_reopened_referenced_comment: > + **Issue Reopened:** Issue %{issue_number} [%{issue_title}](%{issue_url}) for [%{repository}](%{repository_url}) + has been reopened by [%{gitlab_user}](%{gitlab_user_url}). + push_single_commit_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} + push_multiple_commits_comment: > + **Pushed in MR:** [%{gitlab_user}](%{gitlab_user_url}) pushed multiple commits [%{commit_number}](%{commit_url}) + to [%{repository}](%{repository_url}) at %{commit_timestamp}: + + %{commit_note} diff --git a/modules/gitlab_integration/config/locales/js-en.yml b/modules/gitlab_integration/config/locales/js-en.yml new file mode 100644 index 000000000000..fac3b06a28ff --- /dev/null +++ b/modules/gitlab_integration/config/locales/js-en.yml @@ -0,0 +1,57 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ + +en: + js: + gitlab_integration: + work_packages: + tab_name: "GitLab" + tab_header_issue: + title: "Issues" + tab_header_mr: + title: "Merge requests" + create_mr: + label: Create MR + description: Create a Merge Request + copy_menu: + label: Git snippets + description: Copy git snippets to clipboard + git_actions: + branch_name: Branch name + commit_message: Commit message + cmd: Create branch with empty commit + title: Quick snippets for Git + copy_success: ✅ Copied! + copy_error: ❌ Copy failed! + tab_issue: + empty: There are no issues linked yet. Link an existing issue by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the issue title/description or create a new issue. + tab_mrs: + empty: There are no merge requests linked yet. Link an existing MR by using the code OP#%{wp_id} (or PP#%{wp_id} for private links) in the MR title/description or create a new MR. + gitlab_pipelines: Pipelines + updated_on: Updated on diff --git a/modules/gitlab_integration/db/migrate/20211015110000_gitlab_integration_models.rb b/modules/gitlab_integration/db/migrate/20211015110000_gitlab_integration_models.rb new file mode 100644 index 000000000000..587a72e946da --- /dev/null +++ b/modules/gitlab_integration/db/migrate/20211015110000_gitlab_integration_models.rb @@ -0,0 +1,88 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +class GitlabIntegrationModels < ActiveRecord::Migration[6.1] + # rubocop:disable Metrics/AbcSize + def change + create_table :gitlab_merge_requests do |t| + t.references :gitlab_user + t.references :merged_by + + t.bigint :gitlab_id, unique: true + t.integer :number, null: false + t.string :gitlab_html_url, null: false, unique: true + t.string :state, null: false + t.string :repository, null: false + t.datetime :gitlab_updated_at + t.string :title + t.text :body + t.boolean :draft + t.boolean :merged + t.datetime :merged_at + t.json :labels # [{name, color}] + t.timestamps + end + + create_join_table :gitlab_merge_requests, :work_packages do |t| + t.index :gitlab_merge_request_id, name: 'gitlab_mr_wp_mr_id' + t.index %i[gitlab_merge_request_id work_package_id], + unique: true, + name: "unique_index_gl_mrs_wps_on_gl_mr_id_and_wp_id" + end + + + create_table :gitlab_users do |t| + t.bigint :gitlab_id, null: false, unique: true + t.string :gitlab_name, null: false + t.string :gitlab_username, null: false + t.string :gitlab_email, null: false + t.string :gitlab_avatar_url, null: false + + t.timestamps + end + + + create_table :gitlab_pipelines do |t| + t.references :gitlab_merge_request, null: false + + t.bigint :gitlab_id, null: false, unique: true + t.string :gitlab_html_url, null: false + t.bigint :project_id, null: false + t.string :gitlab_user_avatar_url, null: false + t.string :status, null: false + t.string :name, null: false + t.string :details_url + t.json :ci_details + t.datetime :started_at + t.datetime :completed_at + + t.timestamps + end + end + # rubocop:enable Metrics/AbcSize +end diff --git a/modules/gitlab_integration/db/migrate/20211015110001_add_username_commit_to_pipelines.rb b/modules/gitlab_integration/db/migrate/20211015110001_add_username_commit_to_pipelines.rb new file mode 100644 index 000000000000..2b621fa742d5 --- /dev/null +++ b/modules/gitlab_integration/db/migrate/20211015110001_add_username_commit_to_pipelines.rb @@ -0,0 +1,36 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ + +class AddUsernameCommitToPipelines < ActiveRecord::Migration[7.0] + def change + add_column :gitlab_pipelines, :username, :text + + add_column :gitlab_pipelines, :commit_id, :text + end +end diff --git a/modules/gitlab_integration/db/migrate/20211015110002_add_gitlab_issues.rb b/modules/gitlab_integration/db/migrate/20211015110002_add_gitlab_issues.rb new file mode 100644 index 000000000000..2e046b29d5c1 --- /dev/null +++ b/modules/gitlab_integration/db/migrate/20211015110002_add_gitlab_issues.rb @@ -0,0 +1,56 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +class AddGitlabIssues < ActiveRecord::Migration[7.0] + # rubocop:disable Metrics/AbcSize + def change + create_table :gitlab_issues do |t| + t.references :gitlab_user + + t.bigint :gitlab_id, unique: true + t.integer :number, null: false + t.string :gitlab_html_url, null: false, unique: true + t.string :state, null: false + t.string :repository, null: false + t.datetime :gitlab_updated_at + t.string :title + t.text :body + t.json :labels # [{name, color}] + t.timestamps + end + + create_join_table :gitlab_issues, :work_packages do |t| + t.index :gitlab_issue_id, name: 'gitlab_issues_wp_issue_id' + t.index %i[gitlab_issue_id work_package_id], + unique: true, + name: "unique_index_gl_issues_wps_on_gl_issue_id_and_wp_id" + end + + end + # rubocop:enable Metrics/AbcSize +end diff --git a/modules/gitlab_integration/doc/op-commented-in-issue.png b/modules/gitlab_integration/doc/op-commented-in-issue.png new file mode 100644 index 000000000000..f3d0c13d15e8 Binary files /dev/null and b/modules/gitlab_integration/doc/op-commented-in-issue.png differ diff --git a/modules/gitlab_integration/doc/op-commented-in-mr.png b/modules/gitlab_integration/doc/op-commented-in-mr.png new file mode 100644 index 000000000000..523918e91cfa Binary files /dev/null and b/modules/gitlab_integration/doc/op-commented-in-mr.png differ diff --git a/modules/gitlab_integration/doc/op-issue-opened.png b/modules/gitlab_integration/doc/op-issue-opened.png new file mode 100644 index 000000000000..7388422ced75 Binary files /dev/null and b/modules/gitlab_integration/doc/op-issue-opened.png differ diff --git a/modules/gitlab_integration/doc/op-mr-merged-event-1.png b/modules/gitlab_integration/doc/op-mr-merged-event-1.png new file mode 100644 index 000000000000..a4f82308f2ff Binary files /dev/null and b/modules/gitlab_integration/doc/op-mr-merged-event-1.png differ diff --git a/modules/gitlab_integration/doc/op-mr-merged-event-2.png b/modules/gitlab_integration/doc/op-mr-merged-event-2.png new file mode 100644 index 000000000000..3cd3c523c8d0 Binary files /dev/null and b/modules/gitlab_integration/doc/op-mr-merged-event-2.png differ diff --git a/modules/gitlab_integration/doc/op-mr-merged-event-3.png b/modules/gitlab_integration/doc/op-mr-merged-event-3.png new file mode 100644 index 000000000000..f0b9c055aacc Binary files /dev/null and b/modules/gitlab_integration/doc/op-mr-merged-event-3.png differ diff --git a/modules/gitlab_integration/doc/op-mr-merged-event-4.png b/modules/gitlab_integration/doc/op-mr-merged-event-4.png new file mode 100644 index 000000000000..aa4ff622a61d Binary files /dev/null and b/modules/gitlab_integration/doc/op-mr-merged-event-4.png differ diff --git a/modules/gitlab_integration/doc/op-mr-opened.png b/modules/gitlab_integration/doc/op-mr-opened.png new file mode 100644 index 000000000000..50e0a57f2ad6 Binary files /dev/null and b/modules/gitlab_integration/doc/op-mr-opened.png differ diff --git a/modules/gitlab_integration/doc/op-pushed-in-mr.png b/modules/gitlab_integration/doc/op-pushed-in-mr.png new file mode 100644 index 000000000000..2550e592afe8 Binary files /dev/null and b/modules/gitlab_integration/doc/op-pushed-in-mr.png differ diff --git a/modules/gitlab_integration/doc/op-referenced-in-commit.png b/modules/gitlab_integration/doc/op-referenced-in-commit.png new file mode 100644 index 000000000000..f223df82eff4 Binary files /dev/null and b/modules/gitlab_integration/doc/op-referenced-in-commit.png differ diff --git a/modules/gitlab_integration/doc/op-referenced-in-issue.png b/modules/gitlab_integration/doc/op-referenced-in-issue.png new file mode 100644 index 000000000000..0724dde7d345 Binary files /dev/null and b/modules/gitlab_integration/doc/op-referenced-in-issue.png differ diff --git a/modules/gitlab_integration/frontend/module/git-actions-menu/git-actions-menu.component.ts b/modules/gitlab_integration/frontend/module/git-actions-menu/git-actions-menu.component.ts new file mode 100644 index 000000000000..a4130a908783 --- /dev/null +++ b/modules/gitlab_integration/frontend/module/git-actions-menu/git-actions-menu.component.ts @@ -0,0 +1,106 @@ +//-- copyright +// OpenProject is an open source project management software. +// Copyright (C) 2023 Ben Tey +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License version 3. +// +// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +// Copyright (C) 2006-2013 Jean-Philippe Lang +// Copyright (C) 2010-2013 the ChiliProject Team +// Copyright (C) 2012-2021 the OpenProject GmbH +// +// 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 2 +// 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, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// +// See docs/COPYRIGHT.rdoc for more details. +//++ + +import copy from 'copy-text-to-clipboard'; +import { Component, Inject, Input } from '@angular/core'; +import { GitActionsService } from '../git-actions/git-actions.service'; +import { ISnippet } from "core-app/features/plugins/linked/openproject-gitlab_integration/typings"; +import { WorkPackageResource } from "core-app/features/hal/resources/work-package-resource"; +import { OPContextMenuComponent } from "core-app/shared/components/op-context-menu/op-context-menu.component"; +import { + OpContextMenuLocalsMap, + OpContextMenuLocalsToken +} from "core-app/shared/components/op-context-menu/op-context-menu.types"; +import { I18nService } from "core-app/core/i18n/i18n.service"; + + +@Component({ + selector: 'op-git-actions-menu', + templateUrl: './git-actions-menu.template.html', + styleUrls: [ + './styles/git-actions-menu.sass' + ] +}) +export class GitActionsMenuComponent extends OPContextMenuComponent { + @Input() public workPackage:WorkPackageResource; + + public text = { + title: this.I18n.t('js.gitlab_integration.tab_header_mr.git_actions.title'), + copyButtonHelpText: this.I18n.t('js.gitlab_integration.tab_header_mr.git_actions.copy_button_help'), + copyResult: { + success: this.I18n.t('js.gitlab_integration.tab_header_mr.git_actions.copy_success'), + error: this.I18n.t('js.gitlab_integration.tab_header_mr.git_actions.copy_error') + } + }; + + public lastCopyResult:string = this.text.copyResult.success; + public showCopyResult:boolean = false; + public copiedSnippetId:string = ''; + + public snippets:ISnippet[] = [ + { + id: 'branch', + name: this.I18n.t('js.gitlab_integration.tab_header_mr.git_actions.branch_name'), + textToCopy: () => this.gitActions.branchName(this.workPackage) + }, + { + id: 'message', + name: this.I18n.t('js.gitlab_integration.tab_header_mr.git_actions.commit_message'), + textToCopy: () => this.gitActions.commitMessage(this.workPackage) + }, + { + id: 'command', + name: this.I18n.t('js.gitlab_integration.tab_header_mr.git_actions.cmd'), + textToCopy: () => this.gitActions.gitCommand(this.workPackage) + }, + ]; + + constructor(@Inject(OpContextMenuLocalsToken) + public locals:OpContextMenuLocalsMap, + readonly I18n:I18nService, + readonly gitActions:GitActionsService) { + super(locals); + this.workPackage = this.locals.workPackage; + } + + public onCopyButtonClick(snippet:ISnippet):void { + const success = copy(snippet.textToCopy()); + + if (success) { + this.lastCopyResult = this.text.copyResult.success; + } else { + this.lastCopyResult = this.text.copyResult.error; + } + this.copiedSnippetId = snippet.id; + this.showCopyResult = true; + window.setTimeout(() => { + this.showCopyResult = false; + }, 2000); + } +} diff --git a/modules/gitlab_integration/frontend/module/git-actions-menu/git-actions-menu.directive.ts b/modules/gitlab_integration/frontend/module/git-actions-menu/git-actions-menu.directive.ts new file mode 100644 index 000000000000..d20b2fc18618 --- /dev/null +++ b/modules/gitlab_integration/frontend/module/git-actions-menu/git-actions-menu.directive.ts @@ -0,0 +1,61 @@ +//-- copyright +// OpenProject is an open source project management software. +// Copyright (C) 2023 Ben Tey +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License version 3. +// +// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +// Copyright (C) 2006-2013 Jean-Philippe Lang +// Copyright (C) 2010-2013 the ChiliProject Team +// Copyright (C) 2012-2021 the OpenProject GmbH +// +// 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 2 +// 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, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// +// See docs/COPYRIGHT.rdoc for more details. +//++ + +import { OpContextMenuItem } from 'core-app/shared/components/op-context-menu/op-context-menu.types'; +import { OPContextMenuService } from 'core-app/shared/components/op-context-menu/op-context-menu.service'; +import { Directive, ElementRef, Input } from '@angular/core'; +import { OpContextMenuTrigger } from 'core-app/shared/components/op-context-menu/handlers/op-context-menu-trigger.directive'; +import { WorkPackageResource } from "core-app/features/hal/resources/work-package-resource"; +import { GitActionsMenuComponent } from './git-actions-menu.component'; + + +@Directive({ + selector: '[gitActionsCopyDropdown]' +}) +export class GitActionsMenuDirective extends OpContextMenuTrigger { + @Input('gitActionsCopyDropdown-workPackage') public workPackage:WorkPackageResource; + + constructor(readonly elementRef:ElementRef, + readonly opContextMenu:OPContextMenuService) { + super(elementRef, opContextMenu); + } + + protected open(evt:JQuery.TriggeredEvent) { + this.opContextMenu.show(this, evt, GitActionsMenuComponent); + } + + public get locals():{ showAnchorRight?:boolean, contextMenuId?:string, items:OpContextMenuItem[], workPackage:WorkPackageResource } { + return { + workPackage: this.workPackage, + contextMenuId: 'gitlab-integration-git-actions-menu', + items: [] + }; + } +} + diff --git a/modules/gitlab_integration/frontend/module/git-actions-menu/git-actions-menu.template.html b/modules/gitlab_integration/frontend/module/git-actions-menu/git-actions-menu.template.html new file mode 100644 index 000000000000..0c2421885537 --- /dev/null +++ b/modules/gitlab_integration/frontend/module/git-actions-menu/git-actions-menu.template.html @@ -0,0 +1,22 @@ + + + diff --git a/modules/gitlab_integration/frontend/module/git-actions-menu/styles/git-actions-menu.sass b/modules/gitlab_integration/frontend/module/git-actions-menu/styles/git-actions-menu.sass new file mode 100644 index 000000000000..b502c7bcd3a3 --- /dev/null +++ b/modules/gitlab_integration/frontend/module/git-actions-menu/styles/git-actions-menu.sass @@ -0,0 +1,90 @@ +//-- copyright +// OpenProject is an open source project management software. +// Copyright (C) 2023 Ben Tey +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License version 3. +// +// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +// Copyright (C) 2006-2013 Jean-Philippe Lang +// Copyright (C) 2010-2013 the ChiliProject Team +// Copyright (C) 2012-2021 the OpenProject GmbH +// +// 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 2 +// 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, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// +// See docs/COPYRIGHT.rdoc for more details. +//++ +.git-actions-menu + background-color: var(--body-background) + border: var(--content-default-border-width) solid var(--content-default-border-color) + padding: 1rem 1rem 2rem 1rem + min-width: 25rem + box-shadow: .1em .1em .4em rgba(0,0,0,0.1) + + .copy-wrapper + width: 100% + position: relative + margin-bottom: 1rem + + .copy-content + width: calc(100% - 3em) + // the min-height should be the size of the copy-icon, which is the sum of: + // 2 * button padding (0.65em) + // font-size of the icon (0.9em) + // 1px where I don't know where it comes from + min-height: calc(2 * 0.65em + 0.9em + 1px) + border-radius: 2px 0 0 2px + padding: 0.65em + color: var(--gray-dark) + white-space: pre + resize: none + font-size: 0.9rem + display: inline-block + + .copy-button + margin: 0 + border: 1px solid #ccc + border-radius: 0 2px 2px 0 + vertical-align: top + left: -1px + position: relative + font-size: 0.9rem + + &:hover + border-color: #999 + + .copy-result-message + background-color: var(--main-menu-bg-color) + display: inline-block + padding: 0.5em + border-radius: 5px + color: var(--main-menu-font-color) + position: absolute + right: 0 + top: calc(2 * 0.65em + 0.9em + 1px + 9px) + box-shadow: 1px 1px 4px var(--gray-dark) + z-index: 1 + + &:before + content: "" + border-bottom: 0.6em solid var(--main-menu-bg-color) + height: 0 + width: 0 + position: absolute + top: -9px + right: 10px + border-left: 0.3em solid transparent + border-right: 0.3em solid transparent + diff --git a/modules/gitlab_integration/frontend/module/git-actions/git-actions.service.ts b/modules/gitlab_integration/frontend/module/git-actions/git-actions.service.ts new file mode 100644 index 000000000000..27688d8f8fbb --- /dev/null +++ b/modules/gitlab_integration/frontend/module/git-actions/git-actions.service.ts @@ -0,0 +1,89 @@ +//-- copyright +// OpenProject is an open source project management software. +// Copyright (C) 2023 Ben Tey +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License version 3. +// +// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +// Copyright (C) 2006-2013 Jean-Philippe Lang +// Copyright (C) 2010-2013 the ChiliProject Team +// Copyright (C) 2012-2021 the OpenProject GmbH +// +// 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 2 +// 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, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// +// See docs/COPYRIGHT.rdoc for more details. +//++ + +import { Injectable } from '@angular/core'; +import { WorkPackageResource } from "core-app/features/hal/resources/work-package-resource"; + +// probably not providable in root when we want to cache the formatter and set custom templates +@Injectable({ + providedIn: 'root', +}) +export class GitActionsService { + private sanitizeBranchString(str:string):string { + // See https://stackoverflow.com/a/3651867 for how these rules came in. + // This sanitization tries to be harsher than those rules + return str + .replace(/&/g, 'and ') // & becomes and + .replace(/ +/g, '-') // Spaces become dashes + .replace(/[\000-\039]/g, '') // ASCII control characters are out + .replace(/\177/g, '') // DEL is out + .replace(/[#\\\/\?\*\~\^\:\{\}@\.\[\]'"]/g, '') // Some other characters with special rules are out + .replace(/^[-]+/g, '') // Dashes at the start are removed + .replace(/[-]+$/g, '') // Dashes at the end are removed + .replace(/-+/g, '-') // Multiple dashes in a row are deduped + .trim(); + } + + private formattingInput(workPackage: WorkPackageResource) { + const type = workPackage.type.name || ''; + const id = workPackage.id || ''; + const title = workPackage.subject; + const url = window.location.origin + workPackage.pathHelper.workPackagePath(id); + const description = ''; + + return({ + id, type, title, url, description + }); + } + + private sanitizeShellInput(str:string):string { + return `${str.replace(/'/g, '\\\'')}`; + } + + public branchName(workPackage:WorkPackageResource):string { + const { type, id, title } = this.formattingInput(workPackage); + return `${this.sanitizeBranchString(type)}/${id}-${this.sanitizeBranchString(title)}`.toLocaleLowerCase(); + } + + public commitMessage(workPackage:WorkPackageResource):string { + const { title, id, description, url } = this.formattingInput(workPackage); + return `OP#${id} ${title} + +${description} + +${url} +`.replace(/\n\n+/g, '\n\n'); + } + + public gitCommand(workPackage:WorkPackageResource):string { + const branch = this.branchName(workPackage); + const commit = this.commitMessage(workPackage); + return `git checkout -b '${this.sanitizeShellInput(branch)}' && git commit --allow-empty -m '${this.sanitizeShellInput(commit)}'`; + } +} diff --git a/modules/gitlab_integration/frontend/module/gitlab-tab/gitlab-tab.component.sass b/modules/gitlab_integration/frontend/module/gitlab-tab/gitlab-tab.component.sass new file mode 100644 index 000000000000..06056041ad2d --- /dev/null +++ b/modules/gitlab_integration/frontend/module/gitlab-tab/gitlab-tab.component.sass @@ -0,0 +1,36 @@ +//-- copyright +// OpenProject is an open source project management software. +// Copyright (C) 2023 Ben Tey +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License version 3. +// +// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +// Copyright (C) 2006-2013 Jean-Philippe Lang +// Copyright (C) 2010-2013 the ChiliProject Team +// Copyright (C) 2012-2021 the OpenProject GmbH +// +// 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 2 +// 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, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// +// See docs/COPYRIGHT.rdoc for more details. +//++ + +@import "helpers" + +:host, +.gitlab-header + position: sticky + top: 0 + z-index: 850 // Ensure the header is above other content diff --git a/modules/gitlab_integration/frontend/module/gitlab-tab/gitlab-tab.component.ts b/modules/gitlab_integration/frontend/module/gitlab-tab/gitlab-tab.component.ts new file mode 100644 index 000000000000..c7f28a1a2536 --- /dev/null +++ b/modules/gitlab_integration/frontend/module/gitlab-tab/gitlab-tab.component.ts @@ -0,0 +1,49 @@ +//-- copyright +// OpenProject is an open source project management software. +// Copyright (C) 2023 Ben Tey +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License version 3. +// +// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +// Copyright (C) 2006-2013 Jean-Philippe Lang +// Copyright (C) 2010-2013 the ChiliProject Team +// Copyright (C) 2012-2021 the OpenProject GmbH +// +// 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 2 +// 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, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// +// See docs/COPYRIGHT.rdoc for more details. +//++ + +import { Component, Input } from '@angular/core'; +import { WorkPackageResource } from "core-app/features/hal/resources/work-package-resource"; +import { TabComponent } from "core-app/features/work-packages/components/wp-tabs/components/wp-tab-wrapper/tab"; +import { I18nService } from "core-app/core/i18n/i18n.service"; +import { PathHelperService } from "core-app/core/path-helper/path-helper.service"; + +@Component({ + selector: 'gitlab-tab', + templateUrl: './gitlab-tab.template.html', + styleUrls: [ + './gitlab-tab.component.sass', + ] +}) +export class GitlabTabComponent implements TabComponent { + @Input() public workPackage:WorkPackageResource; + + constructor(readonly PathHelper:PathHelperService, + readonly I18n:I18nService) { + } +} diff --git a/modules/gitlab_integration/frontend/module/gitlab-tab/gitlab-tab.template.html b/modules/gitlab_integration/frontend/module/gitlab-tab/gitlab-tab.template.html new file mode 100644 index 000000000000..a7c04a6dfc13 --- /dev/null +++ b/modules/gitlab_integration/frontend/module/gitlab-tab/gitlab-tab.template.html @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/modules/gitlab_integration/frontend/module/hal/resources/gitlab-issue-resource.ts b/modules/gitlab_integration/frontend/module/hal/resources/gitlab-issue-resource.ts new file mode 100644 index 000000000000..f095a717e933 --- /dev/null +++ b/modules/gitlab_integration/frontend/module/hal/resources/gitlab-issue-resource.ts @@ -0,0 +1,43 @@ +//-- copyright +// OpenProject is an open source project management software. +// Copyright (C) 2023 Ben Tey +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License version 3. +// +// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +// Copyright (C) 2006-2013 Jean-Philippe Lang +// Copyright (C) 2010-2013 the ChiliProject Team +// Copyright (C) 2012-2021 the OpenProject GmbH +// +// 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 2 +// 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, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// +// See docs/COPYRIGHT.rdoc for more details. +//++ + +import { HalResource } from "core-app/features/hal/resources/hal-resource"; + +export class GitlabIssueResource extends HalResource { + public get state() { + return this.states.projects.get(this.id!) as any; + } + + /** + * Exclude the schema _link from the linkable Resources. + */ + public $linkableKeys():string[] { + return _.without(super.$linkableKeys(), 'schema'); + } +} diff --git a/modules/gitlab_integration/frontend/module/hal/resources/gitlab-merge-request-resource.ts b/modules/gitlab_integration/frontend/module/hal/resources/gitlab-merge-request-resource.ts new file mode 100644 index 000000000000..49a6c510a672 --- /dev/null +++ b/modules/gitlab_integration/frontend/module/hal/resources/gitlab-merge-request-resource.ts @@ -0,0 +1,43 @@ +//-- copyright +// OpenProject is an open source project management software. +// Copyright (C) 2023 Ben Tey +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License version 3. +// +// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +// Copyright (C) 2006-2013 Jean-Philippe Lang +// Copyright (C) 2010-2013 the ChiliProject Team +// Copyright (C) 2012-2021 the OpenProject GmbH +// +// 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 2 +// 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, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// +// See docs/COPYRIGHT.rdoc for more details. +//++ + +import { HalResource } from "core-app/features/hal/resources/hal-resource"; + +export class GitlabMergeRequestResource extends HalResource { + public get state() { + return this.states.projects.get(this.id!) as any; + } + + /** + * Exclude the schema _link from the linkable Resources. + */ + public $linkableKeys():string[] { + return _.without(super.$linkableKeys(), 'schema'); + } +} diff --git a/modules/gitlab_integration/frontend/module/hal/resources/gitlab-user-resource.ts b/modules/gitlab_integration/frontend/module/hal/resources/gitlab-user-resource.ts new file mode 100644 index 000000000000..c729a5b82d75 --- /dev/null +++ b/modules/gitlab_integration/frontend/module/hal/resources/gitlab-user-resource.ts @@ -0,0 +1,43 @@ +//-- copyright +// OpenProject is an open source project management software. +// Copyright (C) 2023 Ben Tey +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License version 3. +// +// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +// Copyright (C) 2006-2013 Jean-Philippe Lang +// Copyright (C) 2010-2013 the ChiliProject Team +// Copyright (C) 2012-2021 the OpenProject GmbH +// +// 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 2 +// 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, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// +// See docs/COPYRIGHT.rdoc for more details. +//++ + +import { HalResource } from "core-app/features/hal/resources/hal-resource"; + +export class GitlabUserResource extends HalResource { + public get state() { + return this.states.projects.get(this.id!) as any; + } + + /** + * Exclude the schema _link from the linkable Resources. + */ + public $linkableKeys():string[] { + return _.without(super.$linkableKeys(), 'schema'); + } +} diff --git a/modules/gitlab_integration/frontend/module/icons/gitlab-icons.svg b/modules/gitlab_integration/frontend/module/icons/gitlab-icons.svg new file mode 100644 index 000000000000..13acb8a8da1d --- /dev/null +++ b/modules/gitlab_integration/frontend/module/icons/gitlab-icons.svg @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/modules/gitlab_integration/frontend/module/issue/issue.component.html b/modules/gitlab_integration/frontend/module/issue/issue.component.html new file mode 100644 index 000000000000..284db7059d56 --- /dev/null +++ b/modules/gitlab_integration/frontend/module/issue/issue.component.html @@ -0,0 +1,51 @@ +
+ + + + {{state}} | + + + + + +
+ {{ text.label_created_by }} + + + . + + + {{ text.label_last_updated_on }} + + . +
+ + diff --git a/modules/gitlab_integration/frontend/module/issue/issue.component.sass b/modules/gitlab_integration/frontend/module/issue/issue.component.sass new file mode 100644 index 000000000000..9d3e946adf66 --- /dev/null +++ b/modules/gitlab_integration/frontend/module/issue/issue.component.sass @@ -0,0 +1,151 @@ +//-- copyright +// OpenProject is an open source project management software. +// Copyright (C) 2023 Ben Tey +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License version 3. +// +// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +// Copyright (C) 2006-2013 Jean-Philippe Lang +// Copyright (C) 2010-2013 the ChiliProject Team +// Copyright (C) 2012-2021 the OpenProject GmbH +// +// 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 2 +// 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, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// +// See docs/COPYRIGHT.rdoc for more details. +//++ + +@import "helpers" + +:host, +.op-issue + display: grid + grid-template-columns: minmax(270px, auto) auto 1fr + grid-template-areas: "title title title" "info_created info_created info_created" "state label_icon label_icon" "label label label" + margin-bottom: 5px + margin-top: 5px + padding-bottom: 4px + padding-top: 4px + border-bottom: 1px solid #dddddd + + &:last-child + border-bottom: none + + &--iconsize + width: 16px + height: 16px + vertical-align: -3px + + &--title + @include text-shortener + font-weight: bold + grid-area: title + line-height: 22px + margin-right: 20px + + &--avatar + grid-area: info + + &--info_created + @include text-shortener + display: block + grid-area: info_created + font-size: 0.75rem + color: var(--gray-dark) + margin-bottom: 3px + + &--info_updated + @include text-shortener + display: block + grid-area: info_updated + font-size: 0.75rem + color: var(--gray-dark) + margin-top: -4px + + &--username + color: var(--gray-dark) + text-decoration: none + + &--labels + display: none + grid-area: label + font-size: 0.9rem + color: var(--gray-dark) + margin-top: 10px + + &--label + display: inline-block + padding: 2px 0.5rem 2px 0.5rem + border-radius: 10rem + border: 1px solid #fff + color: #fff + font-size: 0.8rem + + &--link + font-size: 0.8rem + text-decoration: none + + &_open + background-color: #c3e6cd + color: #24663b + fill: #24663b + + &_closed + background-color: #cbe2f9 + color: #0b5cad + fill: #0b5cad + + &--label_icon + grid-area: label_icon + display: inline-block + padding: 4px 6px + border-radius: 10rem + font-size: 0.8rem + font-weight: 400 + align-self: center + width: fit-content + margin-right: 6px + border: 1px solid #cecdd4 + background-color: #f3f3f3 + + &:hover + border: 1px solid #b6b5ba + background-color: #e4e4e4 + + &_style + fill: #737278 + + &--state + grid-area: state + display: inline-block + padding: 5px 0.6rem 5px 0.6rem + border-radius: 10rem + font-size: 0.8rem + font-weight: 400 + text-transform: capitalize + align-self: center + white-space: nowrap + width: fit-content + margin-right: 6px + + &_open + background-color: #c3e6cd + color: #24663b + fill: #24663b + + &_closed + background-color: #cbe2f9 + color: #0b5cad + fill: #0b5cad diff --git a/modules/gitlab_integration/frontend/module/issue/issue.component.ts b/modules/gitlab_integration/frontend/module/issue/issue.component.ts new file mode 100644 index 000000000000..3c260b8186d1 --- /dev/null +++ b/modules/gitlab_integration/frontend/module/issue/issue.component.ts @@ -0,0 +1,72 @@ +//-- copyright +// OpenProject is an open source project management software. +// Copyright (C) 2023 Ben Tey +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License version 3. +// +// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +// Copyright (C) 2006-2013 Jean-Philippe Lang +// Copyright (C) 2010-2013 the ChiliProject Team +// Copyright (C) 2012-2021 the OpenProject GmbH +// +// 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 2 +// 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, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// +// See docs/COPYRIGHT.rdoc for more details. +//++ + +import { Component, Input } from '@angular/core'; +import { PathHelperService } from 'core-app/core/path-helper/path-helper.service'; +import { I18nService } from 'core-app/core/i18n/i18n.service'; +import {IGitlabIssueResource} from 'core-app/features/plugins/linked/openproject-gitlab_integration/typings'; + +@Component({ + selector: 'gitlab-issue', + templateUrl: './issue.component.html', + styleUrls: [ + './issue.component.sass', + ], + host: { class: 'op-issue' } +}) + +export class IssueComponent { + @Input() public gitlabIssue:IGitlabIssueResource; + + public text = { + label_created_by: this.I18n.t('js.label_created_by'), + label_last_updated_on: this.I18n.t('js.gitlab_integration.updated_on'), + label_details: this.I18n.t('js.label_details'), + }; + + constructor(readonly PathHelper:PathHelperService, + readonly I18n:I18nService) { + } + + get state() { + + if (this.gitlabIssue.state === 'opened') { + return ('open'); + } else { + return('closed'); + } + } + + toggleLabels(identifier: string) { + const labelsElement = document.querySelector(`.op-issue--labels-${identifier}`) as HTMLElement; + + // Check the current display property and toggle it + labelsElement.style.display = labelsElement.style.display === 'none' ? 'block' : 'none'; + } +} diff --git a/modules/gitlab_integration/frontend/module/main.ts b/modules/gitlab_integration/frontend/module/main.ts new file mode 100644 index 000000000000..a694e4d3b1ea --- /dev/null +++ b/modules/gitlab_integration/frontend/module/main.ts @@ -0,0 +1,117 @@ +//-- copyright +// OpenProject is an open source project management software. +// Copyright (C) 2023 Ben Tey +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License version 3. +// +// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +// Copyright (C) 2006-2013 Jean-Philippe Lang +// Copyright (C) 2010-2013 the ChiliProject Team +// Copyright (C) 2012-2021 the OpenProject GmbH +// +// 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 2 +// 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, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// +// See docs/COPYRIGHT.rdoc for more details. +//++ + +import { Injector, NgModule } from '@angular/core'; +import { OpSharedModule } from 'core-app/shared/shared.module'; +import { OpenprojectTabsModule } from 'core-app/shared/components/tabs/openproject-tabs.module'; +import { WorkPackageTabsService } from 'core-app/features/work-packages/components/wp-tabs/services/wp-tabs/wp-tabs.service'; + + +import { GitlabTabComponent } from './gitlab-tab/gitlab-tab.component'; +import { TabHeaderMrsComponent } from './tab-header-mr/tab-header-mr.component'; +import { TabHeaderIssueComponent } from './tab-header-issue/tab-header-issue.component'; +import { TabMrsComponent } from './tab-mrs/tab-mrs.component'; +import { TabIssueComponent } from './tab-issue/tab-issue.component'; +import { GitActionsMenuDirective } from './git-actions-menu/git-actions-menu.directive'; +import { GitActionsMenuComponent } from './git-actions-menu/git-actions-menu.component'; +import { WorkPackagesGitlabMrsService } from './tab-mrs/wp-gitlab-mrs.service'; +import { WorkPackagesGitlabIssueService } from './tab-issue/wp-gitlab-issue.service'; +import { MergeRequestComponent } from './merge-request/merge-request.component'; +import { IssueComponent } from './issue/issue.component'; +import { WorkPackageResource } from 'core-app/features/hal/resources/work-package-resource'; +import { Observable, combineLatest } from 'rxjs'; +import { map } from 'rxjs/operators'; + +export function workPackageGitlabCount( + workPackage:WorkPackageResource, + injector:Injector, +):Observable { + const gitlabMrsService = injector.get(WorkPackagesGitlabMrsService); + const gitlabIssueService = injector.get(WorkPackagesGitlabIssueService); + + const mrsObservable = gitlabMrsService.requireAndStream(workPackage).pipe( + map((mrs) => mrs.length), + ); + + const issuesObservable = gitlabIssueService.requireAndStream(workPackage).pipe( + map((issues) => issues.length), + ); + + return combineLatest([mrsObservable, issuesObservable]).pipe( + map(([mrsCount, issuesCount]) => mrsCount + issuesCount), + ); +} + +export function initializeGitlabIntegrationPlugin(injector:Injector) { + const wpTabService = injector.get(WorkPackageTabsService); + wpTabService.register({ + component: GitlabTabComponent, + name: I18n.t('js.gitlab_integration.work_packages.tab_name'), + id: 'gitlab', + displayable: (workPackage) => !!workPackage.gitlab, + count: workPackageGitlabCount, + }); +} + + +@NgModule({ + imports: [ + OpSharedModule, + OpenprojectTabsModule, + ], + providers: [ + WorkPackagesGitlabMrsService, + WorkPackagesGitlabIssueService, + ], + declarations: [ + GitlabTabComponent, + TabHeaderMrsComponent, + TabHeaderIssueComponent, + TabMrsComponent, + TabIssueComponent, + GitActionsMenuDirective, + GitActionsMenuComponent, + MergeRequestComponent, + IssueComponent, + ], + exports: [ + GitlabTabComponent, + TabHeaderMrsComponent, + TabHeaderIssueComponent, + TabMrsComponent, + TabIssueComponent, + GitActionsMenuDirective, + GitActionsMenuComponent, + ], +}) +export class PluginModule { + constructor(injector:Injector) { + initializeGitlabIntegrationPlugin(injector); + } +} diff --git a/modules/gitlab_integration/frontend/module/merge-request/merge-request.component.html b/modules/gitlab_integration/frontend/module/merge-request/merge-request.component.html new file mode 100644 index 000000000000..b3507161a0b3 --- /dev/null +++ b/modules/gitlab_integration/frontend/module/merge-request/merge-request.component.html @@ -0,0 +1,57 @@ +
+ + + + {{state}} | + + + + + + + + {{ mergeRequest.pipelines[0].status }} + + +
+ {{ text.label_created_by }} + + + . + + + {{ text.label_last_updated_on }} + + . +
+ + diff --git a/modules/gitlab_integration/frontend/module/merge-request/merge-request.component.sass b/modules/gitlab_integration/frontend/module/merge-request/merge-request.component.sass new file mode 100644 index 000000000000..ef13e6c9f5c9 --- /dev/null +++ b/modules/gitlab_integration/frontend/module/merge-request/merge-request.component.sass @@ -0,0 +1,322 @@ +//-- copyright +// OpenProject is an open source project management software. +// Copyright (C) 2023 Ben Tey +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License version 3. +// +// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +// Copyright (C) 2006-2013 Jean-Philippe Lang +// Copyright (C) 2010-2013 the ChiliProject Team +// Copyright (C) 2012-2021 the OpenProject GmbH +// +// 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 2 +// 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, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// +// See docs/COPYRIGHT.rdoc for more details. +//++ + +@import "helpers" + +:host, +.op-merge-request + display: grid + grid-template-columns: minmax(270px, auto) auto auto 1fr + grid-template-areas: "title title title title" "info_created info_created info_created info_created" "state label_icon pipe_icon pipe_icon" "label label label label" + margin-bottom: 5px + margin-top: 5px + padding-bottom: 4px + padding-top: 4px + border-bottom: 1px solid #dddddd + + &:last-child + border-bottom: none + + &--iconsize + width: 16px + height: 16px + vertical-align: -3px + + &--iconwidth + min-width: 100px + + &--title + @include text-shortener + font-weight: bold + grid-area: title + line-height: 22px + margin-right: 20px + + &--avatar + grid-area: info + + &--info_created + @include text-shortener + display: block + grid-area: info_created + font-size: 0.75rem + color: var(--gray-dark) + margin-bottom: 3px + + &--info_updated + @include text-shortener + display: block + grid-area: info_updated + font-size: 0.75rem + color: var(--gray-dark) + margin-top: -4px + + &--username + color: var(--gray-dark) + text-decoration: none + + &--labels + display: none + grid-area: label + font-size: 0.9rem + color: var(--gray-dark) + margin-top: 10px + + &--label + display: inline-block + padding: 2px 0.5rem 2px 0.5rem + border-radius: 10rem + border: 1px solid #fff + color: #fff + font-size: 0.8rem + + &--link + font-size: 0.8rem + text-decoration: none + + &_open + background-color: #c3e6cd + color: #24663b + fill: #24663b + + &_ready + background-color: #c3e6cd + color: #24663b + fill: #24663b + + &_merged + background-color: #cbe2f9 + color: #0b5cad + fill: #0b5cad + + &_closed + background-color: #fdd4cd + color: #ae1800 + fill: #ae1800 + + &--label_icon + grid-area: label_icon + display: inline-block + padding: 4px 6px + border-radius: 10rem + font-size: 0.8rem + font-weight: 400 + align-self: center + width: fit-content + margin-right: 6px + border: 1px solid #cecdd4 + background-color: #f3f3f3 + + &:hover + border: 1px solid #b6b5ba + background-color: #e4e4e4 + + &_style + fill: #737278 + + &--state + grid-area: state + display: inline-block + padding: 5px 0.6rem 5px 0.6rem + border-radius: 10rem + font-size: 0.8rem + font-weight: 400 + text-transform: capitalize + align-self: center + white-space: nowrap + width: fit-content + margin-right: 6px + + &_open + background-color: #c3e6cd + color: #24663b + fill: #24663b + + &_ready + background-color: #c3e6cd + color: #24663b + fill: #24663b + + &_merged + background-color: #cbe2f9 + color: #0b5cad + fill: #0b5cad + + &_closed + background-color: #fdd4cd + color: #ae1800 + fill: #ae1800 + + &--pipeline-icon + grid-area: pipe_icon + padding: 0.25rem + border-radius: 10rem + font-size: 0.8rem + font-weight: 400 + align-self: center + margin-right: 6px + width: fit-content + height: 28px + align-items: center + display: inline-flex + + &_failed + fill: #dd2b0e + width: 20px + height: 20px + + &_bg_failed + background-color: #fdd4cd + + &_success + fill: #108548 + width: 20px + height: 20px + + &_bg_success + background-color: #c3e6cd + + &_running + fill: #367ad1 + width: 20px + height: 20px + + &_bg_running + background-color: #cddffd + + &_created + fill: #737278 + width: 20px + height: 20px + + &_bg_created + background-color: #ececef + + &_waiting + fill: #737278 + width: 20px + height: 20px + + &_bg_waiting + background-color: #ececef + + &_preparing + fill: #737278 + width: 20px + height: 20px + + &_bg_preparing + background-color: #ececef + + &_pending + fill: #737278 + width: 20px + height: 20px + + &_bg_pending + background-color: #ececef + + &_canceled + fill: #737278 + width: 20px + height: 20px + + &_bg_canceled + background-color: #ececef + + &_skipped + fill: #737278 + width: 20px + height: 20px + + &_bg_skipped + background-color: #ececef + + &_manual + fill: #737278 + width: 20px + height: 20px + + &_bg_manual + background-color: #ececef + + &_scheduled + fill: #737278 + width: 20px + height: 20px + + &_bg_scheduled + background-color: #ececef + + &--pipeline-label + font-size: 0.8rem + font-weight: 400 + margin-left: 4px + margin-right: 5px + text-transform: capitalize + + &_failed + color: #ae1800 + + &_success + color: #24663b + + &_running + color: #4782d0 + + &_created + color: #737278 + + &_waiting + color: #737278 + + &_preparing + color: #737278 + + &_pending + color: #737278 + + &_canceled + color: #737278 + + &_skipped + color: #737278 + + &_manual + color: #737278 + + &_scheduled + color: #737278 + + &--pipeline + margin-top: 12px + margin-bottom: 12px + margin-left: 0 + grid-area: pipeline + diff --git a/modules/gitlab_integration/frontend/module/merge-request/merge-request.component.ts b/modules/gitlab_integration/frontend/module/merge-request/merge-request.component.ts new file mode 100644 index 000000000000..1deaddff62e8 --- /dev/null +++ b/modules/gitlab_integration/frontend/module/merge-request/merge-request.component.ts @@ -0,0 +1,75 @@ +//-- copyright +// OpenProject is an open source project management software. +// Copyright (C) 2023 Ben Tey +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License version 3. +// +// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +// Copyright (C) 2006-2013 Jean-Philippe Lang +// Copyright (C) 2010-2013 the ChiliProject Team +// Copyright (C) 2012-2021 the OpenProject GmbH +// +// 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 2 +// 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, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// +// See docs/COPYRIGHT.rdoc for more details. +//++ + +import { Component, Input } from '@angular/core'; +import { PathHelperService } from 'core-app/core/path-helper/path-helper.service'; +import { I18nService } from 'core-app/core/i18n/i18n.service'; +import {IGitlabMergeRequestResource} from 'core-app/features/plugins/linked/openproject-gitlab_integration/typings'; + +@Component({ + selector: 'gitlab-merge-request', + templateUrl: './merge-request.component.html', + styleUrls: [ + './merge-request.component.sass', + './mr-pipeline.component.sass', + ], + host: { class: 'op-merge-request' } +}) + +export class MergeRequestComponent { + @Input() public mergeRequest:IGitlabMergeRequestResource; + + public text = { + label_created_by: this.I18n.t('js.label_created_by'), + label_last_updated_on: this.I18n.t('js.gitlab_integration.updated_on'), + label_details: this.I18n.t('js.label_details'), + label_pipelines: this.I18n.t('js.gitlab_integration.gitlab_pipelines'), + }; + + constructor(readonly PathHelper:PathHelperService, + readonly I18n:I18nService) { + } + + get state() { + + if (this.mergeRequest.state === 'opened') { + return (this.mergeRequest.draft ? 'open' : 'ready'); + } else { + return(this.mergeRequest.merged ? 'merged' : 'closed'); + } + } + + toggleLabels(identifier: string) { + const labelsElement = document.querySelector(`.op-merge-request--labels-${identifier}`) as HTMLElement; + + // Check the current display property and toggle it + labelsElement.style.display = labelsElement.style.display === 'none' ? 'block' : 'none'; + } + +} diff --git a/modules/gitlab_integration/frontend/module/merge-request/mr-pipeline.component.sass b/modules/gitlab_integration/frontend/module/merge-request/mr-pipeline.component.sass new file mode 100644 index 000000000000..fb773b1dcc28 --- /dev/null +++ b/modules/gitlab_integration/frontend/module/merge-request/mr-pipeline.component.sass @@ -0,0 +1,90 @@ +//-- copyright +// OpenProject is an open source project management software. +// Copyright (C) 2023 Ben Tey +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License version 3. +// +// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +// Copyright (C) 2006-2013 Jean-Philippe Lang +// Copyright (C) 2010-2013 the ChiliProject Team +// Copyright (C) 2012-2021 the OpenProject GmbH +// +// 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 2 +// 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, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// +// See docs/COPYRIGHT.rdoc for more details. +//++ +.op-mr-pipeline + display: grid + grid-row: span 4 + grid-template-columns: 28px 1fr auto // auto + grid-template-areas: "pipeline-state-icon pipeline-info pipeline-avatar" // pipeline-details" + list-style-type: none + border: 1px solid #e4e4e4 + padding: 0.3rem 1rem + // background: rgba(0, 0, 0, 0.05) + font-size: 0.84rem + + &:first-child + border-top-right-radius: 5px + border-top-left-radius: 5px + + &:last-child + border-bottom-right-radius: 5px + border-bottom-left-radius: 5px + + &--avatar img + grid-area: pipeline-avatar + display: inline-block + width: 22px + height: 22px + margin-right: 5px + border-radius: var(--user-avatar-border-radius) + + &--info + grid-area: pipeline-info + + &--state + color: var(--gray-dark) + font-style: italic + margin-left: 1em + + &--state-icon + grid-area: pipeline-state-icon + + &_queued + color: cadetblue + + &_running + color: orange + + &_success + color: green + + &_failed, + &_timed_out, + &_action_required, + &_stale + color: red + + &_skipped, + &_neutral, + &_cancelled + color: gray + color: gray + color: gray + + &--details + grid-area: pipeline-details diff --git a/modules/gitlab_integration/frontend/module/tab-header-issue/styles/tab-header-issue.sass b/modules/gitlab_integration/frontend/module/tab-header-issue/styles/tab-header-issue.sass new file mode 100644 index 000000000000..e5eb014b830a --- /dev/null +++ b/modules/gitlab_integration/frontend/module/tab-header-issue/styles/tab-header-issue.sass @@ -0,0 +1,50 @@ +//-- copyright +// OpenProject is an open source project management software. +// Copyright (C) 2023 Ben Tey +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License version 3. +// +// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +// Copyright (C) 2006-2013 Jean-Philippe Lang +// Copyright (C) 2010-2013 the ChiliProject Team +// Copyright (C) 2012-2021 the OpenProject GmbH +// +// 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 2 +// 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, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// +// See docs/COPYRIGHT.rdoc for more details. +//++ + +.gitlab-issue-header + display: flex + flex-wrap: wrap-reverse + justify-content: flex-end + + border-bottom: 1px solid #ddd + background-color: var(--body-background) + + .title + flex: 1 1 auto + border-bottom: 0 + margin: 0 + padding: 0 0 0 4px + font-weight: bold + font-size: 1rem + line-height: 32px + text-transform: uppercase + + .s16x32 + width: 16px + height: 32px diff --git a/modules/gitlab_integration/frontend/module/tab-header-issue/tab-header-issue.component.ts b/modules/gitlab_integration/frontend/module/tab-header-issue/tab-header-issue.component.ts new file mode 100644 index 000000000000..447a44c7ad3e --- /dev/null +++ b/modules/gitlab_integration/frontend/module/tab-header-issue/tab-header-issue.component.ts @@ -0,0 +1,50 @@ +//-- copyright +// OpenProject is an open source project management software. +// Copyright (C) 2023 Ben Tey +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License version 3. +// +// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +// Copyright (C) 2006-2013 Jean-Philippe Lang +// Copyright (C) 2010-2013 the ChiliProject Team +// Copyright (C) 2012-2021 the OpenProject GmbH +// +// 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 2 +// 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, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// +// See docs/COPYRIGHT.rdoc for more details. +//++ + +import { Component, Input } from '@angular/core'; +import { WorkPackageResource } from "core-app/features/hal/resources/work-package-resource"; +import { I18nService } from "core-app/core/i18n/i18n.service"; + +@Component({ + selector: 'tab-header-issue', + templateUrl: './tab-header-issue.template.html', + styleUrls: [ + './styles/tab-header-issue.sass' + ] +}) +export class TabHeaderIssueComponent { + @Input() public workPackage:WorkPackageResource; + + public text = { + title: this.I18n.t('js.gitlab_integration.tab_header_issue.title'), + }; + + constructor(readonly I18n:I18nService) { + } +} diff --git a/modules/gitlab_integration/frontend/module/tab-header-issue/tab-header-issue.template.html b/modules/gitlab_integration/frontend/module/tab-header-issue/tab-header-issue.template.html new file mode 100644 index 000000000000..1fc5efe1023f --- /dev/null +++ b/modules/gitlab_integration/frontend/module/tab-header-issue/tab-header-issue.template.html @@ -0,0 +1,6 @@ +
+ +

+ {{text.title}} +

+
diff --git a/modules/gitlab_integration/frontend/module/tab-header-mr/styles/tab-header-mr.sass b/modules/gitlab_integration/frontend/module/tab-header-mr/styles/tab-header-mr.sass new file mode 100644 index 000000000000..1613363e759d --- /dev/null +++ b/modules/gitlab_integration/frontend/module/tab-header-mr/styles/tab-header-mr.sass @@ -0,0 +1,51 @@ +//-- copyright +// OpenProject is an open source project management software. +// Copyright (C) 2023 Ben Tey +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License version 3. +// +// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +// Copyright (C) 2006-2013 Jean-Philippe Lang +// Copyright (C) 2010-2013 the ChiliProject Team +// Copyright (C) 2012-2021 the OpenProject GmbH +// +// 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 2 +// 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, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// +// See docs/COPYRIGHT.rdoc for more details. +//++ + +.gitlab-mr-header + display: flex + flex-wrap: wrap-reverse + justify-content: flex-end + + border-bottom: 1px solid #ddd + background-color: var(--body-background) + + .title + flex: 1 1 auto + border-bottom: 0 + margin: 0 + padding: 0 0 0 4px + font-weight: bold + font-size: 1rem + line-height: 32px + text-transform: uppercase + align-self: baseline + + .s16x32 + width: 16px + height: 32px diff --git a/modules/gitlab_integration/frontend/module/tab-header-mr/tab-header-mr.component.ts b/modules/gitlab_integration/frontend/module/tab-header-mr/tab-header-mr.component.ts new file mode 100644 index 000000000000..dc208c5a55cf --- /dev/null +++ b/modules/gitlab_integration/frontend/module/tab-header-mr/tab-header-mr.component.ts @@ -0,0 +1,54 @@ +//-- copyright +// OpenProject is an open source project management software. +// Copyright (C) 2023 Ben Tey +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License version 3. +// +// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +// Copyright (C) 2006-2013 Jean-Philippe Lang +// Copyright (C) 2010-2013 the ChiliProject Team +// Copyright (C) 2012-2021 the OpenProject GmbH +// +// 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 2 +// 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, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// +// See docs/COPYRIGHT.rdoc for more details. +//++ + +import { Component, Input } from '@angular/core'; +import { WorkPackageResource } from "core-app/features/hal/resources/work-package-resource"; +import { I18nService } from "core-app/core/i18n/i18n.service"; + +@Component({ + selector: 'tab-header-mr', + templateUrl: './tab-header-mr.template.html', + styleUrls: [ + './styles/tab-header-mr.sass' + ] +}) +export class TabHeaderMrsComponent { + @Input() public workPackage:WorkPackageResource; + + public text = { + title: this.I18n.t('js.gitlab_integration.tab_header_mr.title'), + // createPrButtonLabel: this.I18n.t('js.gitlab_integration.tab_header.create_mr.label'), + // createPrButtonDescription: this.I18n.t('js.gitlab_integration.tab_header.create_mr.description'), + gitMenuLabel: this.I18n.t('js.gitlab_integration.tab_header_mr.copy_menu.label'), + gitMenuDescription: this.I18n.t('js.gitlab_integration.tab_header_mr.copy_menu.description'), + }; + + constructor(readonly I18n:I18nService) { + } +} diff --git a/modules/gitlab_integration/frontend/module/tab-header-mr/tab-header-mr.template.html b/modules/gitlab_integration/frontend/module/tab-header-mr/tab-header-mr.template.html new file mode 100644 index 000000000000..031b3c52a576 --- /dev/null +++ b/modules/gitlab_integration/frontend/module/tab-header-mr/tab-header-mr.template.html @@ -0,0 +1,21 @@ +
+ +

+ {{text.title}} +

+
    +
  • + +
  • +
+
diff --git a/modules/gitlab_integration/frontend/module/tab-issue/tab-issue.component.ts b/modules/gitlab_integration/frontend/module/tab-issue/tab-issue.component.ts new file mode 100644 index 000000000000..28c96b44f791 --- /dev/null +++ b/modules/gitlab_integration/frontend/module/tab-issue/tab-issue.component.ts @@ -0,0 +1,70 @@ +//-- copyright +// OpenProject is an open source project management software. +// Copyright (C) 2023 Ben Tey +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License version 3. +// +// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +// Copyright (C) 2006-2013 Jean-Philippe Lang +// Copyright (C) 2010-2013 the ChiliProject Team +// Copyright (C) 2012-2021 the OpenProject GmbH +// +// 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 2 +// 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, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// +// See docs/COPYRIGHT.rdoc for more details. +//++ + +import { ChangeDetectorRef, Component, Input, OnInit } from '@angular/core'; +import { WorkPackageResource } from "core-app/features/hal/resources/work-package-resource"; +import { HalResourceService } from "core-app/features/hal/services/hal-resource.service"; +import { CollectionResource } from "core-app/features/hal/resources/collection-resource"; +import { I18nService } from "core-app/core/i18n/i18n.service"; +import {IGitlabIssueResource} from "core-app/features/plugins/linked/openproject-gitlab_integration/typings"; +import {ApiV3Service} from "core-app/core/apiv3/api-v3.service"; + +@Component({ + selector: 'tab-issue', + templateUrl: './tab-issue.template.html', + host: { class: 'op-issue' } +}) +export class TabIssueComponent implements OnInit { + @Input() public workPackage:WorkPackageResource; + + public gitlabIssues:IGitlabIssueResource[] = []; + + constructor( + readonly I18n:I18nService, + readonly apiV3Service:ApiV3Service, + readonly halResourceService:HalResourceService, + readonly changeDetector:ChangeDetectorRef, + ) {} + + ngOnInit(): void { + const basePath = this.apiV3Service.work_packages.id(this.workPackage.id as string).path; + const gitlabIssuePath = `${basePath}/gitlab_issues`; + + this.halResourceService + .get>(gitlabIssuePath) + .subscribe((value) => { + this.gitlabIssues = value.elements; + this.changeDetector.detectChanges(); + }); + } + + public getEmptyText() { + return this.I18n.t('js.gitlab_integration.tab_issue.empty',{ wp_id: this.workPackage.id }); + } +} diff --git a/modules/gitlab_integration/frontend/module/tab-issue/tab-issue.template.html b/modules/gitlab_integration/frontend/module/tab-issue/tab-issue.template.html new file mode 100644 index 000000000000..ce4a51d334e8 --- /dev/null +++ b/modules/gitlab_integration/frontend/module/tab-issue/tab-issue.template.html @@ -0,0 +1,5 @@ + +

+
+ + diff --git a/modules/gitlab_integration/frontend/module/tab-issue/wp-gitlab-issue.service.ts b/modules/gitlab_integration/frontend/module/tab-issue/wp-gitlab-issue.service.ts new file mode 100644 index 000000000000..7898eba00762 --- /dev/null +++ b/modules/gitlab_integration/frontend/module/tab-issue/wp-gitlab-issue.service.ts @@ -0,0 +1,52 @@ +//-- copyright +// OpenProject is an open source project management software. +// Copyright (C) 2023 Ben Tey +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License version 3. +// +// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +// Copyright (C) 2006-2013 Jean-Philippe Lang +// Copyright (C) 2010-2013 the ChiliProject Team +// Copyright (C) 2012-2021 the OpenProject GmbH +// +// 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 2 +// 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, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// +// See docs/COPYRIGHT.rdoc for more details. +//++ + +import { WorkPackageResource } from "core-app/features/hal/resources/work-package-resource"; +import { HalResource } from "core-app/features/hal/resources/hal-resource"; +import { Injectable } from '@angular/core'; +import { ConfigurationService } from "core-app/core/config/configuration.service"; +import { WorkPackageLinkedResourceCache } from 'core-app/features/work-packages/components/wp-single-view-tabs/wp-linked-resource-cache.service'; + +@Injectable() +export class WorkPackagesGitlabIssueService extends WorkPackageLinkedResourceCache { + + constructor(public ConfigurationService:ConfigurationService) { + super(); + } + + protected load(workPackage:WorkPackageResource):Promise { + return workPackage.gitlab_issues.$update().then((data:any) => { + return this.sortList(data.elements); + }); + } + + protected sortList(gitlabIssue:HalResource[], attr = 'createdAt'):HalResource[] { + return _.sortBy(_.flatten(gitlabIssue), attr); + } +} diff --git a/modules/gitlab_integration/frontend/module/tab-mrs/tab-mrs.component.ts b/modules/gitlab_integration/frontend/module/tab-mrs/tab-mrs.component.ts new file mode 100644 index 000000000000..dc4254128171 --- /dev/null +++ b/modules/gitlab_integration/frontend/module/tab-mrs/tab-mrs.component.ts @@ -0,0 +1,70 @@ +//-- copyright +// OpenProject is an open source project management software. +// Copyright (C) 2023 Ben Tey +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License version 3. +// +// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +// Copyright (C) 2006-2013 Jean-Philippe Lang +// Copyright (C) 2010-2013 the ChiliProject Team +// Copyright (C) 2012-2021 the OpenProject GmbH +// +// 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 2 +// 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, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// +// See docs/COPYRIGHT.rdoc for more details. +//++ + +import { ChangeDetectorRef, Component, Input, OnInit } from '@angular/core'; +import { WorkPackageResource } from "core-app/features/hal/resources/work-package-resource"; +import { HalResourceService } from "core-app/features/hal/services/hal-resource.service"; +import { CollectionResource } from "core-app/features/hal/resources/collection-resource"; +import { I18nService } from "core-app/core/i18n/i18n.service"; +import {IGitlabMergeRequestResource} from "core-app/features/plugins/linked/openproject-gitlab_integration/typings"; +import {ApiV3Service} from "core-app/core/apiv3/api-v3.service"; + +@Component({ + selector: 'tab-mrs', + templateUrl: './tab-mrs.template.html', + host: { class: 'op-mrs' } +}) +export class TabMrsComponent implements OnInit { + @Input() public workPackage:WorkPackageResource; + + public mergeRequests:IGitlabMergeRequestResource[] = []; + + constructor( + readonly I18n:I18nService, + readonly apiV3Service:ApiV3Service, + readonly halResourceService:HalResourceService, + readonly changeDetector:ChangeDetectorRef, + ) {} + + ngOnInit(): void { + const basePath = this.apiV3Service.work_packages.id(this.workPackage.id as string).path; + const mergeRequestsPath = `${basePath}/gitlab_merge_requests`; + + this.halResourceService + .get>(mergeRequestsPath) + .subscribe((value) => { + this.mergeRequests = value.elements; + this.changeDetector.detectChanges(); + }); + } + + public getEmptyText() { + return this.I18n.t('js.gitlab_integration.tab_mrs.empty',{ wp_id: this.workPackage.id }); + } +} diff --git a/modules/gitlab_integration/frontend/module/tab-mrs/tab-mrs.template.html b/modules/gitlab_integration/frontend/module/tab-mrs/tab-mrs.template.html new file mode 100644 index 000000000000..43ab49c22624 --- /dev/null +++ b/modules/gitlab_integration/frontend/module/tab-mrs/tab-mrs.template.html @@ -0,0 +1,5 @@ + +

+
+ + diff --git a/modules/gitlab_integration/frontend/module/tab-mrs/wp-gitlab-mrs.service.ts b/modules/gitlab_integration/frontend/module/tab-mrs/wp-gitlab-mrs.service.ts new file mode 100644 index 000000000000..aed4c23bea00 --- /dev/null +++ b/modules/gitlab_integration/frontend/module/tab-mrs/wp-gitlab-mrs.service.ts @@ -0,0 +1,52 @@ +//-- copyright +// OpenProject is an open source project management software. +// Copyright (C) 2023 Ben Tey +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License version 3. +// +// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +// Copyright (C) 2006-2013 Jean-Philippe Lang +// Copyright (C) 2010-2013 the ChiliProject Team +// Copyright (C) 2012-2021 the OpenProject GmbH +// +// 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 2 +// 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, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// +// See docs/COPYRIGHT.rdoc for more details. +//++ + +import { WorkPackageResource } from "core-app/features/hal/resources/work-package-resource"; +import { HalResource } from "core-app/features/hal/resources/hal-resource"; +import { Injectable } from '@angular/core'; +import { ConfigurationService } from "core-app/core/config/configuration.service"; +import { WorkPackageLinkedResourceCache } from 'core-app/features/work-packages/components/wp-single-view-tabs/wp-linked-resource-cache.service'; + +@Injectable() +export class WorkPackagesGitlabMrsService extends WorkPackageLinkedResourceCache { + + constructor(public ConfigurationService:ConfigurationService) { + super(); + } + + protected load(workPackage:WorkPackageResource):Promise { + return workPackage.gitlab_merge_requests.$update().then((data:any) => { + return this.sortList(data.elements); + }); + } + + protected sortList(mergeRequests:HalResource[], attr = 'createdAt'):HalResource[] { + return _.sortBy(_.flatten(mergeRequests), attr); + } +} diff --git a/modules/gitlab_integration/frontend/module/typings.d.ts b/modules/gitlab_integration/frontend/module/typings.d.ts new file mode 100644 index 000000000000..f790de805c73 --- /dev/null +++ b/modules/gitlab_integration/frontend/module/typings.d.ts @@ -0,0 +1,99 @@ +//-- copyright +// OpenProject is an open source project management software. +// Copyright (C) 2023 Ben Tey +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License version 3. +// +// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +// Copyright (C) 2006-2013 Jean-Philippe Lang +// Copyright (C) 2010-2013 the ChiliProject Team +// Copyright (C) 2012-2021 the OpenProject GmbH +// +// 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 2 +// 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, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// +// See docs/COPYRIGHT.rdoc for more details. +//++ + +import { HalResourceClass } from 'core-app/modules/hal/resources/hal-resource'; + + +export interface ISnippet { + id:string; + name:string; + textToCopy:()=>string +} + +export interface IGitlabIssueResource extends HalResourceClass { + body?:{ + format?:string; + raw?:string; + html?:string; + }, + createdAt?:string; + gitlabUpdatedAt?:string; + htmlUrl?:string; + id?:number; + labels?:string[]; + number?:number; + repository?:string; + state?:string; + title?:string; + updatedAt?:string; + gitlabUser?:IGitlabUserResource; +} + +export interface IGitlabMergeRequestResource extends HalResourceClass { + body?:{ + format?:string; + raw?:string; + html?:string; + }, + createdAt?:string; + draft?:boolean; + gitlabUpdatedAt?:string; + htmlUrl?:string; + id?:number; + labels?:string[]; + merged?:boolean; + mergedAt?:string; + mergedBy?:IGitlabUserResource; + number?:number; + repository?:string; + state?:string; + title?:string; + updatedAt?:string; + gitlabUser?:IGitlabUserResource; + pipelines?:IGitlabPipelineResource[]; +} + +export interface IGitlabUserResource { + avatarUrl:string; + email:string; + login:string; +} + +export interface IGitlabPipelineResource { + userAvatarUrl:string; + completedAt:string; + detailsUrl:string; + htmlUrl:string; + name:string; + startedAt:string; + status:string; + ci_details:string[]; + username:string; + commitId:string; +} \ No newline at end of file diff --git a/modules/gitlab_integration/lib/api/v3/gitlab_issues/gitlab_issue_collection_representer.rb b/modules/gitlab_integration/lib/api/v3/gitlab_issues/gitlab_issue_collection_representer.rb new file mode 100644 index 000000000000..f3285a4c62d2 --- /dev/null +++ b/modules/gitlab_integration/lib/api/v3/gitlab_issues/gitlab_issue_collection_representer.rb @@ -0,0 +1,40 @@ +#-- encoding: UTF-8 + +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ + +module API + module V3 + module GitlabIssues + class GitlabIssueCollectionRepresenter < ::API::Decorators::Collection + self.to_eager_load = ::API::V3::GitlabIssues::GitlabIssueRepresenter.to_eager_load + end + end + end +end diff --git a/modules/gitlab_integration/lib/api/v3/gitlab_issues/gitlab_issue_representer.rb b/modules/gitlab_integration/lib/api/v3/gitlab_issues/gitlab_issue_representer.rb new file mode 100644 index 000000000000..f0043d475517 --- /dev/null +++ b/modules/gitlab_integration/lib/api/v3/gitlab_issues/gitlab_issue_representer.rb @@ -0,0 +1,90 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ + +require 'roar/decorator' +require 'roar/json/hal' + +module API + module V3 + module GitlabIssues + class GitlabIssueRepresenter < ::API::Decorators::Single + include API::Caching::CachedRepresenter + include API::Decorators::DateProperty + include API::Decorators::FormattableProperty + include API::Decorators::LinkedResource + + def initialize(model, current_user:, **_opts) + # We force `embed_links` so that github_user and github_check_runs + # are embedded and we can avoid having separate endpoints. + super(model, current_user: current_user, embed_links: true) + end + + cached_representer key_parts: %i[gitlab_user] + + property :id + + property :number + + property :gitlab_html_url, as: :htmlUrl + + property :state, + render_nil: true + + property :repository, + render_nil: true + + date_time_property :gitlab_updated_at, + render_nil: true, + setter: ->(*) { nil } + + property :title, + render_nil: true + + formattable_property :body, + render_nil: true + + property :labels + + associated_resource :gitlab_user, + representer: ::API::V3::GitlabIssues::GitlabUserRepresenter, + link_title_attribute: :gitlab_name + + date_time_property :created_at + + date_time_property :updated_at + + def _type + 'GitlabIssue' + end + + self.to_eager_load = %i[gitlab_user] + end + end + end +end diff --git a/modules/gitlab_integration/lib/api/v3/gitlab_issues/gitlab_issues_by_work_package_api.rb b/modules/gitlab_integration/lib/api/v3/gitlab_issues/gitlab_issues_by_work_package_api.rb new file mode 100644 index 000000000000..7604173b4060 --- /dev/null +++ b/modules/gitlab_integration/lib/api/v3/gitlab_issues/gitlab_issues_by_work_package_api.rb @@ -0,0 +1,53 @@ +#-- encoding: UTF-8 + +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ + +module API + module V3 + module GitlabIssues + class GitlabIssuesByWorkPackageAPI < ::API::OpenProjectAPI + after_validation do + authorize_in_work_package(:show_gitlab_content, work_package: @work_package) + @gitlab_issues = @work_package.gitlab_issues + end + + resources :gitlab_issues do + get do + path = api_v3_paths.gitlab_issues_by_work_package(@work_package.id) + GitlabIssueCollectionRepresenter.new(@gitlab_issues, + @gitlab_issues.count, + self_link: path, + current_user:) + end + end + end + end + end +end diff --git a/modules/gitlab_integration/lib/api/v3/gitlab_issues/gitlab_user_representer.rb b/modules/gitlab_integration/lib/api/v3/gitlab_issues/gitlab_user_representer.rb new file mode 100644 index 000000000000..46627d1b1735 --- /dev/null +++ b/modules/gitlab_integration/lib/api/v3/gitlab_issues/gitlab_user_representer.rb @@ -0,0 +1,52 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ + +require 'roar/decorator' +require 'roar/json/hal' + +module API + module V3 + module GitlabIssues + class GitlabUserRepresenter < ::API::Decorators::Single + include API::Caching::CachedRepresenter + + self_link id_attribute: :id, + title_getter: ->(*) { nil } + + property :gitlab_name, as: :login + property :gitlab_email, as: :email + property :gitlab_avatar_url, as: :avatarUrl + + def _type + 'GitlabUser' + end + end + end + end +end diff --git a/modules/gitlab_integration/lib/api/v3/gitlab_merge_requests/gitlab_merge_request_collection_representer.rb b/modules/gitlab_integration/lib/api/v3/gitlab_merge_requests/gitlab_merge_request_collection_representer.rb new file mode 100644 index 000000000000..503649142cc3 --- /dev/null +++ b/modules/gitlab_integration/lib/api/v3/gitlab_merge_requests/gitlab_merge_request_collection_representer.rb @@ -0,0 +1,40 @@ +#-- encoding: UTF-8 + +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ + +module API + module V3 + module GitlabMergeRequests + class GitlabMergeRequestCollectionRepresenter < ::API::Decorators::Collection + self.to_eager_load = ::API::V3::GitlabMergeRequests::GitlabMergeRequestRepresenter.to_eager_load + end + end + end +end diff --git a/modules/gitlab_integration/lib/api/v3/gitlab_merge_requests/gitlab_merge_request_representer.rb b/modules/gitlab_integration/lib/api/v3/gitlab_merge_requests/gitlab_merge_request_representer.rb new file mode 100644 index 000000000000..fa08a2b1a4de --- /dev/null +++ b/modules/gitlab_integration/lib/api/v3/gitlab_merge_requests/gitlab_merge_request_representer.rb @@ -0,0 +1,108 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ + +require 'roar/decorator' +require 'roar/json/hal' + +module API + module V3 + module GitlabMergeRequests + class GitlabMergeRequestRepresenter < ::API::Decorators::Single + include API::Caching::CachedRepresenter + include API::Decorators::DateProperty + include API::Decorators::FormattableProperty + include API::Decorators::LinkedResource + + def initialize(model, current_user:, **_opts) + # We force `embed_links` so that github_user and github_check_runs + # are embedded and we can avoid having separate endpoints. + super(model, current_user: current_user, embed_links: true) + end + + cached_representer key_parts: %i[gitlab_user merged_by] + + property :id + + property :number + + property :gitlab_html_url, as: :htmlUrl + + property :state, + render_nil: true + + property :repository, + render_nil: true + + date_time_property :gitlab_updated_at, + render_nil: true, + setter: ->(*) { nil } + + property :title, + render_nil: true + + formattable_property :body, + render_nil: true + + property :draft, + render_nil: true + + property :merged, + render_nil: true + + property :labels + + associated_resource :gitlab_user, + representer: ::API::V3::GitlabMergeRequests::GitlabUserRepresenter, + link_title_attribute: :gitlab_name + + associated_resource :merged_by, + representer: ::API::V3::GitlabMergeRequests::GitlabUserRepresenter, + v3_path: :gitlab_user, + link_title_attribute: :gitlab_name + + # TODO: pending until get the list of statuses... + associated_resources :latest_pipelines, + as: :pipelines, + representer: ::API::V3::GitlabMergeRequests::GitlabPipelineRepresenter, + v3_path: :gitlab_pipeline, + link_title_attribute: :name + + date_time_property :created_at + + date_time_property :updated_at + + def _type + 'GitlabMergeRequest' + end + + self.to_eager_load = %i[gitlab_user merged_by] + end + end + end +end diff --git a/modules/gitlab_integration/lib/api/v3/gitlab_merge_requests/gitlab_merge_requests_by_work_package_api.rb b/modules/gitlab_integration/lib/api/v3/gitlab_merge_requests/gitlab_merge_requests_by_work_package_api.rb new file mode 100644 index 000000000000..8627ba320710 --- /dev/null +++ b/modules/gitlab_integration/lib/api/v3/gitlab_merge_requests/gitlab_merge_requests_by_work_package_api.rb @@ -0,0 +1,53 @@ +#-- encoding: UTF-8 + +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ + +module API + module V3 + module GitlabMergeRequests + class GitlabMergeRequestsByWorkPackageAPI < ::API::OpenProjectAPI + after_validation do + authorize_in_work_package(:show_gitlab_content, work_package: @work_package) + @gitlab_merge_requests = @work_package.gitlab_merge_requests + end + + resources :gitlab_merge_requests do + get do + path = api_v3_paths.gitlab_merge_requests_by_work_package(@work_package.id) + GitlabMergeRequestCollectionRepresenter.new(@gitlab_merge_requests, + @gitlab_merge_requests.count, + self_link: path, + current_user:) + end + end + end + end + end +end diff --git a/modules/gitlab_integration/lib/api/v3/gitlab_merge_requests/gitlab_pipeline_representer.rb b/modules/gitlab_integration/lib/api/v3/gitlab_merge_requests/gitlab_pipeline_representer.rb new file mode 100644 index 000000000000..fc3aab2bf244 --- /dev/null +++ b/modules/gitlab_integration/lib/api/v3/gitlab_merge_requests/gitlab_pipeline_representer.rb @@ -0,0 +1,61 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ + +require 'roar/decorator' +require 'roar/json/hal' + +module API + module V3 + module GitlabMergeRequests + class GitlabPipelineRepresenter < ::API::Decorators::Single + include API::Caching::CachedRepresenter + include API::Decorators::DateProperty + + self_link id_attribute: :id, + title_getter: ->(*) { nil } + + property :gitlab_html_url, as: :htmlUrl + property :gitlab_user_avatar_url, as: :userAvatarUrl + property :name + property :status + property :details_url + property :ci_details + property :username + property :commit_id, as: :commitId + + date_time_property :started_at + date_time_property :completed_at + + def _type + 'GitlabPipeline' + end + end + end + end +end diff --git a/modules/gitlab_integration/lib/api/v3/gitlab_merge_requests/gitlab_user_representer.rb b/modules/gitlab_integration/lib/api/v3/gitlab_merge_requests/gitlab_user_representer.rb new file mode 100644 index 000000000000..55f90e5c6416 --- /dev/null +++ b/modules/gitlab_integration/lib/api/v3/gitlab_merge_requests/gitlab_user_representer.rb @@ -0,0 +1,52 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ + +require 'roar/decorator' +require 'roar/json/hal' + +module API + module V3 + module GitlabMergeRequests + class GitlabUserRepresenter < ::API::Decorators::Single + include API::Caching::CachedRepresenter + + self_link id_attribute: :id, + title_getter: ->(*) { nil } + + property :gitlab_name, as: :login + property :gitlab_email, as: :email + property :gitlab_avatar_url, as: :avatarUrl + + def _type + 'GitlabUser' + end + end + end + end +end diff --git a/modules/gitlab_integration/lib/open_project/gitlab_integration.rb b/modules/gitlab_integration/lib/open_project/gitlab_integration.rb new file mode 100644 index 000000000000..70f358282d54 --- /dev/null +++ b/modules/gitlab_integration/lib/open_project/gitlab_integration.rb @@ -0,0 +1,34 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ + +module OpenProject + module GitlabIntegration + require "open_project/gitlab_integration/engine" + end +end diff --git a/modules/gitlab_integration/lib/open_project/gitlab_integration/engine.rb b/modules/gitlab_integration/lib/open_project/gitlab_integration/engine.rb new file mode 100644 index 000000000000..fbb8b2abf4da --- /dev/null +++ b/modules/gitlab_integration/lib/open_project/gitlab_integration/engine.rb @@ -0,0 +1,109 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ + +require 'open_project/plugins' + +require_relative './patches/api/work_package_representer' +require_relative './notification_handlers' +require_relative './hook_handler' +require_relative './services' + +module OpenProject::GitlabIntegration + class Engine < ::Rails::Engine + engine_name :openproject_gitlab_integration + + include OpenProject::Plugins::ActsAsOpEngine + + register 'openproject-gitlab_integration', + :author_url => 'https://github.com/btey/openproject', + bundled: true do + project_module(:gitlab, dependencies: :work_package_tracking) do + permission(:show_gitlab_content, + {}, + permissible_on: %i[work_package project]) + end + end + + patches %w[WorkPackage] + + initializer 'gitlab.register_hook' do + ::OpenProject::Webhooks.register_hook 'gitlab' do |hook, environment, params, user| + HookHandler.new.process(hook, environment, params, user) + end + end + + initializer 'gitlab.subscribe_to_notifications' do + ::OpenProject::Notifications.subscribe('gitlab.merge_request_hook', + &NotificationHandlers.method(:merge_request_hook)) + ::OpenProject::Notifications.subscribe('gitlab.note_hook', + &NotificationHandlers.method(:note_hook)) + ::OpenProject::Notifications.subscribe('gitlab.issue_hook', + &NotificationHandlers.method(:issue_hook)) + ::OpenProject::Notifications.subscribe('gitlab.push_hook', + &NotificationHandlers.method(:push_hook)) + ::OpenProject::Notifications.subscribe('gitlab.pipeline_hook', + &NotificationHandlers.method(:pipeline_hook)) + ::OpenProject::Notifications.subscribe('gitlab.system_hook', + &NotificationHandlers.method(:system_hook)) + end + + extend_api_response(:v3, :work_packages, :work_package, + &::OpenProject::GitlabIntegration::Patches::API::WorkPackageRepresenter.extension) + + add_api_path :gitlab_merge_requests_by_work_package do |id| + "#{work_package(id)}/gitlab_merge_requests" + end + + add_api_path :gitlab_issues_by_work_package do |id| + "#{work_package(id)}/gitlab_issues" + end + + add_api_path :gitlab_user do |id| + "gitlab_users/#{id}" + end + + add_api_path :gitlab_pipeline do |id| + "gitlab_pipeline/#{id}" + end + + add_api_endpoint 'API::V3::WorkPackages::WorkPackagesAPI', :id do + mount ::API::V3::GitlabMergeRequests::GitlabMergeRequestsByWorkPackageAPI + end + + add_api_endpoint 'API::V3::WorkPackages::WorkPackagesAPI', :id do + mount ::API::V3::GitlabIssues::GitlabIssuesByWorkPackageAPI + end + + config.to_prepare do + # Register the cron job to clean up old gitlab merge requests + ::Cron::CronJob.register! ::Cron::ClearOldMergeRequestsJob + end + + end +end diff --git a/modules/gitlab_integration/lib/open_project/gitlab_integration/hook_handler.rb b/modules/gitlab_integration/lib/open_project/gitlab_integration/hook_handler.rb new file mode 100644 index 000000000000..27a0d0853561 --- /dev/null +++ b/modules/gitlab_integration/lib/open_project/gitlab_integration/hook_handler.rb @@ -0,0 +1,66 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ + +module OpenProject::GitlabIntegration + class HookHandler + # List of the gitlab events we can handle. + KNOWN_EVENTS = %w[ + push_hook + issue_hook + note_hook + merge_request_hook + pipeline_hook + system_hook + ].freeze + + # A gitlab webhook happened. + # We need to check validity of the data and send a Notification + # which we process in our NotificationHandler. + def process(hook, request, params, user) + event_type = request.env['HTTP_X_GITLAB_EVENT'] + event_type.gsub!(' ','_') + event_type = event_type.to_s.downcase + + Rails.logger.debug "Received gitlab webhook #{event_type}" + + return 404 unless KNOWN_EVENTS.include?(event_type) + return 403 unless user.present? + + payload = params[:payload] + .permit! + .to_h + .merge('open_project_user_id' => user.id, + 'gitlab_event' => event_type) + + OpenProject::Notifications.send("gitlab.#{event_type}", payload) + + return 200 + end + end +end diff --git a/modules/gitlab_integration/lib/open_project/gitlab_integration/notification_handler/helper.rb b/modules/gitlab_integration/lib/open_project/gitlab_integration/notification_handler/helper.rb new file mode 100644 index 000000000000..cf715d0bb69c --- /dev/null +++ b/modules/gitlab_integration/lib/open_project/gitlab_integration/notification_handler/helper.rb @@ -0,0 +1,150 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ + +module OpenProject::GitlabIntegration + module NotificationHandler + module Helper + ## + # Parses the given source string and returns a list of work_package ids + # which it finds and should be considered public or private. + # WorkPackages are identified by their URL. + # Params: + # source: string + # Returns: + # Array + def extract_work_package_ids(text, kind = "") + # matches the following things (given that `Setting.host_name` equals 'www.openproject.org') + # - http://www.openproject.org/wp/1234 + # - https://www.openproject.org/wp/1234 + # - http://www.openproject.org/work_packages/1234 + # - https://www.openproject.org/subdirectory/work_packages/1234 + # Or with the following prefix: OP# PP# + # e.g.,: This is a reference to OP#1234 + # For private comments you can use the prefix: PP# + host_name = Regexp.escape(Setting.host_name) + wp_regex = if kind == 'private' + /PP#(\d+)/ + elsif kind != 'note' + /OP#(\d+)|PP#(\d+)|http(?:s?):\/\/#{host_name}\/(?:\S+?\/)*(?:work_packages|wp)\/([0-9]+)/ + else + /OP#(\d+)|http(?:s?):\/\/#{host_name}\/(?:\S+?\/)*(?:work_packages|wp)\/([0-9]+)/ + end + String(text) + .scan(wp_regex) + .map { |first, second| (first || second).to_i } + .select(&:positive?) + .uniq + end + + ## + # Given a list of work package ids this methods returns all work packages that match those ids + # and are visible by the given user. + # Params: + # - Array: An list of WorkPackage ids + # - User: The user who may (or may not) see those WorkPackages + # Returns: + # - Array + def find_visible_work_packages(ids, user) + WorkPackage + .includes(:project) + .where(id: ids) + .select { |wp| user.allowed_in_work_package?(:add_work_package_notes, wp) } + end + + # Returns a list of `WorkPackage`s that were referenced in the `text` and are visible to the given `user`. + def find_mentioned_work_packages(text, user, kind = "") + find_visible_work_packages(extract_work_package_ids(text, kind), user) + end + + # Returns a list of `WorkPackage`s that were excluded in the `text`. + def find_excluded_work_packages(text, user) + find_visible_work_packages(extract_work_package_ids(text, 'private'), user) + end + + ## + # Adds comments to the given WorkPackages. + def comment_on_referenced_work_packages(work_packages, user, notes) + return if notes.nil? + + work_packages.each do |work_package| + ::WorkPackages::UpdateService + .new(user:, model: work_package) + .call(journal_notes: notes, send_notifications: false) + end + end + + ## + # Adds comments to the given WorkPackages. + def status_on_referenced_work_packages(work_packages, user, status) + work_packages.each do |work_package| + ::WorkPackages::UpdateService + .new(user:, model: work_package) + .call(status_id: status) + end + end + + ## + # A wapper around a ruby Hash to access webhook payloads. + # All methods called on it are converted to `.fetch` hash-access, raising an error if the string-key does not exist. + # If the method ends with a question mark, e.g. "comment?" not error is raised if the key does not exist. + # If the fetched value is again a hash, the value is wrapped into a new payload object. + class Payload + def initialize(payload) + @payload = payload + end + + def to_h + @payload.dup + end + + def method_missing(name, *args, &block) + super unless args.empty? && block.nil? + + value = if name.end_with?('?') + @payload.fetch(name.to_s[..-2], nil) + else + @payload.fetch(name.to_s) + end + + return Payload.new(value) if value.is_a?(Hash) + + value + end + + def respond_to_missing?(_method_name, _include_private = false) + true + end + end + + def wrap_payload(payload) + Payload.new(payload) + end + end + end +end diff --git a/modules/gitlab_integration/lib/open_project/gitlab_integration/notification_handler/issue_hook.rb b/modules/gitlab_integration/lib/open_project/gitlab_integration/notification_handler/issue_hook.rb new file mode 100644 index 000000000000..0c5cabcc3603 --- /dev/null +++ b/modules/gitlab_integration/lib/open_project/gitlab_integration/notification_handler/issue_hook.rb @@ -0,0 +1,85 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ + +module OpenProject::GitlabIntegration + module NotificationHandler + ## + # Handles Gitlab issue notifications. + class IssueHook + include OpenProject::GitlabIntegration::NotificationHandler::Helper + + def process(payload_params) + @payload = wrap_payload(payload_params) + user = User.find_by_id(payload.open_project_user_id) + text = payload.object_attributes.title + ' - ' + payload.object_attributes.description + work_packages = find_mentioned_work_packages(text, user) + notes = generate_notes(payload) + comment_on_referenced_work_packages(work_packages, user, notes) + upsert_issue(work_packages) + end + + private + + attr_reader :payload + + def generate_notes(payload) + accepted_actions = %w[open reopen close] + + key_action = { + 'open' => 'opened', + 'reopen' => 'reopened', + 'close' => 'closed' + }[payload.object_attributes.action] + + return nil unless accepted_actions.include? payload.object_attributes.action + I18n.t("gitlab_integration.issue_#{key_action}_referenced_comment", + :issue_number => payload.object_attributes.iid, + :issue_title => payload.object_attributes.title, + :issue_url => payload.object_attributes.url, + :repository => payload.repository.name, + :repository_url => payload.repository.homepage, + :gitlab_user => payload.user.name, + :gitlab_user_url => payload.user.avatar_url) + end + + def gitlab_issue + @gitlab_issue ||= GitlabIssue + .where(gitlab_id: payload.object_attributes.iid) + .or(GitlabIssue.where(gitlab_html_url: payload.object_attributes.url)) + .take + end + + def upsert_issue(work_packages) + return if work_packages.empty? && gitlab_issue.nil? + OpenProject::GitlabIntegration::Services::UpsertIssue.new.call(payload, + work_packages: work_packages) + end + end + end +end \ No newline at end of file diff --git a/modules/gitlab_integration/lib/open_project/gitlab_integration/notification_handler/merge_request_hook.rb b/modules/gitlab_integration/lib/open_project/gitlab_integration/notification_handler/merge_request_hook.rb new file mode 100644 index 000000000000..c4e65d055724 --- /dev/null +++ b/modules/gitlab_integration/lib/open_project/gitlab_integration/notification_handler/merge_request_hook.rb @@ -0,0 +1,111 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ + +module OpenProject::GitlabIntegration + module NotificationHandler + ## + # Handles Gitlab merge request notifications. + class MergeRequestHook + include OpenProject::GitlabIntegration::NotificationHandler::Helper + + def process(payload_params) + update_status_on_new_mr = false # true if you only reference one merge by work_package, else false. + update_status_on_merged = false # true if you only reference one merge by work_package, else false. + wp_status_id_on_new_mr = 7 # the id of the status. + wp_status_id_on_merged = 8 # the id of the status. + + accepted_actions = %w[open update reopen] + accepted_actions_for_comments = %w[open reopen] + accepted_states = %w[closed merged] + + @payload = wrap_payload(payload_params) + return unless (accepted_actions.include? payload.object_attributes.action) || (accepted_states.include? payload.object_attributes.state) + + user = User.find_by_id(payload.open_project_user_id) + text = payload.object_attributes.title + ' - ' + payload.object_attributes.description + work_packages = find_mentioned_work_packages(text, user) + notes = generate_notes(payload) + + if (accepted_actions_for_comments.include? payload.object_attributes.action) || (accepted_states.include? payload.object_attributes.state) + comment_on_referenced_work_packages(work_packages, user, notes) + if payload.object_attributes.state == 'opened' && update_status_on_new_mr + status_on_referenced_work_packages(work_packages, user, wp_status_id_on_new_mr) + elsif payload.object_attributes.state == 'merged' && update_status_on_merged + status_on_referenced_work_packages(work_packages, user, wp_status_id_on_merged) + end + end + upsert_merge_request(work_packages) + end + + private + + attr_reader :payload + + def generate_notes(payload) + key = { + 'opened' => 'opened', + 'reopened' => 'reopened', + 'closed' => 'closed', + 'merged' => 'merged', + 'edited' => 'referenced', + 'referenced' => 'referenced' + }[payload.object_attributes.state] + + key_action = { + 'reopen' => 'reopened' + }[payload.object_attributes.action] + + return nil unless key + + I18n.t("gitlab_integration.merge_request_#{key_action ? key_action : key}_comment", + :mr_number => payload.object_attributes.iid, + :mr_title => payload.object_attributes.title, + :mr_url => payload.object_attributes.url, + :repository => payload.repository.name, + :repository_url => payload.repository.url, + :gitlab_user => payload.user.name, + :gitlab_user_url => payload.user.avatar_url) + end + + def merge_request + @merge_request ||= GitlabMergeRequest + .where(gitlab_id: payload.object_attributes.iid) + .or(GitlabMergeRequest.where(gitlab_html_url: payload.object_attributes.url)) + .take + end + + def upsert_merge_request(work_packages) + return if work_packages.empty? && merge_request.nil? + OpenProject::GitlabIntegration::Services::UpsertMergeRequest.new.call(payload, + work_packages: work_packages) + end + + end + end +end diff --git a/modules/gitlab_integration/lib/open_project/gitlab_integration/notification_handler/note_hook.rb b/modules/gitlab_integration/lib/open_project/gitlab_integration/notification_handler/note_hook.rb new file mode 100644 index 000000000000..3bffd2683413 --- /dev/null +++ b/modules/gitlab_integration/lib/open_project/gitlab_integration/notification_handler/note_hook.rb @@ -0,0 +1,165 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ + +module OpenProject::GitlabIntegration + module NotificationHandler + ## + # Handles Gitlab comment notifications. + class NoteHook + include OpenProject::GitlabIntegration::NotificationHandler::Helper + + # TODO: this can be more refactored and simplified... + def process(payload_params) + @payload = wrap_payload(payload_params) + user = User.find_by(id: payload.open_project_user_id) + text = payload.object_attributes.note + work_packages = find_mentioned_work_packages(text, user, payload.object_kind) + if work_packages.empty? && payload.object_attributes.noteable_type == 'Issue' + text = "#{payload.issue.title} - #{payload.object_attributes.note}" + work_packages = find_mentioned_work_packages(text, user, payload.object_kind) + work_packages_excluded = find_excluded_work_packages(text, user) + work_packages = work_packages - work_packages_excluded unless work_packages_excluded.empty? + return if work_packages.empty? + + notes = generate_notes(payload, 'comment') + elsif work_packages.empty? && payload.object_attributes.noteable_type == 'Snippet' + text = "#{payload.snippet.title} - #{payload.object_attributes.note}" + work_packages = find_mentioned_work_packages(text, user, payload.object_kind) + work_packages_excluded = find_excluded_work_packages(text, user) + work_packages = work_packages - work_packages_excluded unless work_packages_excluded.empty? + return if work_packages.empty? + + notes = generate_notes(payload, 'reference') + elsif work_packages.empty? && payload.object_attributes.noteable_type == 'MergeRequest' + text = "#{payload.merge_request.title} - #{payload.object_attributes.note}" + work_packages = find_mentioned_work_packages(text, user, payload.object_kind) + work_packages_excluded = find_excluded_work_packages(text, user) + work_packages = work_packages - work_packages_excluded unless work_packages_excluded.empty? + return if work_packages.empty? + + notes = generate_notes(payload, 'comment') + else + notes = generate_notes(payload, 'reference') + end + comment_on_referenced_work_packages(work_packages, user, notes) + if payload.object_attributes.noteable_type == 'Issue' + upsert_issue(work_packages) + end + end + + private + + attr_reader :payload + + # TODO: add key list to simplify the code... + def generate_notes(payload, note_type) + case payload.object_attributes.noteable_type + when 'Commit' + commit_id = payload.commit.id + I18n.t("gitlab_integration.note_commit_referenced_comment", + commit_id: commit_id[0, 8], + commit_url: payload.object_attributes.url, + commit_note: payload.object_attributes.note, + repository: payload.repository.name, + repository_url: payload.repository.homepage, + gitlab_user: payload.user.name, + gitlab_user_url: payload.user.avatar_url) + when 'MergeRequest' + if note_type == 'comment' + I18n.t("gitlab_integration.note_mr_commented_comment", + mr_number: payload.merge_request.iid, + mr_title: payload.merge_request.title, + mr_url: payload.object_attributes.url, + mr_note: payload.object_attributes.note, + repository: payload.repository.name, + repository_url: payload.repository.homepage, + gitlab_user: payload.user.name, + gitlab_user_url: payload.user.avatar_url) + elsif note_type == 'reference' + I18n.t("gitlab_integration.note_mr_referenced_comment", + mr_number: payload.merge_request.iid, + mr_title: payload.merge_request.title, + mr_url: payload.object_attributes.url, + mr_note: payload.object_attributes.note, + repository: payload.repository.name, + repository_url: payload.repository.homepage, + gitlab_user: payload.user.name, + gitlab_user_url: payload.user.avatar_url) + end + when 'Issue' + if note_type == 'comment' + I18n.t("gitlab_integration.note_issue_commented_comment", + issue_number: payload.issue.iid, + issue_title: payload.issue.title, + issue_url: payload.object_attributes.url, + issue_note: payload.object_attributes.note, + repository: payload.repository.name, + repository_url: payload.repository.homepage, + gitlab_user: payload.user.name, + gitlab_user_url: payload.user.avatar_url) + elsif note_type == 'reference' + I18n.t("gitlab_integration.note_issue_referenced_comment", + issue_number: payload.issue.iid, + issue_title: payload.issue.title, + issue_url: payload.object_attributes.url, + issue_note: payload.object_attributes.note, + repository: payload.repository.name, + repository_url: payload.repository.homepage, + gitlab_user: payload.user.name, + gitlab_user_url: payload.user.avatar_url) + end + when 'Snippet' + I18n.t("gitlab_integration.note_snippet_referenced_comment", + snippet_number: payload.snippet.id, + snippet_title: payload.snippet.title, + snippet_url: payload.object_attributes.url, + snippet_note: payload.object_attributes.note, + repository: payload.repository.name, + repository_url: payload.repository.homepage, + gitlab_user: payload.user.name, + gitlab_user_url: payload.user.avatar_url) + end + end + + def gitlab_issue + @gitlab_issue ||= GitlabIssue + .where(gitlab_id: payload.issue.iid) + .or(GitlabIssue.where(gitlab_html_url: payload.issue.url)) + .take + end + + def upsert_issue(work_packages) + return if work_packages.empty? && gitlab_issue.nil? + + OpenProject::GitlabIntegration::Services::UpsertIssueNote.new.call(payload, + work_packages:) + end + end + end +end diff --git a/modules/gitlab_integration/lib/open_project/gitlab_integration/notification_handler/pipeline_hook.rb b/modules/gitlab_integration/lib/open_project/gitlab_integration/notification_handler/pipeline_hook.rb new file mode 100644 index 000000000000..c591e18957a3 --- /dev/null +++ b/modules/gitlab_integration/lib/open_project/gitlab_integration/notification_handler/pipeline_hook.rb @@ -0,0 +1,67 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ + +module OpenProject::GitlabIntegration + module NotificationHandler + ## + # Handles Gitlab pipeline notifications. + class PipelineHook + include OpenProject::GitlabIntegration::NotificationHandler::Helper + + def process(payload_params) + @payload = wrap_payload(payload_params) + + return if payload.merge_request.blank? + + merge_request = find_merge_request + return unless merge_request + return unless associated_with_mr? + + # disabled until gitlab issue resolution + OpenProject::GitlabIntegration::Services::UpsertPipeline.new.call( + payload, + merge_request: + ) + end + + private + + attr_reader :payload + + def associated_with_mr? + payload.merge_request.iid.present? + end + + def find_merge_request + gitlab_id = payload.merge_request.iid + GitlabMergeRequest.find_by(gitlab_id:) + end + end + end +end diff --git a/modules/gitlab_integration/lib/open_project/gitlab_integration/notification_handler/push_hook.rb b/modules/gitlab_integration/lib/open_project/gitlab_integration/notification_handler/push_hook.rb new file mode 100644 index 000000000000..3c67dd3ad00b --- /dev/null +++ b/modules/gitlab_integration/lib/open_project/gitlab_integration/notification_handler/push_hook.rb @@ -0,0 +1,67 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ + +module OpenProject::GitlabIntegration + module NotificationHandler + ## + # Handles Gitlab commit notifications. + class PushHook + include OpenProject::GitlabIntegration::NotificationHandler::Helper + + def process(payload_params) + @payload = wrap_payload(payload_params) + return nil unless payload.object_kind == 'push' + payload.commits.each do |commit| + user = User.find_by_id(payload.open_project_user_id) + text = commit['title'] + " - " + commit['message'] + work_packages = find_mentioned_work_packages(text, user) + notes = generate_notes(commit, payload) + comment_on_referenced_work_packages(work_packages, user, notes) + end + end + + private + + attr_reader :payload + + def generate_notes(commit, payload) + commit_id = commit['id'] + I18n.t("gitlab_integration.push_single_commit_comment", + :commit_number => commit_id[0, 8], + :commit_note => commit['message'], + :commit_url => commit['url'], + :commit_timestamp => commit['timestamp'], + :repository => payload.repository.name, + :repository_url => payload.repository.homepage, + :gitlab_user => payload.user_name, + :gitlab_user_url => payload.user_avatar) + end + end + end +end \ No newline at end of file diff --git a/modules/gitlab_integration/lib/open_project/gitlab_integration/notification_handler/system_hook.rb b/modules/gitlab_integration/lib/open_project/gitlab_integration/notification_handler/system_hook.rb new file mode 100644 index 000000000000..a23489a7ec3f --- /dev/null +++ b/modules/gitlab_integration/lib/open_project/gitlab_integration/notification_handler/system_hook.rb @@ -0,0 +1,67 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ + +module OpenProject::GitlabIntegration + module NotificationHandler + ## + # Handles Gitlab commit notifications. + class SystemHook + include OpenProject::GitlabIntegration::NotificationHandler::Helper + + def process(payload_params) + @payload = wrap_payload(payload_params) + return nil unless payload.object_kind == 'push' + payload.commits.each do |commit| + user = User.find_by_id(payload.open_project_user_id) + text = commit['title'] + " - " + commit['message'] + work_packages = find_mentioned_work_packages(text, user) + notes = generate_notes(commit, payload) + comment_on_referenced_work_packages(work_packages, user, notes) + end + end + + private + + attr_reader :payload + + def generate_notes(commit, payload) + commit_id = commit['id'] + I18n.t("gitlab_integration.push_single_commit_comment", + :commit_number => commit_id[0, 8], + :commit_note => commit['message'], + :commit_url => commit['url'], + :commit_timestamp => commit['timestamp'], + :repository => payload.repository.name, + :repository_url => payload.repository.homepage, + :gitlab_user => payload.user_name, + :gitlab_user_url => payload.user_avatar) + end + end + end +end diff --git a/modules/gitlab_integration/lib/open_project/gitlab_integration/notification_handlers.rb b/modules/gitlab_integration/lib/open_project/gitlab_integration/notification_handlers.rb new file mode 100644 index 000000000000..7c78293b6491 --- /dev/null +++ b/modules/gitlab_integration/lib/open_project/gitlab_integration/notification_handlers.rb @@ -0,0 +1,89 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ + +require_relative './notification_handler/helper' +require_relative './notification_handler/issue_hook' +require_relative './notification_handler/merge_request_hook' +require_relative './notification_handler/note_hook' +require_relative './notification_handler/push_hook' +require_relative './notification_handler/system_hook' + +module OpenProject::GitlabIntegration + + ## + # Handles gitlab-related notifications. + module NotificationHandlers + class << self + def merge_request_hook(payload) + with_logging('merge_request_hook') do + OpenProject::GitlabIntegration::NotificationHandler::MergeRequestHook.new.process(payload) + end + end + + def note_hook(payload) + with_logging('note_hook') do + OpenProject::GitlabIntegration::NotificationHandler::NoteHook.new.process(payload) + end + end + + def push_hook(payload) + with_logging('push_hook') do + OpenProject::GitlabIntegration::NotificationHandler::PushHook.new.process(payload) + end + end + + def issue_hook(payload) + with_logging('issue_hook') do + OpenProject::GitlabIntegration::NotificationHandler::IssueHook.new.process(payload) + end + end + + def pipeline_hook(payload) + with_logging('pipeline_hook') do + OpenProject::GitlabIntegration::NotificationHandler::PipelineHook.new.process(payload) + end + end + + def system_hook(payload) + with_logging('system_hook') do + OpenProject::GitlabIntegration::NotificationHandler::SystemHook.new.process(payload) + end + end + + private + + def with_logging(event_hook) + yield if block_given? + rescue StandardError => e + Rails.logger.error "Failed to handle #{event_hook} from Gitlab: #{e} #{e.message}" + raise e + end + end + end +end diff --git a/modules/gitlab_integration/lib/open_project/gitlab_integration/patches/api/work_package_representer.rb b/modules/gitlab_integration/lib/open_project/gitlab_integration/patches/api/work_package_representer.rb new file mode 100644 index 000000000000..a83a247e96fe --- /dev/null +++ b/modules/gitlab_integration/lib/open_project/gitlab_integration/patches/api/work_package_representer.rb @@ -0,0 +1,69 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +module OpenProject::GitlabIntegration + module Patches + module API + module WorkPackageRepresenter + module_function + + def extension # rubocop:disable Metrics/AbcSize + ->(*) do + link :gitlab, + cache_if: -> { current_user.allowed_in_work_package?(:show_gitlab_content, represented) } do + next if represented.new_record? + + { + href: "#{work_package_path(id: represented.id)}/tabs/gitlab", + title: "gitlab" + } + end + + link :gitlab_merge_requests do + next if represented.new_record? + + { + href: api_v3_paths.gitlab_merge_requests_by_work_package(represented.id), + title: "Gitlab merge requests" + } + end + + link :gitlab_issues do + next if represented.new_record? + + { + href: api_v3_paths.gitlab_issues_by_work_package(represented.id), + title: "Gitlab Issues" + } + end + end + end + end + end + end +end diff --git a/modules/gitlab_integration/lib/open_project/gitlab_integration/patches/work_package_patch.rb b/modules/gitlab_integration/lib/open_project/gitlab_integration/patches/work_package_patch.rb new file mode 100644 index 000000000000..833b51b908ab --- /dev/null +++ b/modules/gitlab_integration/lib/open_project/gitlab_integration/patches/work_package_patch.rb @@ -0,0 +1,14 @@ +module OpenProject::GitlabIntegration + module Patches + module WorkPackagePatch + extend ActiveSupport::Concern + + included do + has_and_belongs_to_many :gitlab_merge_requests + has_and_belongs_to_many :gitlab_issues + end + end + end +end + +::WorkPackage.include OpenProject::GitlabIntegration::Patches::WorkPackagePatch diff --git a/modules/gitlab_integration/lib/open_project/gitlab_integration/services.rb b/modules/gitlab_integration/lib/open_project/gitlab_integration/services.rb new file mode 100644 index 000000000000..288dc4281545 --- /dev/null +++ b/modules/gitlab_integration/lib/open_project/gitlab_integration/services.rb @@ -0,0 +1,33 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ + +require_relative './services/params_helper' +require_relative './services/upsert_pipeline' +require_relative './services/upsert_gitlab_user' +require_relative './services/upsert_merge_request' diff --git a/modules/gitlab_integration/lib/open_project/gitlab_integration/services/params_helper.rb b/modules/gitlab_integration/lib/open_project/gitlab_integration/services/params_helper.rb new file mode 100644 index 000000000000..ef7a9355c03e --- /dev/null +++ b/modules/gitlab_integration/lib/open_project/gitlab_integration/services/params_helper.rb @@ -0,0 +1,50 @@ +# frozen_string_literal: true + +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +module OpenProject + module GitlabIntegration + module Services + module ParamsHelper + private + + EMPTY_AVATAR_URL = 'https://www.gravatar.com/avatar/?d=mp' + EMPTY_DESCRIPTION = 'No description provided' + + def avatar_url(raw_url) + raw_url.presence || EMPTY_AVATAR_URL + end + + def description(raw_description) + raw_description.presence || EMPTY_DESCRIPTION + end + end + end + end +end diff --git a/modules/gitlab_integration/lib/open_project/gitlab_integration/services/upsert_gitlab_user.rb b/modules/gitlab_integration/lib/open_project/gitlab_integration/services/upsert_gitlab_user.rb new file mode 100644 index 000000000000..e9f70e340e4b --- /dev/null +++ b/modules/gitlab_integration/lib/open_project/gitlab_integration/services/upsert_gitlab_user.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +module OpenProject + module GitlabIntegration + module Services + ## + # Takes user data coming from Gitlab webhook data and stores + # them as a `GitlabUser`. + # If the `GitlabUser` already exists, it is updated. + # + # Returns the upserted `GitlabUser`. + class UpsertGitlabUser + include ParamsHelper + + def call(payload) + GitlabUser.find_or_initialize_by(gitlab_id: payload.id) + .tap do |gitlab_user| + gitlab_user.update!(extract_params(payload)) + end + end + + private + + ## + # Receives the input from the gitlab webhook and translates them + # to our internal representation. + def extract_params(payload) + { + gitlab_id: payload.id, + gitlab_name: payload.name, + gitlab_username: payload.username, + gitlab_email: payload.email, + gitlab_avatar_url: avatar_url(payload.avatar_url) + } + end + end + end + end +end diff --git a/modules/gitlab_integration/lib/open_project/gitlab_integration/services/upsert_issue.rb b/modules/gitlab_integration/lib/open_project/gitlab_integration/services/upsert_issue.rb new file mode 100644 index 000000000000..6eb2298d5f9c --- /dev/null +++ b/modules/gitlab_integration/lib/open_project/gitlab_integration/services/upsert_issue.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +module OpenProject + module GitlabIntegration + module Services + class UpsertIssue + include ParamsHelper + + def call(payload, work_packages: []) + find_or_initialize(payload).tap do |issue| + issue.update!(work_packages: issue.work_packages | work_packages, **extract_params(payload)) + end + end + + private + + def find_or_initialize(payload) + GitlabIssue.find_by_gitlab_identifiers(id: payload.object_attributes.iid, + url: payload.object_attributes.url, + initialize: true) + end + + # Receives the input from the gitlab webhook and translates them + # to our internal representation. + # rubocop:disable Metrics/AbcSize + def extract_params(payload) + { + gitlab_id: payload.object_attributes.iid, + gitlab_user: gitlab_user_id(payload.user), + number: payload.object_attributes.iid, + gitlab_html_url: payload.object_attributes.url, + gitlab_updated_at: payload.object_attributes.updated_at, + state: payload.object_attributes.state, + title: payload.object_attributes.title, + body: description(payload.object_attributes.description), + repository: payload.repository.name, + labels: payload.labels.map { |values| extract_label_values(values) } + } + end + # rubocop:enable Metrics/AbcSize + + def extract_label_values(payload) + { + title: payload['title'], + color: payload['color'] + } + end + + def gitlab_user_id(payload) + return if payload.blank? + + ::OpenProject::GitlabIntegration::Services::UpsertGitlabUser.new.call(payload) + end + end + end + end +end diff --git a/modules/gitlab_integration/lib/open_project/gitlab_integration/services/upsert_issue_note.rb b/modules/gitlab_integration/lib/open_project/gitlab_integration/services/upsert_issue_note.rb new file mode 100644 index 000000000000..eb58b8e83e33 --- /dev/null +++ b/modules/gitlab_integration/lib/open_project/gitlab_integration/services/upsert_issue_note.rb @@ -0,0 +1,85 @@ +# frozen_string_literal: true + +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +module OpenProject + module GitlabIntegration + module Services + class UpsertIssueNote + include ParamsHelper + + def call(payload, work_packages: []) + find_or_initialize(payload).tap do |issue| + issue.update!(work_packages: issue.work_packages | work_packages, **extract_params(payload)) + end + end + + private + + def find_or_initialize(payload) + GitlabIssue.find_by_gitlab_identifiers(id: payload.issue.iid, + url: payload.issue.url, + initialize: true) + end + + # Receives the input from the gitlab webhook and translates them + # to our internal representation. + # rubocop:disable Metrics/AbcSize + def extract_params(payload) + { + gitlab_id: payload.issue.iid, + gitlab_user: gitlab_user_id(payload.user), + number: payload.issue.iid, + gitlab_html_url: payload.issue.url, + gitlab_updated_at: payload.issue.updated_at, + state: payload.issue.state, + title: payload.issue.title, + body: description(payload.object_attributes.description), + repository: payload.repository.name, + labels: payload.issue.labels.map { |values| extract_label_values(values) } + } + end + # rubocop:enable Metrics/AbcSize + + def extract_label_values(payload) + { + title: payload['title'], + color: payload['color'] + } + end + + def gitlab_user_id(payload) + return if payload.blank? + + ::OpenProject::GitlabIntegration::Services::UpsertGitlabUser.new.call(payload) + end + end + end + end +end diff --git a/modules/gitlab_integration/lib/open_project/gitlab_integration/services/upsert_merge_request.rb b/modules/gitlab_integration/lib/open_project/gitlab_integration/services/upsert_merge_request.rb new file mode 100644 index 000000000000..78c8c0ccfa00 --- /dev/null +++ b/modules/gitlab_integration/lib/open_project/gitlab_integration/services/upsert_merge_request.rb @@ -0,0 +1,89 @@ +# frozen_string_literal: true + +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +module OpenProject + module GitlabIntegration + module Services + class UpsertMergeRequest + include ParamsHelper + + def call(payload, work_packages: []) + find_or_initialize(payload).tap do |mr| + mr.update!(work_packages: mr.work_packages | work_packages, **extract_params(payload)) + end + end + + private + + def find_or_initialize(payload) + GitlabMergeRequest.find_by_gitlab_identifiers(id: payload.object_attributes.iid, + url: payload.object_attributes.url, + initialize: true) + end + + # Receives the input from the gitlab webhook and translates them + # to our internal representation. + # rubocop:disable Metrics/AbcSize + def extract_params(payload) + { + gitlab_id: payload.object_attributes.iid, + gitlab_user: gitlab_user_id(payload.user), + number: payload.object_attributes.iid, + gitlab_html_url: payload.object_attributes.url, + gitlab_updated_at: payload.object_attributes.updated_at, + state: payload.object_attributes.state, + title: payload.object_attributes.title, + body: description(payload.object_attributes.description), + repository: payload.repository.name, + draft: payload.object_attributes.work_in_progress, + merged: payload.object_attributes.state == 'merged', + merged_by: gitlab_user_id(payload.user), + merged_at: payload.object_attributes.state == 'merged' ? payload.object_attributes.updated_at : nil, + labels: payload.labels.map { |values| extract_label_values(values) } + } + end + # rubocop:enable Metrics/AbcSize + + def extract_label_values(payload) + { + title: payload['title'], + color: payload['color'] + } + end + + def gitlab_user_id(payload) + return if payload.blank? + + ::OpenProject::GitlabIntegration::Services::UpsertGitlabUser.new.call(payload) + end + end + end + end +end diff --git a/modules/gitlab_integration/lib/open_project/gitlab_integration/services/upsert_pipeline.rb b/modules/gitlab_integration/lib/open_project/gitlab_integration/services/upsert_pipeline.rb new file mode 100644 index 000000000000..0fbdd9ecf7ec --- /dev/null +++ b/modules/gitlab_integration/lib/open_project/gitlab_integration/services/upsert_pipeline.rb @@ -0,0 +1,67 @@ +# frozen_string_literal: true + +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ +module OpenProject + module GitlabIntegration + module Services + class UpsertPipeline + include ParamsHelper + + def call(payload, merge_request:) + GitlabPipeline.find_or_initialize_by(gitlab_id: payload.object_attributes.iid) + .tap do |pipeline| + pipeline.update!(gitlab_merge_request: merge_request, **extract_params(payload)) + end + end + + private + + # Receives the input from the gitlab webhook and translates them + # to our internal representation. + def extract_params(payload) + { + gitlab_id: payload.object_attributes.iid, + gitlab_html_url: "#{payload.project.web_url}/-/pipelines/#{payload.object_attributes.iid}", + project_id: payload.project.id, + gitlab_user_avatar_url: avatar_url(payload.user.avatar_url), + name: payload.object_attributes.iid, + status: payload.object_attributes.status, + details_url: "#{payload.project.web_url}/-/commit/#{payload.object_attributes.sha[0..7]}", + commit_id: payload.object_attributes.sha[0..7], + username: payload.user.name, + ci_details: payload.builds, + started_at: payload.object_attributes.created_at, + completed_at: payload.object_attributes.finished_at + } + end + end + end + end +end diff --git a/modules/gitlab_integration/lib/openproject-gitlab_integration.rb b/modules/gitlab_integration/lib/openproject-gitlab_integration.rb new file mode 100644 index 000000000000..146bd94ac4ef --- /dev/null +++ b/modules/gitlab_integration/lib/openproject-gitlab_integration.rb @@ -0,0 +1,30 @@ +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ + +require 'open_project/gitlab_integration' diff --git a/modules/gitlab_integration/openproject-gitlab_integration.gemspec b/modules/gitlab_integration/openproject-gitlab_integration.gemspec new file mode 100644 index 000000000000..f26ebc622261 --- /dev/null +++ b/modules/gitlab_integration/openproject-gitlab_integration.gemspec @@ -0,0 +1,46 @@ +# frozen_string_literal: true + +# +#-- copyright +# OpenProject is an open source project management software. +# Copyright (C) 2023 Ben Tey +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License version 3. +# +# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +# Copyright (C) 2006-2013 Jean-Philippe Lang +# Copyright (C) 2010-2013 the ChiliProject Team +# Copyright (C) 2012-2021 the OpenProject GmbH +# +# 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 2 +# 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, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# See docs/COPYRIGHT.rdoc for more details. +#++ + +Gem::Specification.new do |s| + s.name = 'openproject-gitlab_integration' + s.version = '2.1.6' + s.authors = 'Ben Tey' + s.email = 'ben.tey@outlook.com' + s.homepage = 'https://github.com/btey/openproject-gitlab-integration' + s.summary = 'OpenProject GitLab Integration' + s.description = 'Integrates OpenProject and GitLab for a better workflow' + s.license = 'GPLv3' + + s.files = Dir['{app,config,db,frontend,lib}/**/*'] + %w[README.md] + + s.add_dependency 'openproject-webhooks' +end