├── LICENSE ├── README.md ├── app ├── models │ ├── gitlab_issue.rb │ ├── gitlab_merge_request.rb │ ├── gitlab_pipeline.rb │ └── gitlab_user.rb └── workers │ └── cron │ └── clear_old_merge_requests_job.rb ├── config └── locales │ ├── crowdin │ ├── ar.yml │ ├── bg.yml │ ├── ca.yml │ ├── cs.yml │ ├── da.yml │ ├── de.yml │ ├── el.yml │ ├── es.yml │ ├── fi.yml │ ├── fil.yml │ ├── fr.yml │ ├── hr.yml │ ├── hu.yml │ ├── id.yml │ ├── it.yml │ ├── ja.yml │ ├── js-ar.yml │ ├── js-bg.yml │ ├── js-ca.yml │ ├── js-cs.yml │ ├── js-da.yml │ ├── js-de.yml │ ├── js-el.yml │ ├── js-es.yml │ ├── js-fi.yml │ ├── js-fil.yml │ ├── js-fr.yml │ ├── js-hr.yml │ ├── js-hu.yml │ ├── js-id.yml │ ├── js-it.yml │ ├── js-ja.yml │ ├── js-ko.yml │ ├── js-lt.yml │ ├── js-nl.yml │ ├── js-no.yml │ ├── js-pl.yml │ ├── js-pt.yml │ ├── js-ro.yml │ ├── js-ru.yml │ ├── js-sk.yml │ ├── js-sl.yml │ ├── js-sv.yml │ ├── js-tr.yml │ ├── js-uk.yml │ ├── js-vi.yml │ ├── js-zh-CN.yml │ ├── js-zh-TW.yml │ ├── ko.yml │ ├── lt.yml │ ├── nl.yml │ ├── no.yml │ ├── pl.yml │ ├── pt.yml │ ├── ro.yml │ ├── ru.yml │ ├── sk.yml │ ├── sl.yml │ ├── sv.yml │ ├── tr.yml │ ├── uk.yml │ ├── vi.yml │ ├── zh-CN.yml │ └── zh-TW.yml │ ├── de.yml │ ├── en.yml │ └── js-en.yml ├── db └── migrate │ ├── 20211015110000_gitlab_integration_models.rb │ ├── 20211015110001_add_username_commit_to_pipelines.rb │ └── 20211015110002_add_gitlab_issues.rb ├── doc ├── op-commented-in-issue.png ├── op-commented-in-mr.png ├── op-issue-opened.png ├── op-mr-merged-event-1.png ├── op-mr-merged-event-2.png ├── op-mr-merged-event-3.png ├── op-mr-merged-event-4.png ├── op-mr-opened.png ├── op-pushed-in-mr.png ├── op-referenced-in-commit.png └── op-referenced-in-issue.png ├── frontend └── module │ ├── git-actions-menu │ ├── git-actions-menu.component.ts │ ├── git-actions-menu.directive.ts │ ├── git-actions-menu.template.html │ └── styles │ │ └── git-actions-menu.sass │ ├── git-actions │ └── git-actions.service.ts │ ├── gitlab-tab │ ├── gitlab-tab.component.sass │ ├── gitlab-tab.component.ts │ └── gitlab-tab.template.html │ ├── hal │ └── resources │ │ ├── gitlab-issue-resource.ts │ │ ├── gitlab-merge-request-resource.ts │ │ └── gitlab-user-resource.ts │ ├── icons │ └── gitlab-icons.svg │ ├── issue │ ├── issue.component.html │ ├── issue.component.sass │ └── issue.component.ts │ ├── main.ts │ ├── merge-request │ ├── merge-request.component.html │ ├── merge-request.component.sass │ ├── merge-request.component.ts │ └── mr-pipeline.component.sass │ ├── tab-header-issue │ ├── styles │ │ └── tab-header-issue.sass │ ├── tab-header-issue.component.ts │ └── tab-header-issue.template.html │ ├── tab-header-mr │ ├── styles │ │ └── tab-header-mr.sass │ ├── tab-header-mr.component.ts │ └── tab-header-mr.template.html │ ├── tab-issue │ ├── tab-issue.component.ts │ ├── tab-issue.template.html │ └── wp-gitlab-issue.service.ts │ ├── tab-mrs │ ├── tab-mrs.component.ts │ ├── tab-mrs.template.html │ └── wp-gitlab-mrs.service.ts │ └── typings.d.ts ├── lib ├── api │ └── v3 │ │ ├── gitlab_issues │ │ ├── gitlab_issue_collection_representer.rb │ │ ├── gitlab_issue_representer.rb │ │ ├── gitlab_issues_by_work_package_api.rb │ │ └── gitlab_user_representer.rb │ │ └── gitlab_merge_requests │ │ ├── gitlab_merge_request_collection_representer.rb │ │ ├── gitlab_merge_request_representer.rb │ │ ├── gitlab_merge_requests_by_work_package_api.rb │ │ ├── gitlab_pipeline_representer.rb │ │ └── gitlab_user_representer.rb ├── open_project │ ├── gitlab_integration.rb │ └── gitlab_integration │ │ ├── engine.rb │ │ ├── hook_handler.rb │ │ ├── notification_handler │ │ ├── helper.rb │ │ ├── issue_hook.rb │ │ ├── merge_request_hook.rb │ │ ├── note_hook.rb │ │ ├── pipeline_hook.rb │ │ ├── push_hook.rb │ │ └── system_hook.rb │ │ ├── notification_handlers.rb │ │ ├── patches │ │ ├── api │ │ │ └── work_package_representer.rb │ │ └── work_package_patch.rb │ │ ├── services.rb │ │ └── services │ │ ├── params_helper.rb │ │ ├── upsert_gitlab_user.rb │ │ ├── upsert_issue.rb │ │ ├── upsert_issue_note.rb │ │ ├── upsert_merge_request.rb │ │ └── upsert_pipeline.rb └── openproject-gitlab_integration.rb └── openproject-gitlab_integration.gemspec /app/models/gitlab_issue.rb: -------------------------------------------------------------------------------- 1 | #-- encoding: UTF-8 2 | 3 | #-- copyright 4 | # OpenProject is an open source project management software. 5 | # Copyright (C) 2023 Ben Tey 6 | # 7 | # This program is free software; you can redistribute it and/or 8 | # modify it under the terms of the GNU General Public License version 3. 9 | # 10 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 11 | # Copyright (C) 2006-2013 Jean-Philippe Lang 12 | # Copyright (C) 2010-2013 the ChiliProject Team 13 | # Copyright (C) 2012-2021 the OpenProject GmbH 14 | # 15 | # This program is free software; you can redistribute it and/or 16 | # modify it under the terms of the GNU General Public License 17 | # as published by the Free Software Foundation; either version 2 18 | # of the License, or (at your option) any later version. 19 | # 20 | # This program is distributed in the hope that it will be useful, 21 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 22 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 23 | # GNU General Public License for more details. 24 | # 25 | # You should have received a copy of the GNU General Public License 26 | # along with this program; if not, write to the Free Software 27 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 28 | # 29 | # See docs/COPYRIGHT.rdoc for more details. 30 | #++ 31 | 32 | class GitlabIssue < ApplicationRecord 33 | LABEL_KEYS = %w[color title].freeze 34 | 35 | has_and_belongs_to_many :work_packages 36 | belongs_to :gitlab_user, optional: true 37 | 38 | enum state: { 39 | opened: 'opened', 40 | closed: 'closed' 41 | } 42 | 43 | validates_presence_of :gitlab_html_url, 44 | :number, 45 | :repository, 46 | :state, 47 | :title, 48 | :gitlab_updated_at 49 | validates_presence_of :body, 50 | unless: :partial? 51 | validate :validate_labels_schema 52 | 53 | scope :without_work_package, -> { left_outer_joins(:work_packages).where(work_packages: { id: nil }) } 54 | 55 | def self.find_by_gitlab_identifiers(id: nil, url: nil, initialize: false) 56 | raise ArgumentError, "needs an id or an url" if id.nil? && url.blank? 57 | 58 | found = where(gitlab_id: id).or(where(gitlab_html_url: url)).take 59 | 60 | if found 61 | found 62 | elsif initialize 63 | new(gitlab_id: id, gitlab_html_url: url) 64 | end 65 | end 66 | 67 | def partial? 68 | [body].all?(&:nil?) 69 | end 70 | 71 | private 72 | 73 | def validate_labels_schema 74 | return if labels.nil? 75 | return if labels.all? { |label| label.keys.sort == LABEL_KEYS } 76 | 77 | errors.add(:labels, 'invalid schema') 78 | end 79 | 80 | def with_logging 81 | yield if block_given? 82 | rescue StandardError => e 83 | Rails.logger.error "Error at gitlab issue: #{e} #{e.message}" 84 | raise e 85 | end 86 | end 87 | -------------------------------------------------------------------------------- /app/models/gitlab_merge_request.rb: -------------------------------------------------------------------------------- 1 | #-- encoding: UTF-8 2 | 3 | #-- copyright 4 | # OpenProject is an open source project management software. 5 | # Copyright (C) 2023 Ben Tey 6 | # 7 | # This program is free software; you can redistribute it and/or 8 | # modify it under the terms of the GNU General Public License version 3. 9 | # 10 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 11 | # Copyright (C) 2006-2013 Jean-Philippe Lang 12 | # Copyright (C) 2010-2013 the ChiliProject Team 13 | # Copyright (C) 2012-2021 the OpenProject GmbH 14 | # 15 | # This program is free software; you can redistribute it and/or 16 | # modify it under the terms of the GNU General Public License 17 | # as published by the Free Software Foundation; either version 2 18 | # of the License, or (at your option) any later version. 19 | # 20 | # This program is distributed in the hope that it will be useful, 21 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 22 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 23 | # GNU General Public License for more details. 24 | # 25 | # You should have received a copy of the GNU General Public License 26 | # along with this program; if not, write to the Free Software 27 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 28 | # 29 | # See docs/COPYRIGHT.rdoc for more details. 30 | #++ 31 | 32 | class GitlabMergeRequest < ApplicationRecord 33 | LABEL_KEYS = %w[color title].freeze 34 | 35 | has_and_belongs_to_many :work_packages 36 | has_many :gitlab_pipelines, dependent: :destroy 37 | belongs_to :gitlab_user, optional: true 38 | belongs_to :merged_by, optional: true, class_name: 'GitlabUser' 39 | 40 | enum state: { 41 | opened: 'opened', 42 | merged: 'merged', 43 | closed: 'closed' 44 | } 45 | 46 | validates_presence_of :gitlab_html_url, 47 | :number, 48 | :repository, 49 | :state, 50 | :title, 51 | :gitlab_updated_at 52 | validates_presence_of :body, 53 | unless: :partial? 54 | validate :validate_labels_schema 55 | 56 | scope :without_work_package, -> { left_outer_joins(:work_packages).where(work_packages: { id: nil }) } 57 | 58 | def self.find_by_gitlab_identifiers(id: nil, url: nil, initialize: false) 59 | raise ArgumentError, "needs an id or an url" if id.nil? && url.blank? 60 | 61 | found = where(gitlab_id: id).or(where(gitlab_html_url: url)).take 62 | 63 | if found 64 | found 65 | elsif initialize 66 | new(gitlab_id: id, gitlab_html_url: url) 67 | end 68 | end 69 | 70 | ## 71 | # When a MR lives long enough and receives many pushes, the same pipeline CI can be run multiple times. 72 | # This method only returns the latest. 73 | 74 | def latest_pipelines 75 | with_logging do 76 | gitlab_pipelines.select("DISTINCT ON (gitlab_pipelines.project_id, gitlab_pipelines.name) *") 77 | .order(project_id: :asc, name: :asc, started_at: :desc) 78 | end 79 | end 80 | 81 | def partial? 82 | [body].all?(&:nil?) 83 | end 84 | 85 | private 86 | 87 | def validate_labels_schema 88 | return if labels.nil? 89 | return if labels.all? { |label| label.keys.sort == LABEL_KEYS } 90 | 91 | errors.add(:labels, 'invalid schema') 92 | end 93 | 94 | def with_logging 95 | yield if block_given? 96 | rescue StandardError => e 97 | Rails.logger.error "Error at latest_pipeline: #{e} #{e.message}" 98 | raise e 99 | end 100 | end 101 | -------------------------------------------------------------------------------- /app/models/gitlab_pipeline.rb: -------------------------------------------------------------------------------- 1 | #-- encoding: UTF-8 2 | 3 | #-- copyright 4 | # OpenProject is an open source project management software. 5 | # Copyright (C) 2023 Ben Tey 6 | # 7 | # This program is free software; you can redistribute it and/or 8 | # modify it under the terms of the GNU General Public License version 3. 9 | # 10 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 11 | # Copyright (C) 2006-2013 Jean-Philippe Lang 12 | # Copyright (C) 2010-2013 the ChiliProject Team 13 | # Copyright (C) 2012-2021 the OpenProject GmbH 14 | # 15 | # This program is free software; you can redistribute it and/or 16 | # modify it under the terms of the GNU General Public License 17 | # as published by the Free Software Foundation; either version 2 18 | # of the License, or (at your option) any later version. 19 | # 20 | # This program is distributed in the hope that it will be useful, 21 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 22 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 23 | # GNU General Public License for more details. 24 | # 25 | # You should have received a copy of the GNU General Public License 26 | # along with this program; if not, write to the Free Software 27 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 28 | # 29 | # See docs/COPYRIGHT.rdoc for more details. 30 | #++ 31 | 32 | class GitlabPipeline < ApplicationRecord 33 | belongs_to :gitlab_merge_request, touch: true 34 | 35 | # TODO: confirm with the gitlab documentation what are the different statuses. 36 | enum status: { 37 | created: 'created', 38 | running: 'running', 39 | success: 'success', 40 | waiting: 'waiting', 41 | preparing: 'preparing', 42 | failed: 'failed', 43 | pending: 'pending', 44 | canceled: 'canceled', 45 | skipped: 'skipped', 46 | manual: 'manual', 47 | scheduled: 'scheduled' 48 | } 49 | 50 | validates_presence_of :gitlab_user_avatar_url, 51 | :gitlab_html_url, 52 | :gitlab_id, 53 | :status, 54 | :name, 55 | :ci_details, 56 | :commit_id, 57 | :username 58 | end 59 | -------------------------------------------------------------------------------- /app/models/gitlab_user.rb: -------------------------------------------------------------------------------- 1 | #-- encoding: UTF-8 2 | 3 | #-- copyright 4 | # OpenProject is an open source project management software. 5 | # Copyright (C) 2023 Ben Tey 6 | # 7 | # This program is free software; you can redistribute it and/or 8 | # modify it under the terms of the GNU General Public License version 3. 9 | # 10 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 11 | # Copyright (C) 2006-2013 Jean-Philippe Lang 12 | # Copyright (C) 2010-2013 the ChiliProject Team 13 | # Copyright (C) 2012-2021 the OpenProject GmbH 14 | # 15 | # This program is free software; you can redistribute it and/or 16 | # modify it under the terms of the GNU General Public License 17 | # as published by the Free Software Foundation; either version 2 18 | # of the License, or (at your option) any later version. 19 | # 20 | # This program is distributed in the hope that it will be useful, 21 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 22 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 23 | # GNU General Public License for more details. 24 | # 25 | # You should have received a copy of the GNU General Public License 26 | # along with this program; if not, write to the Free Software 27 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 28 | # 29 | # See docs/COPYRIGHT.rdoc for more details. 30 | #++ 31 | 32 | class GitlabUser < ApplicationRecord 33 | has_many :gitlab_merge_requests 34 | 35 | validates_presence_of :gitlab_id, 36 | :gitlab_name, 37 | :gitlab_username, 38 | :gitlab_email, 39 | :gitlab_avatar_url 40 | end 41 | -------------------------------------------------------------------------------- /app/workers/cron/clear_old_merge_requests_job.rb: -------------------------------------------------------------------------------- 1 | #-- encoding: UTF-8 2 | 3 | #-- copyright 4 | # OpenProject is an open source project management software. 5 | # Copyright (C) 2023 Ben Tey 6 | # 7 | # This program is free software; you can redistribute it and/or 8 | # modify it under the terms of the GNU General Public License version 3. 9 | # 10 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 11 | # Copyright (C) 2006-2013 Jean-Philippe Lang 12 | # Copyright (C) 2010-2013 the ChiliProject Team 13 | # Copyright (C) 2012-2021 the OpenProject GmbH 14 | # 15 | # This program is free software; you can redistribute it and/or 16 | # modify it under the terms of the GNU General Public License 17 | # as published by the Free Software Foundation; either version 2 18 | # of the License, or (at your option) any later version. 19 | # 20 | # This program is distributed in the hope that it will be useful, 21 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 22 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 23 | # GNU General Public License for more details. 24 | # 25 | # You should have received a copy of the GNU General Public License 26 | # along with this program; if not, write to the Free Software 27 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 28 | # 29 | # See docs/COPYRIGHT.rdoc for more details. 30 | #++ 31 | 32 | module Cron 33 | class ClearOldMergeRequestsJob < CronJob 34 | priority_number :low 35 | 36 | # runs at 1:25 nightly 37 | self.cron_expression = '25 1 * * *' 38 | 39 | def perform 40 | GitlabMergeRequest.without_work_package 41 | .find_each(&:destroy!) 42 | end 43 | end 44 | end 45 | -------------------------------------------------------------------------------- /config/locales/crowdin/js-ar.yml: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | ar: 30 | js: 31 | gitlab_integration: 32 | work_packages: 33 | tab_name: "GitLab" 34 | tab_header_issue: 35 | title: "Issues" 36 | tab_header_mr: 37 | title: "Merge requests" 38 | create_mr: 39 | label: Create MR 40 | description: Create a Merge Request 41 | copy_menu: 42 | label: Git snippets 43 | description: Copy git snippets to clipboard 44 | git_actions: 45 | branch_name: Branch name 46 | commit_message: Commit message 47 | cmd: Create branch with empty commit 48 | title: Quick snippets for Git 49 | copy_success: ✅ Copied! 50 | copy_error: ❌ Copy failed! 51 | tab_issue: 52 | 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. 53 | tab_mrs: 54 | 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. 55 | gitlab_pipelines: Pipelines 56 | updated_on: Updated on 57 | -------------------------------------------------------------------------------- /config/locales/crowdin/js-bg.yml: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | bg: 30 | js: 31 | gitlab_integration: 32 | work_packages: 33 | tab_name: "GitLab" 34 | tab_header_issue: 35 | title: "Issues" 36 | tab_header_mr: 37 | title: "Merge requests" 38 | create_mr: 39 | label: Create MR 40 | description: Create a Merge Request 41 | copy_menu: 42 | label: Git snippets 43 | description: Copy git snippets to clipboard 44 | git_actions: 45 | branch_name: Branch name 46 | commit_message: Commit message 47 | cmd: Create branch with empty commit 48 | title: Quick snippets for Git 49 | copy_success: ✅ Copied! 50 | copy_error: ❌ Copy failed! 51 | tab_issue: 52 | 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. 53 | tab_mrs: 54 | 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. 55 | gitlab_pipelines: Pipelines 56 | updated_on: Updated on 57 | -------------------------------------------------------------------------------- /config/locales/crowdin/js-ca.yml: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | ca: 30 | js: 31 | gitlab_integration: 32 | work_packages: 33 | tab_name: "GitLab" 34 | tab_header_issue: 35 | title: "Issues" 36 | tab_header_mr: 37 | title: "Merge requests" 38 | create_mr: 39 | label: Create MR 40 | description: Create a Merge Request 41 | copy_menu: 42 | label: Git snippets 43 | description: Copy git snippets to clipboard 44 | git_actions: 45 | branch_name: Branch name 46 | commit_message: Commit message 47 | cmd: Create branch with empty commit 48 | title: Quick snippets for Git 49 | copy_success: ✅ Copied! 50 | copy_error: ❌ Copy failed! 51 | tab_issue: 52 | 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. 53 | tab_mrs: 54 | 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. 55 | gitlab_pipelines: Pipelines 56 | updated_on: Updated on 57 | -------------------------------------------------------------------------------- /config/locales/crowdin/js-cs.yml: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | cs: 30 | js: 31 | gitlab_integration: 32 | work_packages: 33 | tab_name: "GitLab" 34 | tab_header_issue: 35 | title: "Issues" 36 | tab_header_mr: 37 | title: "Merge requests" 38 | create_mr: 39 | label: Create MR 40 | description: Create a Merge Request 41 | copy_menu: 42 | label: Git snippets 43 | description: Copy git snippets to clipboard 44 | git_actions: 45 | branch_name: Branch name 46 | commit_message: Commit message 47 | cmd: Create branch with empty commit 48 | title: Quick snippets for Git 49 | copy_success: ✅ Copied! 50 | copy_error: ❌ Copy failed! 51 | tab_issue: 52 | 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. 53 | tab_mrs: 54 | 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. 55 | gitlab_pipelines: Pipelines 56 | updated_on: Updated on 57 | -------------------------------------------------------------------------------- /config/locales/crowdin/js-da.yml: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | da: 30 | js: 31 | gitlab_integration: 32 | work_packages: 33 | tab_name: "GitLab" 34 | tab_header_issue: 35 | title: "Issues" 36 | tab_header_mr: 37 | title: "Merge requests" 38 | create_mr: 39 | label: Create MR 40 | description: Create a Merge Request 41 | copy_menu: 42 | label: Git snippets 43 | description: Copy git snippets to clipboard 44 | git_actions: 45 | branch_name: Branch name 46 | commit_message: Commit message 47 | cmd: Create branch with empty commit 48 | title: Quick snippets for Git 49 | copy_success: ✅ Copied! 50 | copy_error: ❌ Copy failed! 51 | tab_issue: 52 | 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. 53 | tab_mrs: 54 | 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. 55 | gitlab_pipelines: Pipelines 56 | updated_on: Updated on 57 | -------------------------------------------------------------------------------- /config/locales/crowdin/js-de.yml: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | de: 30 | js: 31 | gitlab_integration: 32 | work_packages: 33 | tab_name: "GitLab" 34 | tab_header_issue: 35 | title: "Issues" 36 | tab_header_mr: 37 | title: "Merge requests" 38 | create_mr: 39 | label: Create MR 40 | description: Create a Merge Request 41 | copy_menu: 42 | label: Git snippets 43 | description: Copy git snippets to clipboard 44 | git_actions: 45 | branch_name: Branch name 46 | commit_message: Commit message 47 | cmd: Create branch with empty commit 48 | title: Quick snippets for Git 49 | copy_success: ✅ Copied! 50 | copy_error: ❌ Copy failed! 51 | tab_issue: 52 | 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. 53 | tab_mrs: 54 | 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. 55 | gitlab_pipelines: Pipelines 56 | updated_on: Updated on 57 | -------------------------------------------------------------------------------- /config/locales/crowdin/js-el.yml: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | el: 30 | js: 31 | gitlab_integration: 32 | work_packages: 33 | tab_name: "GitLab" 34 | tab_header_issue: 35 | title: "Issues" 36 | tab_header_mr: 37 | title: "Merge requests" 38 | create_mr: 39 | label: Create MR 40 | description: Create a Merge Request 41 | copy_menu: 42 | label: Git snippets 43 | description: Copy git snippets to clipboard 44 | git_actions: 45 | branch_name: Branch name 46 | commit_message: Commit message 47 | cmd: Create branch with empty commit 48 | title: Quick snippets for Git 49 | copy_success: ✅ Copied! 50 | copy_error: ❌ Copy failed! 51 | tab_issue: 52 | 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. 53 | tab_mrs: 54 | 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. 55 | gitlab_pipelines: Pipelines 56 | updated_on: Updated on 57 | -------------------------------------------------------------------------------- /config/locales/crowdin/js-es.yml: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | es: 30 | js: 31 | gitlab_integration: 32 | work_packages: 33 | tab_name: "GitLab" 34 | tab_header_issue: 35 | title: "Issues" 36 | tab_header_mr: 37 | title: "Merge requests" 38 | create_mr: 39 | label: Create MR 40 | description: Create a Merge Request 41 | copy_menu: 42 | label: Git snippets 43 | description: Copy git snippets to clipboard 44 | git_actions: 45 | branch_name: Branch name 46 | commit_message: Commit message 47 | cmd: Create branch with empty commit 48 | title: Quick snippets for Git 49 | copy_success: ✅ Copied! 50 | copy_error: ❌ Copy failed! 51 | tab_issue: 52 | 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. 53 | tab_mrs: 54 | 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. 55 | gitlab_pipelines: Pipelines 56 | updated_on: Updated on 57 | -------------------------------------------------------------------------------- /config/locales/crowdin/js-fi.yml: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | fi: 30 | js: 31 | gitlab_integration: 32 | work_packages: 33 | tab_name: "GitLab" 34 | tab_header_issue: 35 | title: "Issues" 36 | tab_header_mr: 37 | title: "Merge requests" 38 | create_mr: 39 | label: Create MR 40 | description: Create a Merge Request 41 | copy_menu: 42 | label: Git snippets 43 | description: Copy git snippets to clipboard 44 | git_actions: 45 | branch_name: Branch name 46 | commit_message: Commit message 47 | cmd: Create branch with empty commit 48 | title: Quick snippets for Git 49 | copy_success: ✅ Copied! 50 | copy_error: ❌ Copy failed! 51 | tab_issue: 52 | 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. 53 | tab_mrs: 54 | 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. 55 | gitlab_pipelines: Pipelines 56 | updated_on: Updated on 57 | -------------------------------------------------------------------------------- /config/locales/crowdin/js-fil.yml: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | fil: 30 | js: 31 | gitlab_integration: 32 | work_packages: 33 | tab_name: "GitLab" 34 | tab_header_issue: 35 | title: "Issues" 36 | tab_header_mr: 37 | title: "Merge requests" 38 | create_mr: 39 | label: Create MR 40 | description: Create a Merge Request 41 | copy_menu: 42 | label: Git snippets 43 | description: Copy git snippets to clipboard 44 | git_actions: 45 | branch_name: Branch name 46 | commit_message: Commit message 47 | cmd: Create branch with empty commit 48 | title: Quick snippets for Git 49 | copy_success: ✅ Copied! 50 | copy_error: ❌ Copy failed! 51 | tab_issue: 52 | 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. 53 | tab_mrs: 54 | 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. 55 | gitlab_pipelines: Pipelines 56 | updated_on: Updated on 57 | -------------------------------------------------------------------------------- /config/locales/crowdin/js-fr.yml: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | fr: 30 | js: 31 | gitlab_integration: 32 | work_packages: 33 | tab_name: "GitLab" 34 | tab_header_issue: 35 | title: "Issues" 36 | tab_header_mr: 37 | title: "Merge requests" 38 | create_mr: 39 | label: Create MR 40 | description: Create a Merge Request 41 | copy_menu: 42 | label: Git snippets 43 | description: Copy git snippets to clipboard 44 | git_actions: 45 | branch_name: Branch name 46 | commit_message: Commit message 47 | cmd: Create branch with empty commit 48 | title: Quick snippets for Git 49 | copy_success: ✅ Copied! 50 | copy_error: ❌ Copy failed! 51 | tab_issue: 52 | 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. 53 | tab_mrs: 54 | 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. 55 | gitlab_pipelines: Pipelines 56 | updated_on: Updated on 57 | -------------------------------------------------------------------------------- /config/locales/crowdin/js-hr.yml: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | hr: 30 | js: 31 | gitlab_integration: 32 | work_packages: 33 | tab_name: "GitLab" 34 | tab_header_issue: 35 | title: "Issues" 36 | tab_header_mr: 37 | title: "Merge requests" 38 | create_mr: 39 | label: Create MR 40 | description: Create a Merge Request 41 | copy_menu: 42 | label: Git snippets 43 | description: Copy git snippets to clipboard 44 | git_actions: 45 | branch_name: Branch name 46 | commit_message: Commit message 47 | cmd: Create branch with empty commit 48 | title: Quick snippets for Git 49 | copy_success: ✅ Copied! 50 | copy_error: ❌ Copy failed! 51 | tab_issue: 52 | 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. 53 | tab_mrs: 54 | 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. 55 | gitlab_pipelines: Pipelines 56 | updated_on: Updated on 57 | -------------------------------------------------------------------------------- /config/locales/crowdin/js-hu.yml: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | hu: 30 | js: 31 | gitlab_integration: 32 | work_packages: 33 | tab_name: "GitLab" 34 | tab_header_issue: 35 | title: "Issues" 36 | tab_header_mr: 37 | title: "Merge requests" 38 | create_mr: 39 | label: Create MR 40 | description: Create a Merge Request 41 | copy_menu: 42 | label: Git snippets 43 | description: Copy git snippets to clipboard 44 | git_actions: 45 | branch_name: Branch name 46 | commit_message: Commit message 47 | cmd: Create branch with empty commit 48 | title: Quick snippets for Git 49 | copy_success: ✅ Copied! 50 | copy_error: ❌ Copy failed! 51 | tab_issue: 52 | 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. 53 | tab_mrs: 54 | 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. 55 | gitlab_pipelines: Pipelines 56 | updated_on: Updated on 57 | -------------------------------------------------------------------------------- /config/locales/crowdin/js-id.yml: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | id: 30 | js: 31 | gitlab_integration: 32 | work_packages: 33 | tab_name: "GitLab" 34 | tab_header_issue: 35 | title: "Issues" 36 | tab_header_mr: 37 | title: "Merge requests" 38 | create_mr: 39 | label: Create MR 40 | description: Create a Merge Request 41 | copy_menu: 42 | label: Git snippets 43 | description: Copy git snippets to clipboard 44 | git_actions: 45 | branch_name: Branch name 46 | commit_message: Commit message 47 | cmd: Create branch with empty commit 48 | title: Quick snippets for Git 49 | copy_success: ✅ Copied! 50 | copy_error: ❌ Copy failed! 51 | tab_issue: 52 | 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. 53 | tab_mrs: 54 | 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. 55 | gitlab_pipelines: Pipelines 56 | updated_on: Updated on 57 | -------------------------------------------------------------------------------- /config/locales/crowdin/js-it.yml: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | it: 30 | js: 31 | gitlab_integration: 32 | work_packages: 33 | tab_name: "GitLab" 34 | tab_header_issue: 35 | title: "Issues" 36 | tab_header_mr: 37 | title: "Merge requests" 38 | create_mr: 39 | label: Create MR 40 | description: Create a Merge Request 41 | copy_menu: 42 | label: Git snippets 43 | description: Copy git snippets to clipboard 44 | git_actions: 45 | branch_name: Branch name 46 | commit_message: Commit message 47 | cmd: Create branch with empty commit 48 | title: Quick snippets for Git 49 | copy_success: ✅ Copied! 50 | copy_error: ❌ Copy failed! 51 | tab_issue: 52 | 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. 53 | tab_mrs: 54 | 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. 55 | gitlab_pipelines: Pipelines 56 | updated_on: Updated on 57 | -------------------------------------------------------------------------------- /config/locales/crowdin/js-ja.yml: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | ja: 30 | js: 31 | gitlab_integration: 32 | work_packages: 33 | tab_name: "GitLab" 34 | tab_header_issue: 35 | title: "Issues" 36 | tab_header_mr: 37 | title: "Merge requests" 38 | create_mr: 39 | label: Create MR 40 | description: Create a Merge Request 41 | copy_menu: 42 | label: Git snippets 43 | description: Copy git snippets to clipboard 44 | git_actions: 45 | branch_name: Branch name 46 | commit_message: Commit message 47 | cmd: Create branch with empty commit 48 | title: Quick snippets for Git 49 | copy_success: ✅ Copied! 50 | copy_error: ❌ Copy failed! 51 | tab_issue: 52 | 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. 53 | tab_mrs: 54 | 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. 55 | gitlab_pipelines: Pipelines 56 | updated_on: Updated on 57 | -------------------------------------------------------------------------------- /config/locales/crowdin/js-ko.yml: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | ko: 30 | js: 31 | gitlab_integration: 32 | work_packages: 33 | tab_name: "GitLab" 34 | tab_header_issue: 35 | title: "Issues" 36 | tab_header_mr: 37 | title: "Merge requests" 38 | create_mr: 39 | label: Create MR 40 | description: Create a Merge Request 41 | copy_menu: 42 | label: Git snippets 43 | description: Copy git snippets to clipboard 44 | git_actions: 45 | branch_name: Branch name 46 | commit_message: Commit message 47 | cmd: Create branch with empty commit 48 | title: Quick snippets for Git 49 | copy_success: ✅ Copied! 50 | copy_error: ❌ Copy failed! 51 | tab_issue: 52 | 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. 53 | tab_mrs: 54 | 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. 55 | gitlab_pipelines: Pipelines 56 | updated_on: Updated on 57 | -------------------------------------------------------------------------------- /config/locales/crowdin/js-lt.yml: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | lt: 30 | js: 31 | gitlab_integration: 32 | work_packages: 33 | tab_name: "GitLab" 34 | tab_header_issue: 35 | title: "Issues" 36 | tab_header_mr: 37 | title: "Merge requests" 38 | create_mr: 39 | label: Create MR 40 | description: Create a Merge Request 41 | copy_menu: 42 | label: Git snippets 43 | description: Copy git snippets to clipboard 44 | git_actions: 45 | branch_name: Branch name 46 | commit_message: Commit message 47 | cmd: Create branch with empty commit 48 | title: Quick snippets for Git 49 | copy_success: ✅ Copied! 50 | copy_error: ❌ Copy failed! 51 | tab_issue: 52 | 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. 53 | tab_mrs: 54 | 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. 55 | gitlab_pipelines: Pipelines 56 | updated_on: Updated on 57 | -------------------------------------------------------------------------------- /config/locales/crowdin/js-nl.yml: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | nl: 30 | js: 31 | gitlab_integration: 32 | work_packages: 33 | tab_name: "GitLab" 34 | tab_header_issue: 35 | title: "Issues" 36 | tab_header_mr: 37 | title: "Merge requests" 38 | create_mr: 39 | label: Create MR 40 | description: Create a Merge Request 41 | copy_menu: 42 | label: Git snippets 43 | description: Copy git snippets to clipboard 44 | git_actions: 45 | branch_name: Branch name 46 | commit_message: Commit message 47 | cmd: Create branch with empty commit 48 | title: Quick snippets for Git 49 | copy_success: ✅ Copied! 50 | copy_error: ❌ Copy failed! 51 | tab_issue: 52 | 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. 53 | tab_mrs: 54 | 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. 55 | gitlab_pipelines: Pipelines 56 | updated_on: Updated on 57 | -------------------------------------------------------------------------------- /config/locales/crowdin/js-no.yml: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | "no": 30 | js: 31 | gitlab_integration: 32 | work_packages: 33 | tab_name: "GitLab" 34 | tab_header_issue: 35 | title: "Issues" 36 | tab_header_mr: 37 | title: "Merge requests" 38 | create_mr: 39 | label: Create MR 40 | description: Create a Merge Request 41 | copy_menu: 42 | label: Git snippets 43 | description: Copy git snippets to clipboard 44 | git_actions: 45 | branch_name: Branch name 46 | commit_message: Commit message 47 | cmd: Create branch with empty commit 48 | title: Quick snippets for Git 49 | copy_success: ✅ Copied! 50 | copy_error: ❌ Copy failed! 51 | tab_issue: 52 | 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. 53 | tab_mrs: 54 | 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. 55 | gitlab_pipelines: Pipelines 56 | updated_on: Updated on 57 | -------------------------------------------------------------------------------- /config/locales/crowdin/js-pl.yml: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | pl: 30 | js: 31 | gitlab_integration: 32 | work_packages: 33 | tab_name: "GitLab" 34 | tab_header_issue: 35 | title: "Issues" 36 | tab_header_mr: 37 | title: "Merge requests" 38 | create_mr: 39 | label: Create MR 40 | description: Create a Merge Request 41 | copy_menu: 42 | label: Git snippets 43 | description: Copy git snippets to clipboard 44 | git_actions: 45 | branch_name: Branch name 46 | commit_message: Commit message 47 | cmd: Create branch with empty commit 48 | title: Quick snippets for Git 49 | copy_success: ✅ Copied! 50 | copy_error: ❌ Copy failed! 51 | tab_issue: 52 | 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. 53 | tab_mrs: 54 | 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. 55 | gitlab_pipelines: Pipelines 56 | updated_on: Updated on 57 | -------------------------------------------------------------------------------- /config/locales/crowdin/js-pt.yml: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | pt: 30 | js: 31 | gitlab_integration: 32 | work_packages: 33 | tab_name: "GitLab" 34 | tab_header_issue: 35 | title: "Issues" 36 | tab_header_mr: 37 | title: "Merge requests" 38 | create_mr: 39 | label: Create MR 40 | description: Create a Merge Request 41 | copy_menu: 42 | label: Git snippets 43 | description: Copy git snippets to clipboard 44 | git_actions: 45 | branch_name: Branch name 46 | commit_message: Commit message 47 | cmd: Create branch with empty commit 48 | title: Quick snippets for Git 49 | copy_success: ✅ Copied! 50 | copy_error: ❌ Copy failed! 51 | tab_issue: 52 | 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. 53 | tab_mrs: 54 | 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. 55 | gitlab_pipelines: Pipelines 56 | updated_on: Updated on 57 | -------------------------------------------------------------------------------- /config/locales/crowdin/js-ro.yml: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | ro: 30 | js: 31 | gitlab_integration: 32 | work_packages: 33 | tab_name: "GitLab" 34 | tab_header_issue: 35 | title: "Issues" 36 | tab_header_mr: 37 | title: "Merge requests" 38 | create_mr: 39 | label: Create MR 40 | description: Create a Merge Request 41 | copy_menu: 42 | label: Git snippets 43 | description: Copy git snippets to clipboard 44 | git_actions: 45 | branch_name: Branch name 46 | commit_message: Commit message 47 | cmd: Create branch with empty commit 48 | title: Quick snippets for Git 49 | copy_success: ✅ Copied! 50 | copy_error: ❌ Copy failed! 51 | tab_issue: 52 | 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. 53 | tab_mrs: 54 | 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. 55 | gitlab_pipelines: Pipelines 56 | updated_on: Updated on 57 | -------------------------------------------------------------------------------- /config/locales/crowdin/js-ru.yml: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | ru: 30 | js: 31 | gitlab_integration: 32 | work_packages: 33 | tab_name: GitLab 34 | tab_header_issue: 35 | title: Обсуждения 36 | tab_header_mr: 37 | title: Запросы на слияние 38 | create_mr: 39 | label: Создать запрос на слияние 40 | description: Создать запрос на слияние 41 | copy_menu: 42 | label: Git-подсказки 43 | description: Скопипастить Git-подсказки 44 | git_actions: 45 | branch_name: Имя ветки 46 | commit_message: Описание коммита 47 | cmd: Создать ветку с пустым коммитом 48 | title: Git-подсказки 49 | copy_success: ✅ Скопировано 50 | copy_error: ❌ Не получилось скопировать 51 | tab_issue: 52 | empty: Нет связанных обсуждений. Привязать обсуждение можно путём вставки кода OP#%{wp_id} (или PP#%{wp_id} для приватных ссылок) в заголовке/описании при создании/редактировании обсуждения. 53 | tab_mrs: 54 | empty: Нет связанных запросов на слияние. Привязать запрос на слияние можно путём вставки кода OP#%{wp_id} (или PP#%{wp_id} для приватных ссылок) в заголовке/описании при создании/редактировании запроса на слияние. 55 | gitlab_pipelines: Сборочные линии (pipelines) 56 | updated_on: Обновлено 57 | -------------------------------------------------------------------------------- /config/locales/crowdin/js-sk.yml: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | sk: 30 | js: 31 | gitlab_integration: 32 | work_packages: 33 | tab_name: "GitLab" 34 | tab_header_issue: 35 | title: "Issues" 36 | tab_header_mr: 37 | title: "Merge requests" 38 | create_mr: 39 | label: Create MR 40 | description: Create a Merge Request 41 | copy_menu: 42 | label: Git snippets 43 | description: Copy git snippets to clipboard 44 | git_actions: 45 | branch_name: Branch name 46 | commit_message: Commit message 47 | cmd: Create branch with empty commit 48 | title: Quick snippets for Git 49 | copy_success: ✅ Copied! 50 | copy_error: ❌ Copy failed! 51 | tab_issue: 52 | 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. 53 | tab_mrs: 54 | 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. 55 | gitlab_pipelines: Pipelines 56 | updated_on: Updated on 57 | -------------------------------------------------------------------------------- /config/locales/crowdin/js-sl.yml: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | sl: 30 | js: 31 | gitlab_integration: 32 | work_packages: 33 | tab_name: "GitLab" 34 | tab_header_issue: 35 | title: "Issues" 36 | tab_header_mr: 37 | title: "Merge requests" 38 | create_mr: 39 | label: Create MR 40 | description: Create a Merge Request 41 | copy_menu: 42 | label: Git snippets 43 | description: Copy git snippets to clipboard 44 | git_actions: 45 | branch_name: Branch name 46 | commit_message: Commit message 47 | cmd: Create branch with empty commit 48 | title: Quick snippets for Git 49 | copy_success: ✅ Copied! 50 | copy_error: ❌ Copy failed! 51 | tab_issue: 52 | 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. 53 | tab_mrs: 54 | 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. 55 | gitlab_pipelines: Pipelines 56 | updated_on: Updated on 57 | -------------------------------------------------------------------------------- /config/locales/crowdin/js-sv.yml: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | sv: 30 | js: 31 | gitlab_integration: 32 | work_packages: 33 | tab_name: "GitLab" 34 | tab_header_issue: 35 | title: "Issues" 36 | tab_header_mr: 37 | title: "Merge requests" 38 | create_mr: 39 | label: Create MR 40 | description: Create a Merge Request 41 | copy_menu: 42 | label: Git snippets 43 | description: Copy git snippets to clipboard 44 | git_actions: 45 | branch_name: Branch name 46 | commit_message: Commit message 47 | cmd: Create branch with empty commit 48 | title: Quick snippets for Git 49 | copy_success: ✅ Copied! 50 | copy_error: ❌ Copy failed! 51 | tab_issue: 52 | 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. 53 | tab_mrs: 54 | 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. 55 | gitlab_pipelines: Pipelines 56 | updated_on: Updated on 57 | -------------------------------------------------------------------------------- /config/locales/crowdin/js-tr.yml: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | tr: 30 | js: 31 | gitlab_integration: 32 | work_packages: 33 | tab_name: "GitLab" 34 | tab_header_issue: 35 | title: "Issues" 36 | tab_header_mr: 37 | title: "Merge requests" 38 | create_mr: 39 | label: Create MR 40 | description: Create a Merge Request 41 | copy_menu: 42 | label: Git snippets 43 | description: Copy git snippets to clipboard 44 | git_actions: 45 | branch_name: Branch name 46 | commit_message: Commit message 47 | cmd: Create branch with empty commit 48 | title: Quick snippets for Git 49 | copy_success: ✅ Copied! 50 | copy_error: ❌ Copy failed! 51 | tab_issue: 52 | 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. 53 | tab_mrs: 54 | 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. 55 | gitlab_pipelines: Pipelines 56 | updated_on: Updated on 57 | -------------------------------------------------------------------------------- /config/locales/crowdin/js-uk.yml: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | uk: 30 | js: 31 | gitlab_integration: 32 | work_packages: 33 | tab_name: "GitLab" 34 | tab_header_issue: 35 | title: "Issues" 36 | tab_header_mr: 37 | title: "Merge requests" 38 | create_mr: 39 | label: Create MR 40 | description: Create a Merge Request 41 | copy_menu: 42 | label: Git snippets 43 | description: Copy git snippets to clipboard 44 | git_actions: 45 | branch_name: Branch name 46 | commit_message: Commit message 47 | cmd: Create branch with empty commit 48 | title: Quick snippets for Git 49 | copy_success: ✅ Copied! 50 | copy_error: ❌ Copy failed! 51 | tab_issue: 52 | 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. 53 | tab_mrs: 54 | 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. 55 | gitlab_pipelines: Pipelines 56 | updated_on: Updated on 57 | -------------------------------------------------------------------------------- /config/locales/crowdin/js-vi.yml: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | vi: 30 | js: 31 | gitlab_integration: 32 | work_packages: 33 | tab_name: "GitLab" 34 | tab_header_issue: 35 | title: "Issues" 36 | tab_header_mr: 37 | title: "Merge requests" 38 | create_mr: 39 | label: Create MR 40 | description: Create a Merge Request 41 | copy_menu: 42 | label: Git snippets 43 | description: Copy git snippets to clipboard 44 | git_actions: 45 | branch_name: Branch name 46 | commit_message: Commit message 47 | cmd: Create branch with empty commit 48 | title: Quick snippets for Git 49 | copy_success: ✅ Copied! 50 | copy_error: ❌ Copy failed! 51 | tab_issue: 52 | 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. 53 | tab_mrs: 54 | 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. 55 | gitlab_pipelines: Pipelines 56 | updated_on: Updated on 57 | -------------------------------------------------------------------------------- /config/locales/crowdin/js-zh-CN.yml: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | zh-CN: 30 | js: 31 | gitlab_integration: 32 | work_packages: 33 | tab_name: "GitLab" 34 | tab_header_issue: 35 | title: "Issues" 36 | tab_header_mr: 37 | title: "Merge requests" 38 | create_mr: 39 | label: Create MR 40 | description: Create a Merge Request 41 | copy_menu: 42 | label: Git snippets 43 | description: Copy git snippets to clipboard 44 | git_actions: 45 | branch_name: Branch name 46 | commit_message: Commit message 47 | cmd: Create branch with empty commit 48 | title: Quick snippets for Git 49 | copy_success: ✅ Copied! 50 | copy_error: ❌ Copy failed! 51 | tab_issue: 52 | 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. 53 | tab_mrs: 54 | 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. 55 | gitlab_pipelines: Pipelines 56 | updated_on: Updated on 57 | -------------------------------------------------------------------------------- /config/locales/crowdin/js-zh-TW.yml: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | zh-TW: 30 | js: 31 | gitlab_integration: 32 | work_packages: 33 | tab_name: "GitLab" 34 | tab_header_issue: 35 | title: "Issues" 36 | tab_header_mr: 37 | title: "Merge requests" 38 | create_mr: 39 | label: Create MR 40 | description: Create a Merge Request 41 | copy_menu: 42 | label: Git snippets 43 | description: Copy git snippets to clipboard 44 | git_actions: 45 | branch_name: Branch name 46 | commit_message: Commit message 47 | cmd: Create branch with empty commit 48 | title: Quick snippets for Git 49 | copy_success: ✅ Copied! 50 | copy_error: ❌ Copy failed! 51 | tab_issue: 52 | 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. 53 | tab_mrs: 54 | 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. 55 | gitlab_pipelines: Pipelines 56 | updated_on: Updated on 57 | -------------------------------------------------------------------------------- /config/locales/js-en.yml: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | 30 | en: 31 | js: 32 | gitlab_integration: 33 | work_packages: 34 | tab_name: "GitLab" 35 | tab_header_issue: 36 | title: "Issues" 37 | tab_header_mr: 38 | title: "Merge requests" 39 | create_mr: 40 | label: Create MR 41 | description: Create a Merge Request 42 | copy_menu: 43 | label: Git snippets 44 | description: Copy git snippets to clipboard 45 | git_actions: 46 | branch_name: Branch name 47 | commit_message: Commit message 48 | cmd: Create branch with empty commit 49 | title: Quick snippets for Git 50 | copy_success: ✅ Copied! 51 | copy_error: ❌ Copy failed! 52 | tab_issue: 53 | 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. 54 | tab_mrs: 55 | 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. 56 | gitlab_pipelines: Pipelines 57 | updated_on: Updated on 58 | -------------------------------------------------------------------------------- /db/migrate/20211015110000_gitlab_integration_models.rb: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | class GitlabIntegrationModels < ActiveRecord::Migration[6.1] 30 | # rubocop:disable Metrics/AbcSize 31 | def change 32 | create_table :gitlab_merge_requests do |t| 33 | t.references :gitlab_user 34 | t.references :merged_by 35 | 36 | t.bigint :gitlab_id, unique: true 37 | t.integer :number, null: false 38 | t.string :gitlab_html_url, null: false, unique: true 39 | t.string :state, null: false 40 | t.string :repository, null: false 41 | t.datetime :gitlab_updated_at 42 | t.string :title 43 | t.text :body 44 | t.boolean :draft 45 | t.boolean :merged 46 | t.datetime :merged_at 47 | t.json :labels # [{name, color}] 48 | t.timestamps 49 | end 50 | 51 | create_join_table :gitlab_merge_requests, :work_packages do |t| 52 | t.index :gitlab_merge_request_id, name: 'gitlab_mr_wp_mr_id' 53 | t.index %i[gitlab_merge_request_id work_package_id], 54 | unique: true, 55 | name: "unique_index_gl_mrs_wps_on_gl_mr_id_and_wp_id" 56 | end 57 | 58 | 59 | create_table :gitlab_users do |t| 60 | t.bigint :gitlab_id, null: false, unique: true 61 | t.string :gitlab_name, null: false 62 | t.string :gitlab_username, null: false 63 | t.string :gitlab_email, null: false 64 | t.string :gitlab_avatar_url, null: false 65 | 66 | t.timestamps 67 | end 68 | 69 | 70 | create_table :gitlab_pipelines do |t| 71 | t.references :gitlab_merge_request, null: false 72 | 73 | t.bigint :gitlab_id, null: false, unique: true 74 | t.string :gitlab_html_url, null: false 75 | t.bigint :project_id, null: false 76 | t.string :gitlab_user_avatar_url, null: false 77 | t.string :status, null: false 78 | t.string :name, null: false 79 | t.string :details_url 80 | t.json :ci_details 81 | t.datetime :started_at 82 | t.datetime :completed_at 83 | 84 | t.timestamps 85 | end 86 | end 87 | # rubocop:enable Metrics/AbcSize 88 | end 89 | -------------------------------------------------------------------------------- /db/migrate/20211015110001_add_username_commit_to_pipelines.rb: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | 30 | class AddUsernameCommitToPipelines < ActiveRecord::Migration[7.0] 31 | def change 32 | add_column :gitlab_pipelines, :username, :text 33 | 34 | add_column :gitlab_pipelines, :commit_id, :text 35 | end 36 | end 37 | -------------------------------------------------------------------------------- /db/migrate/20211015110002_add_gitlab_issues.rb: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | class AddGitlabIssues < ActiveRecord::Migration[7.0] 30 | # rubocop:disable Metrics/AbcSize 31 | def change 32 | create_table :gitlab_issues do |t| 33 | t.references :gitlab_user 34 | 35 | t.bigint :gitlab_id, unique: true 36 | t.integer :number, null: false 37 | t.string :gitlab_html_url, null: false, unique: true 38 | t.string :state, null: false 39 | t.string :repository, null: false 40 | t.datetime :gitlab_updated_at 41 | t.string :title 42 | t.text :body 43 | t.json :labels # [{name, color}] 44 | t.timestamps 45 | end 46 | 47 | create_join_table :gitlab_issues, :work_packages do |t| 48 | t.index :gitlab_issue_id, name: 'gitlab_issues_wp_issue_id' 49 | t.index %i[gitlab_issue_id work_package_id], 50 | unique: true, 51 | name: "unique_index_gl_issues_wps_on_gl_issue_id_and_wp_id" 52 | end 53 | 54 | end 55 | # rubocop:enable Metrics/AbcSize 56 | end 57 | -------------------------------------------------------------------------------- /doc/op-commented-in-issue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btey/openproject-gitlab-integration/7ae05eb720342a1d15866f792c9cf87bb8d88fe6/doc/op-commented-in-issue.png -------------------------------------------------------------------------------- /doc/op-commented-in-mr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btey/openproject-gitlab-integration/7ae05eb720342a1d15866f792c9cf87bb8d88fe6/doc/op-commented-in-mr.png -------------------------------------------------------------------------------- /doc/op-issue-opened.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btey/openproject-gitlab-integration/7ae05eb720342a1d15866f792c9cf87bb8d88fe6/doc/op-issue-opened.png -------------------------------------------------------------------------------- /doc/op-mr-merged-event-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btey/openproject-gitlab-integration/7ae05eb720342a1d15866f792c9cf87bb8d88fe6/doc/op-mr-merged-event-1.png -------------------------------------------------------------------------------- /doc/op-mr-merged-event-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btey/openproject-gitlab-integration/7ae05eb720342a1d15866f792c9cf87bb8d88fe6/doc/op-mr-merged-event-2.png -------------------------------------------------------------------------------- /doc/op-mr-merged-event-3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btey/openproject-gitlab-integration/7ae05eb720342a1d15866f792c9cf87bb8d88fe6/doc/op-mr-merged-event-3.png -------------------------------------------------------------------------------- /doc/op-mr-merged-event-4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btey/openproject-gitlab-integration/7ae05eb720342a1d15866f792c9cf87bb8d88fe6/doc/op-mr-merged-event-4.png -------------------------------------------------------------------------------- /doc/op-mr-opened.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btey/openproject-gitlab-integration/7ae05eb720342a1d15866f792c9cf87bb8d88fe6/doc/op-mr-opened.png -------------------------------------------------------------------------------- /doc/op-pushed-in-mr.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btey/openproject-gitlab-integration/7ae05eb720342a1d15866f792c9cf87bb8d88fe6/doc/op-pushed-in-mr.png -------------------------------------------------------------------------------- /doc/op-referenced-in-commit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btey/openproject-gitlab-integration/7ae05eb720342a1d15866f792c9cf87bb8d88fe6/doc/op-referenced-in-commit.png -------------------------------------------------------------------------------- /doc/op-referenced-in-issue.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/btey/openproject-gitlab-integration/7ae05eb720342a1d15866f792c9cf87bb8d88fe6/doc/op-referenced-in-issue.png -------------------------------------------------------------------------------- /frontend/module/git-actions-menu/git-actions-menu.directive.ts: -------------------------------------------------------------------------------- 1 | //-- copyright 2 | // OpenProject is an open source project management software. 3 | // Copyright (C) 2023 Ben Tey 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License version 3. 7 | // 8 | // OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | // Copyright (C) 2006-2013 Jean-Philippe Lang 10 | // Copyright (C) 2010-2013 the ChiliProject Team 11 | // Copyright (C) 2012-2021 the OpenProject GmbH 12 | // 13 | // This program is free software; you can redistribute it and/or 14 | // modify it under the terms of the GNU General Public License 15 | // as published by the Free Software Foundation; either version 2 16 | // of the License, or (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program; if not, write to the Free Software 25 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | // 27 | // See docs/COPYRIGHT.rdoc for more details. 28 | //++ 29 | 30 | import { OpContextMenuItem } from 'core-app/shared/components/op-context-menu/op-context-menu.types'; 31 | import { OPContextMenuService } from 'core-app/shared/components/op-context-menu/op-context-menu.service'; 32 | import { Directive, ElementRef, Input } from '@angular/core'; 33 | import { OpContextMenuTrigger } from 'core-app/shared/components/op-context-menu/handlers/op-context-menu-trigger.directive'; 34 | import { WorkPackageResource } from "core-app/features/hal/resources/work-package-resource"; 35 | import { GitActionsMenuComponent } from './git-actions-menu.component'; 36 | 37 | 38 | @Directive({ 39 | selector: '[gitActionsCopyDropdown]' 40 | }) 41 | export class GitActionsMenuDirective extends OpContextMenuTrigger { 42 | @Input('gitActionsCopyDropdown-workPackage') public workPackage:WorkPackageResource; 43 | 44 | constructor(readonly elementRef:ElementRef, 45 | readonly opContextMenu:OPContextMenuService) { 46 | super(elementRef, opContextMenu); 47 | } 48 | 49 | protected open(evt:JQuery.TriggeredEvent) { 50 | this.opContextMenu.show(this, evt, GitActionsMenuComponent); 51 | } 52 | 53 | public get locals():{ showAnchorRight?:boolean, contextMenuId?:string, items:OpContextMenuItem[], workPackage:WorkPackageResource } { 54 | return { 55 | workPackage: this.workPackage, 56 | contextMenuId: 'gitlab-integration-git-actions-menu', 57 | items: [] 58 | }; 59 | } 60 | } 61 | 62 | -------------------------------------------------------------------------------- /frontend/module/git-actions-menu/git-actions-menu.template.html: -------------------------------------------------------------------------------- 1 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /frontend/module/git-actions-menu/styles/git-actions-menu.sass: -------------------------------------------------------------------------------- 1 | //-- copyright 2 | // OpenProject is an open source project management software. 3 | // Copyright (C) 2023 Ben Tey 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License version 3. 7 | // 8 | // OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | // Copyright (C) 2006-2013 Jean-Philippe Lang 10 | // Copyright (C) 2010-2013 the ChiliProject Team 11 | // Copyright (C) 2012-2021 the OpenProject GmbH 12 | // 13 | // This program is free software; you can redistribute it and/or 14 | // modify it under the terms of the GNU General Public License 15 | // as published by the Free Software Foundation; either version 2 16 | // of the License, or (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program; if not, write to the Free Software 25 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | // 27 | // See docs/COPYRIGHT.rdoc for more details. 28 | //++ 29 | .git-actions-menu 30 | background-color: var(--body-background) 31 | border: var(--content-default-border-width) solid var(--content-default-border-color) 32 | padding: 1rem 1rem 2rem 1rem 33 | min-width: 25rem 34 | box-shadow: .1em .1em .4em rgba(0,0,0,0.1) 35 | 36 | .copy-wrapper 37 | width: 100% 38 | position: relative 39 | margin-bottom: 1rem 40 | 41 | .copy-content 42 | width: calc(100% - 3em) 43 | // the min-height should be the size of the copy-icon, which is the sum of: 44 | // 2 * button padding (0.65em) 45 | // font-size of the icon (0.9em) 46 | // 1px where I don't know where it comes from 47 | min-height: calc(2 * 0.65em + 0.9em + 1px) 48 | border-radius: 2px 0 0 2px 49 | padding: 0.65em 50 | color: var(--gray-dark) 51 | white-space: pre 52 | resize: none 53 | font-size: 0.9rem 54 | display: inline-block 55 | 56 | .copy-button 57 | margin: 0 58 | border: 1px solid #ccc 59 | border-radius: 0 2px 2px 0 60 | vertical-align: top 61 | left: -1px 62 | position: relative 63 | font-size: 0.9rem 64 | 65 | &:hover 66 | border-color: #999 67 | 68 | .copy-result-message 69 | background-color: var(--main-menu-bg-color) 70 | display: inline-block 71 | padding: 0.5em 72 | border-radius: 5px 73 | color: var(--main-menu-font-color) 74 | position: absolute 75 | right: 0 76 | top: calc(2 * 0.65em + 0.9em + 1px + 9px) 77 | box-shadow: 1px 1px 4px var(--gray-dark) 78 | z-index: 1 79 | 80 | &:before 81 | content: "" 82 | border-bottom: 0.6em solid var(--main-menu-bg-color) 83 | height: 0 84 | width: 0 85 | position: absolute 86 | top: -9px 87 | right: 10px 88 | border-left: 0.3em solid transparent 89 | border-right: 0.3em solid transparent 90 | 91 | -------------------------------------------------------------------------------- /frontend/module/gitlab-tab/gitlab-tab.component.sass: -------------------------------------------------------------------------------- 1 | //-- copyright 2 | // OpenProject is an open source project management software. 3 | // Copyright (C) 2023 Ben Tey 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License version 3. 7 | // 8 | // OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | // Copyright (C) 2006-2013 Jean-Philippe Lang 10 | // Copyright (C) 2010-2013 the ChiliProject Team 11 | // Copyright (C) 2012-2021 the OpenProject GmbH 12 | // 13 | // This program is free software; you can redistribute it and/or 14 | // modify it under the terms of the GNU General Public License 15 | // as published by the Free Software Foundation; either version 2 16 | // of the License, or (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program; if not, write to the Free Software 25 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | // 27 | // See docs/COPYRIGHT.rdoc for more details. 28 | //++ 29 | 30 | @import "helpers" 31 | 32 | :host, 33 | .gitlab-header 34 | position: sticky 35 | top: 0 36 | z-index: 850 // Ensure the header is above other content 37 | -------------------------------------------------------------------------------- /frontend/module/gitlab-tab/gitlab-tab.component.ts: -------------------------------------------------------------------------------- 1 | //-- copyright 2 | // OpenProject is an open source project management software. 3 | // Copyright (C) 2023 Ben Tey 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License version 3. 7 | // 8 | // OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | // Copyright (C) 2006-2013 Jean-Philippe Lang 10 | // Copyright (C) 2010-2013 the ChiliProject Team 11 | // Copyright (C) 2012-2021 the OpenProject GmbH 12 | // 13 | // This program is free software; you can redistribute it and/or 14 | // modify it under the terms of the GNU General Public License 15 | // as published by the Free Software Foundation; either version 2 16 | // of the License, or (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program; if not, write to the Free Software 25 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | // 27 | // See docs/COPYRIGHT.rdoc for more details. 28 | //++ 29 | 30 | import { Component, Input } from '@angular/core'; 31 | import { WorkPackageResource } from "core-app/features/hal/resources/work-package-resource"; 32 | import { TabComponent } from "core-app/features/work-packages/components/wp-tabs/components/wp-tab-wrapper/tab"; 33 | import { I18nService } from "core-app/core/i18n/i18n.service"; 34 | import { PathHelperService } from "core-app/core/path-helper/path-helper.service"; 35 | 36 | @Component({ 37 | selector: 'gitlab-tab', 38 | templateUrl: './gitlab-tab.template.html', 39 | styleUrls: [ 40 | './gitlab-tab.component.sass', 41 | ] 42 | }) 43 | export class GitlabTabComponent implements TabComponent { 44 | @Input() public workPackage:WorkPackageResource; 45 | 46 | constructor(readonly PathHelper:PathHelperService, 47 | readonly I18n:I18nService) { 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /frontend/module/hal/resources/gitlab-issue-resource.ts: -------------------------------------------------------------------------------- 1 | //-- copyright 2 | // OpenProject is an open source project management software. 3 | // Copyright (C) 2023 Ben Tey 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License version 3. 7 | // 8 | // OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | // Copyright (C) 2006-2013 Jean-Philippe Lang 10 | // Copyright (C) 2010-2013 the ChiliProject Team 11 | // Copyright (C) 2012-2021 the OpenProject GmbH 12 | // 13 | // This program is free software; you can redistribute it and/or 14 | // modify it under the terms of the GNU General Public License 15 | // as published by the Free Software Foundation; either version 2 16 | // of the License, or (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program; if not, write to the Free Software 25 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | // 27 | // See docs/COPYRIGHT.rdoc for more details. 28 | //++ 29 | 30 | import { HalResource } from "core-app/features/hal/resources/hal-resource"; 31 | 32 | export class GitlabIssueResource extends HalResource { 33 | public get state() { 34 | return this.states.projects.get(this.id!) as any; 35 | } 36 | 37 | /** 38 | * Exclude the schema _link from the linkable Resources. 39 | */ 40 | public $linkableKeys():string[] { 41 | return _.without(super.$linkableKeys(), 'schema'); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /frontend/module/hal/resources/gitlab-merge-request-resource.ts: -------------------------------------------------------------------------------- 1 | //-- copyright 2 | // OpenProject is an open source project management software. 3 | // Copyright (C) 2023 Ben Tey 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License version 3. 7 | // 8 | // OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | // Copyright (C) 2006-2013 Jean-Philippe Lang 10 | // Copyright (C) 2010-2013 the ChiliProject Team 11 | // Copyright (C) 2012-2021 the OpenProject GmbH 12 | // 13 | // This program is free software; you can redistribute it and/or 14 | // modify it under the terms of the GNU General Public License 15 | // as published by the Free Software Foundation; either version 2 16 | // of the License, or (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program; if not, write to the Free Software 25 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | // 27 | // See docs/COPYRIGHT.rdoc for more details. 28 | //++ 29 | 30 | import { HalResource } from "core-app/features/hal/resources/hal-resource"; 31 | 32 | export class GitlabMergeRequestResource extends HalResource { 33 | public get state() { 34 | return this.states.projects.get(this.id!) as any; 35 | } 36 | 37 | /** 38 | * Exclude the schema _link from the linkable Resources. 39 | */ 40 | public $linkableKeys():string[] { 41 | return _.without(super.$linkableKeys(), 'schema'); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /frontend/module/hal/resources/gitlab-user-resource.ts: -------------------------------------------------------------------------------- 1 | //-- copyright 2 | // OpenProject is an open source project management software. 3 | // Copyright (C) 2023 Ben Tey 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License version 3. 7 | // 8 | // OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | // Copyright (C) 2006-2013 Jean-Philippe Lang 10 | // Copyright (C) 2010-2013 the ChiliProject Team 11 | // Copyright (C) 2012-2021 the OpenProject GmbH 12 | // 13 | // This program is free software; you can redistribute it and/or 14 | // modify it under the terms of the GNU General Public License 15 | // as published by the Free Software Foundation; either version 2 16 | // of the License, or (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program; if not, write to the Free Software 25 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | // 27 | // See docs/COPYRIGHT.rdoc for more details. 28 | //++ 29 | 30 | import { HalResource } from "core-app/features/hal/resources/hal-resource"; 31 | 32 | export class GitlabUserResource extends HalResource { 33 | public get state() { 34 | return this.states.projects.get(this.id!) as any; 35 | } 36 | 37 | /** 38 | * Exclude the schema _link from the linkable Resources. 39 | */ 40 | public $linkableKeys():string[] { 41 | return _.without(super.$linkableKeys(), 'schema'); 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /frontend/module/issue/issue.component.html: -------------------------------------------------------------------------------- 1 |
5 | 6 | 7 | 8 | {{state}} | 9 | 15 | 16 | 17 | 20 | 21 |
22 | {{ text.label_created_by }} 23 | 29 | 30 | . 36 | 37 | 38 | {{ text.label_last_updated_on }} 39 | 40 | . 41 |
42 | 43 | 52 | -------------------------------------------------------------------------------- /frontend/module/issue/issue.component.ts: -------------------------------------------------------------------------------- 1 | //-- copyright 2 | // OpenProject is an open source project management software. 3 | // Copyright (C) 2023 Ben Tey 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License version 3. 7 | // 8 | // OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | // Copyright (C) 2006-2013 Jean-Philippe Lang 10 | // Copyright (C) 2010-2013 the ChiliProject Team 11 | // Copyright (C) 2012-2021 the OpenProject GmbH 12 | // 13 | // This program is free software; you can redistribute it and/or 14 | // modify it under the terms of the GNU General Public License 15 | // as published by the Free Software Foundation; either version 2 16 | // of the License, or (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program; if not, write to the Free Software 25 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | // 27 | // See docs/COPYRIGHT.rdoc for more details. 28 | //++ 29 | 30 | import { Component, Input } from '@angular/core'; 31 | import { PathHelperService } from 'core-app/core/path-helper/path-helper.service'; 32 | import { I18nService } from 'core-app/core/i18n/i18n.service'; 33 | import {IGitlabIssueResource} from 'core-app/features/plugins/linked/openproject-gitlab_integration/typings'; 34 | 35 | @Component({ 36 | selector: 'gitlab-issue', 37 | templateUrl: './issue.component.html', 38 | styleUrls: [ 39 | './issue.component.sass', 40 | ], 41 | host: { class: 'op-issue' } 42 | }) 43 | 44 | export class IssueComponent { 45 | @Input() public gitlabIssue:IGitlabIssueResource; 46 | 47 | public text = { 48 | label_created_by: this.I18n.t('js.label_created_by'), 49 | label_last_updated_on: this.I18n.t('js.gitlab_integration.updated_on'), 50 | label_details: this.I18n.t('js.label_details'), 51 | }; 52 | 53 | constructor(readonly PathHelper:PathHelperService, 54 | readonly I18n:I18nService) { 55 | } 56 | 57 | get state() { 58 | 59 | if (this.gitlabIssue.state === 'opened') { 60 | return ('open'); 61 | } else { 62 | return('closed'); 63 | } 64 | } 65 | 66 | toggleLabels(identifier: string) { 67 | const labelsElement = document.querySelector(`.op-issue--labels-${identifier}`) as HTMLElement; 68 | 69 | // Check the current display property and toggle it 70 | labelsElement.style.display = labelsElement.style.display === 'none' ? 'block' : 'none'; 71 | } 72 | } 73 | -------------------------------------------------------------------------------- /frontend/module/merge-request/merge-request.component.html: -------------------------------------------------------------------------------- 1 |
5 | 6 | 7 | 8 | {{state}} | 9 | 15 | 16 | 17 | 20 | 21 | 23 | 24 | {{ mergeRequest.pipelines[0].status }} 25 | 26 | 27 |
28 | {{ text.label_created_by }} 29 | 35 | 36 | . 42 | 43 | 44 | {{ text.label_last_updated_on }} 45 | 46 | . 47 |
48 | 49 | 58 | -------------------------------------------------------------------------------- /frontend/module/merge-request/merge-request.component.ts: -------------------------------------------------------------------------------- 1 | //-- copyright 2 | // OpenProject is an open source project management software. 3 | // Copyright (C) 2023 Ben Tey 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License version 3. 7 | // 8 | // OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | // Copyright (C) 2006-2013 Jean-Philippe Lang 10 | // Copyright (C) 2010-2013 the ChiliProject Team 11 | // Copyright (C) 2012-2021 the OpenProject GmbH 12 | // 13 | // This program is free software; you can redistribute it and/or 14 | // modify it under the terms of the GNU General Public License 15 | // as published by the Free Software Foundation; either version 2 16 | // of the License, or (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program; if not, write to the Free Software 25 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | // 27 | // See docs/COPYRIGHT.rdoc for more details. 28 | //++ 29 | 30 | import { Component, Input } from '@angular/core'; 31 | import { PathHelperService } from 'core-app/core/path-helper/path-helper.service'; 32 | import { I18nService } from 'core-app/core/i18n/i18n.service'; 33 | import {IGitlabMergeRequestResource} from 'core-app/features/plugins/linked/openproject-gitlab_integration/typings'; 34 | 35 | @Component({ 36 | selector: 'gitlab-merge-request', 37 | templateUrl: './merge-request.component.html', 38 | styleUrls: [ 39 | './merge-request.component.sass', 40 | './mr-pipeline.component.sass', 41 | ], 42 | host: { class: 'op-merge-request' } 43 | }) 44 | 45 | export class MergeRequestComponent { 46 | @Input() public mergeRequest:IGitlabMergeRequestResource; 47 | 48 | public text = { 49 | label_created_by: this.I18n.t('js.label_created_by'), 50 | label_last_updated_on: this.I18n.t('js.gitlab_integration.updated_on'), 51 | label_details: this.I18n.t('js.label_details'), 52 | label_pipelines: this.I18n.t('js.gitlab_integration.gitlab_pipelines'), 53 | }; 54 | 55 | constructor(readonly PathHelper:PathHelperService, 56 | readonly I18n:I18nService) { 57 | } 58 | 59 | get state() { 60 | 61 | if (this.mergeRequest.state === 'opened') { 62 | return (this.mergeRequest.draft ? 'open' : 'ready'); 63 | } else { 64 | return(this.mergeRequest.merged ? 'merged' : 'closed'); 65 | } 66 | } 67 | 68 | toggleLabels(identifier: string) { 69 | const labelsElement = document.querySelector(`.op-merge-request--labels-${identifier}`) as HTMLElement; 70 | 71 | // Check the current display property and toggle it 72 | labelsElement.style.display = labelsElement.style.display === 'none' ? 'block' : 'none'; 73 | } 74 | 75 | } 76 | -------------------------------------------------------------------------------- /frontend/module/merge-request/mr-pipeline.component.sass: -------------------------------------------------------------------------------- 1 | //-- copyright 2 | // OpenProject is an open source project management software. 3 | // Copyright (C) 2023 Ben Tey 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License version 3. 7 | // 8 | // OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | // Copyright (C) 2006-2013 Jean-Philippe Lang 10 | // Copyright (C) 2010-2013 the ChiliProject Team 11 | // Copyright (C) 2012-2021 the OpenProject GmbH 12 | // 13 | // This program is free software; you can redistribute it and/or 14 | // modify it under the terms of the GNU General Public License 15 | // as published by the Free Software Foundation; either version 2 16 | // of the License, or (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program; if not, write to the Free Software 25 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | // 27 | // See docs/COPYRIGHT.rdoc for more details. 28 | //++ 29 | .op-mr-pipeline 30 | display: grid 31 | grid-row: span 4 32 | grid-template-columns: 28px 1fr auto // auto 33 | grid-template-areas: "pipeline-state-icon pipeline-info pipeline-avatar" // pipeline-details" 34 | list-style-type: none 35 | border: 1px solid #e4e4e4 36 | padding: 0.3rem 1rem 37 | // background: rgba(0, 0, 0, 0.05) 38 | font-size: 0.84rem 39 | 40 | &:first-child 41 | border-top-right-radius: 5px 42 | border-top-left-radius: 5px 43 | 44 | &:last-child 45 | border-bottom-right-radius: 5px 46 | border-bottom-left-radius: 5px 47 | 48 | &--avatar img 49 | grid-area: pipeline-avatar 50 | display: inline-block 51 | width: 22px 52 | height: 22px 53 | margin-right: 5px 54 | border-radius: var(--user-avatar-border-radius) 55 | 56 | &--info 57 | grid-area: pipeline-info 58 | 59 | &--state 60 | color: var(--gray-dark) 61 | font-style: italic 62 | margin-left: 1em 63 | 64 | &--state-icon 65 | grid-area: pipeline-state-icon 66 | 67 | &_queued 68 | color: cadetblue 69 | 70 | &_running 71 | color: orange 72 | 73 | &_success 74 | color: green 75 | 76 | &_failed, 77 | &_timed_out, 78 | &_action_required, 79 | &_stale 80 | color: red 81 | 82 | &_skipped, 83 | &_neutral, 84 | &_cancelled 85 | color: gray 86 | color: gray 87 | color: gray 88 | 89 | &--details 90 | grid-area: pipeline-details 91 | -------------------------------------------------------------------------------- /frontend/module/tab-header-issue/styles/tab-header-issue.sass: -------------------------------------------------------------------------------- 1 | //-- copyright 2 | // OpenProject is an open source project management software. 3 | // Copyright (C) 2023 Ben Tey 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License version 3. 7 | // 8 | // OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | // Copyright (C) 2006-2013 Jean-Philippe Lang 10 | // Copyright (C) 2010-2013 the ChiliProject Team 11 | // Copyright (C) 2012-2021 the OpenProject GmbH 12 | // 13 | // This program is free software; you can redistribute it and/or 14 | // modify it under the terms of the GNU General Public License 15 | // as published by the Free Software Foundation; either version 2 16 | // of the License, or (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program; if not, write to the Free Software 25 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | // 27 | // See docs/COPYRIGHT.rdoc for more details. 28 | //++ 29 | 30 | .gitlab-issue-header 31 | display: flex 32 | flex-wrap: wrap-reverse 33 | justify-content: flex-end 34 | 35 | border-bottom: 1px solid #ddd 36 | background-color: var(--body-background) 37 | 38 | .title 39 | flex: 1 1 auto 40 | border-bottom: 0 41 | margin: 0 42 | padding: 0 0 0 4px 43 | font-weight: bold 44 | font-size: 1rem 45 | line-height: 32px 46 | text-transform: uppercase 47 | 48 | .s16x32 49 | width: 16px 50 | height: 32px 51 | -------------------------------------------------------------------------------- /frontend/module/tab-header-issue/tab-header-issue.component.ts: -------------------------------------------------------------------------------- 1 | //-- copyright 2 | // OpenProject is an open source project management software. 3 | // Copyright (C) 2023 Ben Tey 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License version 3. 7 | // 8 | // OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | // Copyright (C) 2006-2013 Jean-Philippe Lang 10 | // Copyright (C) 2010-2013 the ChiliProject Team 11 | // Copyright (C) 2012-2021 the OpenProject GmbH 12 | // 13 | // This program is free software; you can redistribute it and/or 14 | // modify it under the terms of the GNU General Public License 15 | // as published by the Free Software Foundation; either version 2 16 | // of the License, or (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program; if not, write to the Free Software 25 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | // 27 | // See docs/COPYRIGHT.rdoc for more details. 28 | //++ 29 | 30 | import { Component, Input } from '@angular/core'; 31 | import { WorkPackageResource } from "core-app/features/hal/resources/work-package-resource"; 32 | import { I18nService } from "core-app/core/i18n/i18n.service"; 33 | 34 | @Component({ 35 | selector: 'tab-header-issue', 36 | templateUrl: './tab-header-issue.template.html', 37 | styleUrls: [ 38 | './styles/tab-header-issue.sass' 39 | ] 40 | }) 41 | export class TabHeaderIssueComponent { 42 | @Input() public workPackage:WorkPackageResource; 43 | 44 | public text = { 45 | title: this.I18n.t('js.gitlab_integration.tab_header_issue.title'), 46 | }; 47 | 48 | constructor(readonly I18n:I18nService) { 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /frontend/module/tab-header-issue/tab-header-issue.template.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |

4 | {{text.title}} 5 |

6 |
7 | -------------------------------------------------------------------------------- /frontend/module/tab-header-mr/styles/tab-header-mr.sass: -------------------------------------------------------------------------------- 1 | //-- copyright 2 | // OpenProject is an open source project management software. 3 | // Copyright (C) 2023 Ben Tey 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License version 3. 7 | // 8 | // OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | // Copyright (C) 2006-2013 Jean-Philippe Lang 10 | // Copyright (C) 2010-2013 the ChiliProject Team 11 | // Copyright (C) 2012-2021 the OpenProject GmbH 12 | // 13 | // This program is free software; you can redistribute it and/or 14 | // modify it under the terms of the GNU General Public License 15 | // as published by the Free Software Foundation; either version 2 16 | // of the License, or (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program; if not, write to the Free Software 25 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | // 27 | // See docs/COPYRIGHT.rdoc for more details. 28 | //++ 29 | 30 | .gitlab-mr-header 31 | display: flex 32 | flex-wrap: wrap-reverse 33 | justify-content: flex-end 34 | 35 | border-bottom: 1px solid #ddd 36 | background-color: var(--body-background) 37 | 38 | .title 39 | flex: 1 1 auto 40 | border-bottom: 0 41 | margin: 0 42 | padding: 0 0 0 4px 43 | font-weight: bold 44 | font-size: 1rem 45 | line-height: 32px 46 | text-transform: uppercase 47 | align-self: baseline 48 | 49 | .s16x32 50 | width: 16px 51 | height: 32px 52 | -------------------------------------------------------------------------------- /frontend/module/tab-header-mr/tab-header-mr.component.ts: -------------------------------------------------------------------------------- 1 | //-- copyright 2 | // OpenProject is an open source project management software. 3 | // Copyright (C) 2023 Ben Tey 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License version 3. 7 | // 8 | // OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | // Copyright (C) 2006-2013 Jean-Philippe Lang 10 | // Copyright (C) 2010-2013 the ChiliProject Team 11 | // Copyright (C) 2012-2021 the OpenProject GmbH 12 | // 13 | // This program is free software; you can redistribute it and/or 14 | // modify it under the terms of the GNU General Public License 15 | // as published by the Free Software Foundation; either version 2 16 | // of the License, or (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program; if not, write to the Free Software 25 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | // 27 | // See docs/COPYRIGHT.rdoc for more details. 28 | //++ 29 | 30 | import { Component, Input } from '@angular/core'; 31 | import { WorkPackageResource } from "core-app/features/hal/resources/work-package-resource"; 32 | import { I18nService } from "core-app/core/i18n/i18n.service"; 33 | 34 | @Component({ 35 | selector: 'tab-header-mr', 36 | templateUrl: './tab-header-mr.template.html', 37 | styleUrls: [ 38 | './styles/tab-header-mr.sass' 39 | ] 40 | }) 41 | export class TabHeaderMrsComponent { 42 | @Input() public workPackage:WorkPackageResource; 43 | 44 | public text = { 45 | title: this.I18n.t('js.gitlab_integration.tab_header_mr.title'), 46 | // createPrButtonLabel: this.I18n.t('js.gitlab_integration.tab_header.create_mr.label'), 47 | // createPrButtonDescription: this.I18n.t('js.gitlab_integration.tab_header.create_mr.description'), 48 | gitMenuLabel: this.I18n.t('js.gitlab_integration.tab_header_mr.copy_menu.label'), 49 | gitMenuDescription: this.I18n.t('js.gitlab_integration.tab_header_mr.copy_menu.description'), 50 | }; 51 | 52 | constructor(readonly I18n:I18nService) { 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /frontend/module/tab-header-mr/tab-header-mr.template.html: -------------------------------------------------------------------------------- 1 |
2 | 3 |

4 | {{text.title}} 5 |

6 | 21 |
22 | -------------------------------------------------------------------------------- /frontend/module/tab-issue/tab-issue.component.ts: -------------------------------------------------------------------------------- 1 | //-- copyright 2 | // OpenProject is an open source project management software. 3 | // Copyright (C) 2023 Ben Tey 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License version 3. 7 | // 8 | // OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | // Copyright (C) 2006-2013 Jean-Philippe Lang 10 | // Copyright (C) 2010-2013 the ChiliProject Team 11 | // Copyright (C) 2012-2021 the OpenProject GmbH 12 | // 13 | // This program is free software; you can redistribute it and/or 14 | // modify it under the terms of the GNU General Public License 15 | // as published by the Free Software Foundation; either version 2 16 | // of the License, or (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program; if not, write to the Free Software 25 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | // 27 | // See docs/COPYRIGHT.rdoc for more details. 28 | //++ 29 | 30 | import { ChangeDetectorRef, Component, Input, OnInit } from '@angular/core'; 31 | import { WorkPackageResource } from "core-app/features/hal/resources/work-package-resource"; 32 | import { HalResourceService } from "core-app/features/hal/services/hal-resource.service"; 33 | import { CollectionResource } from "core-app/features/hal/resources/collection-resource"; 34 | import { I18nService } from "core-app/core/i18n/i18n.service"; 35 | import {IGitlabIssueResource} from "core-app/features/plugins/linked/openproject-gitlab_integration/typings"; 36 | import {ApiV3Service} from "core-app/core/apiv3/api-v3.service"; 37 | 38 | @Component({ 39 | selector: 'tab-issue', 40 | templateUrl: './tab-issue.template.html', 41 | host: { class: 'op-issue' } 42 | }) 43 | export class TabIssueComponent implements OnInit { 44 | @Input() public workPackage:WorkPackageResource; 45 | 46 | public gitlabIssues:IGitlabIssueResource[] = []; 47 | 48 | constructor( 49 | readonly I18n:I18nService, 50 | readonly apiV3Service:ApiV3Service, 51 | readonly halResourceService:HalResourceService, 52 | readonly changeDetector:ChangeDetectorRef, 53 | ) {} 54 | 55 | ngOnInit(): void { 56 | const basePath = this.apiV3Service.work_packages.id(this.workPackage.id as string).path; 57 | const gitlabIssuePath = `${basePath}/gitlab_issues`; 58 | 59 | this.halResourceService 60 | .get>(gitlabIssuePath) 61 | .subscribe((value) => { 62 | this.gitlabIssues = value.elements; 63 | this.changeDetector.detectChanges(); 64 | }); 65 | } 66 | 67 | public getEmptyText() { 68 | return this.I18n.t('js.gitlab_integration.tab_issue.empty',{ wp_id: this.workPackage.id }); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /frontend/module/tab-issue/tab-issue.template.html: -------------------------------------------------------------------------------- 1 | 2 |

3 |
4 | 5 | 6 | -------------------------------------------------------------------------------- /frontend/module/tab-issue/wp-gitlab-issue.service.ts: -------------------------------------------------------------------------------- 1 | //-- copyright 2 | // OpenProject is an open source project management software. 3 | // Copyright (C) 2023 Ben Tey 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License version 3. 7 | // 8 | // OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | // Copyright (C) 2006-2013 Jean-Philippe Lang 10 | // Copyright (C) 2010-2013 the ChiliProject Team 11 | // Copyright (C) 2012-2021 the OpenProject GmbH 12 | // 13 | // This program is free software; you can redistribute it and/or 14 | // modify it under the terms of the GNU General Public License 15 | // as published by the Free Software Foundation; either version 2 16 | // of the License, or (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program; if not, write to the Free Software 25 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | // 27 | // See docs/COPYRIGHT.rdoc for more details. 28 | //++ 29 | 30 | import { WorkPackageResource } from "core-app/features/hal/resources/work-package-resource"; 31 | import { HalResource } from "core-app/features/hal/resources/hal-resource"; 32 | import { Injectable } from '@angular/core'; 33 | import { ConfigurationService } from "core-app/core/config/configuration.service"; 34 | import { WorkPackageLinkedResourceCache } from 'core-app/features/work-packages/components/wp-single-view-tabs/wp-linked-resource-cache.service'; 35 | 36 | @Injectable() 37 | export class WorkPackagesGitlabIssueService extends WorkPackageLinkedResourceCache { 38 | 39 | constructor(public ConfigurationService:ConfigurationService) { 40 | super(); 41 | } 42 | 43 | protected load(workPackage:WorkPackageResource):Promise { 44 | return workPackage.gitlab_issues.$update().then((data:any) => { 45 | return this.sortList(data.elements); 46 | }); 47 | } 48 | 49 | protected sortList(gitlabIssue:HalResource[], attr = 'createdAt'):HalResource[] { 50 | return _.sortBy(_.flatten(gitlabIssue), attr); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /frontend/module/tab-mrs/tab-mrs.component.ts: -------------------------------------------------------------------------------- 1 | //-- copyright 2 | // OpenProject is an open source project management software. 3 | // Copyright (C) 2023 Ben Tey 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License version 3. 7 | // 8 | // OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | // Copyright (C) 2006-2013 Jean-Philippe Lang 10 | // Copyright (C) 2010-2013 the ChiliProject Team 11 | // Copyright (C) 2012-2021 the OpenProject GmbH 12 | // 13 | // This program is free software; you can redistribute it and/or 14 | // modify it under the terms of the GNU General Public License 15 | // as published by the Free Software Foundation; either version 2 16 | // of the License, or (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program; if not, write to the Free Software 25 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | // 27 | // See docs/COPYRIGHT.rdoc for more details. 28 | //++ 29 | 30 | import { ChangeDetectorRef, Component, Input, OnInit } from '@angular/core'; 31 | import { WorkPackageResource } from "core-app/features/hal/resources/work-package-resource"; 32 | import { HalResourceService } from "core-app/features/hal/services/hal-resource.service"; 33 | import { CollectionResource } from "core-app/features/hal/resources/collection-resource"; 34 | import { I18nService } from "core-app/core/i18n/i18n.service"; 35 | import {IGitlabMergeRequestResource} from "core-app/features/plugins/linked/openproject-gitlab_integration/typings"; 36 | import {ApiV3Service} from "core-app/core/apiv3/api-v3.service"; 37 | 38 | @Component({ 39 | selector: 'tab-mrs', 40 | templateUrl: './tab-mrs.template.html', 41 | host: { class: 'op-mrs' } 42 | }) 43 | export class TabMrsComponent implements OnInit { 44 | @Input() public workPackage:WorkPackageResource; 45 | 46 | public mergeRequests:IGitlabMergeRequestResource[] = []; 47 | 48 | constructor( 49 | readonly I18n:I18nService, 50 | readonly apiV3Service:ApiV3Service, 51 | readonly halResourceService:HalResourceService, 52 | readonly changeDetector:ChangeDetectorRef, 53 | ) {} 54 | 55 | ngOnInit(): void { 56 | const basePath = this.apiV3Service.work_packages.id(this.workPackage.id as string).path; 57 | const mergeRequestsPath = `${basePath}/gitlab_merge_requests`; 58 | 59 | this.halResourceService 60 | .get>(mergeRequestsPath) 61 | .subscribe((value) => { 62 | this.mergeRequests = value.elements; 63 | this.changeDetector.detectChanges(); 64 | }); 65 | } 66 | 67 | public getEmptyText() { 68 | return this.I18n.t('js.gitlab_integration.tab_mrs.empty',{ wp_id: this.workPackage.id }); 69 | } 70 | } 71 | -------------------------------------------------------------------------------- /frontend/module/tab-mrs/tab-mrs.template.html: -------------------------------------------------------------------------------- 1 | 2 |

3 |
4 | 5 | 6 | -------------------------------------------------------------------------------- /frontend/module/tab-mrs/wp-gitlab-mrs.service.ts: -------------------------------------------------------------------------------- 1 | //-- copyright 2 | // OpenProject is an open source project management software. 3 | // Copyright (C) 2023 Ben Tey 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License version 3. 7 | // 8 | // OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | // Copyright (C) 2006-2013 Jean-Philippe Lang 10 | // Copyright (C) 2010-2013 the ChiliProject Team 11 | // Copyright (C) 2012-2021 the OpenProject GmbH 12 | // 13 | // This program is free software; you can redistribute it and/or 14 | // modify it under the terms of the GNU General Public License 15 | // as published by the Free Software Foundation; either version 2 16 | // of the License, or (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program; if not, write to the Free Software 25 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | // 27 | // See docs/COPYRIGHT.rdoc for more details. 28 | //++ 29 | 30 | import { WorkPackageResource } from "core-app/features/hal/resources/work-package-resource"; 31 | import { HalResource } from "core-app/features/hal/resources/hal-resource"; 32 | import { Injectable } from '@angular/core'; 33 | import { ConfigurationService } from "core-app/core/config/configuration.service"; 34 | import { WorkPackageLinkedResourceCache } from 'core-app/features/work-packages/components/wp-single-view-tabs/wp-linked-resource-cache.service'; 35 | 36 | @Injectable() 37 | export class WorkPackagesGitlabMrsService extends WorkPackageLinkedResourceCache { 38 | 39 | constructor(public ConfigurationService:ConfigurationService) { 40 | super(); 41 | } 42 | 43 | protected load(workPackage:WorkPackageResource):Promise { 44 | return workPackage.gitlab_merge_requests.$update().then((data:any) => { 45 | return this.sortList(data.elements); 46 | }); 47 | } 48 | 49 | protected sortList(mergeRequests:HalResource[], attr = 'createdAt'):HalResource[] { 50 | return _.sortBy(_.flatten(mergeRequests), attr); 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /frontend/module/typings.d.ts: -------------------------------------------------------------------------------- 1 | //-- copyright 2 | // OpenProject is an open source project management software. 3 | // Copyright (C) 2023 Ben Tey 4 | // 5 | // This program is free software; you can redistribute it and/or 6 | // modify it under the terms of the GNU General Public License version 3. 7 | // 8 | // OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | // Copyright (C) 2006-2013 Jean-Philippe Lang 10 | // Copyright (C) 2010-2013 the ChiliProject Team 11 | // Copyright (C) 2012-2021 the OpenProject GmbH 12 | // 13 | // This program is free software; you can redistribute it and/or 14 | // modify it under the terms of the GNU General Public License 15 | // as published by the Free Software Foundation; either version 2 16 | // of the License, or (at your option) any later version. 17 | // 18 | // This program is distributed in the hope that it will be useful, 19 | // but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | // GNU General Public License for more details. 22 | // 23 | // You should have received a copy of the GNU General Public License 24 | // along with this program; if not, write to the Free Software 25 | // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | // 27 | // See docs/COPYRIGHT.rdoc for more details. 28 | //++ 29 | 30 | import { HalResourceClass } from 'core-app/modules/hal/resources/hal-resource'; 31 | 32 | 33 | export interface ISnippet { 34 | id:string; 35 | name:string; 36 | textToCopy:()=>string 37 | } 38 | 39 | export interface IGitlabIssueResource extends HalResourceClass { 40 | body?:{ 41 | format?:string; 42 | raw?:string; 43 | html?:string; 44 | }, 45 | createdAt?:string; 46 | gitlabUpdatedAt?:string; 47 | htmlUrl?:string; 48 | id?:number; 49 | labels?:string[]; 50 | number?:number; 51 | repository?:string; 52 | state?:string; 53 | title?:string; 54 | updatedAt?:string; 55 | gitlabUser?:IGitlabUserResource; 56 | } 57 | 58 | export interface IGitlabMergeRequestResource extends HalResourceClass { 59 | body?:{ 60 | format?:string; 61 | raw?:string; 62 | html?:string; 63 | }, 64 | createdAt?:string; 65 | draft?:boolean; 66 | gitlabUpdatedAt?:string; 67 | htmlUrl?:string; 68 | id?:number; 69 | labels?:string[]; 70 | merged?:boolean; 71 | mergedAt?:string; 72 | mergedBy?:IGitlabUserResource; 73 | number?:number; 74 | repository?:string; 75 | state?:string; 76 | title?:string; 77 | updatedAt?:string; 78 | gitlabUser?:IGitlabUserResource; 79 | pipelines?:IGitlabPipelineResource[]; 80 | } 81 | 82 | export interface IGitlabUserResource { 83 | avatarUrl:string; 84 | email:string; 85 | login:string; 86 | } 87 | 88 | export interface IGitlabPipelineResource { 89 | userAvatarUrl:string; 90 | completedAt:string; 91 | detailsUrl:string; 92 | htmlUrl:string; 93 | name:string; 94 | startedAt:string; 95 | status:string; 96 | ci_details:string[]; 97 | username:string; 98 | commitId:string; 99 | } -------------------------------------------------------------------------------- /lib/api/v3/gitlab_issues/gitlab_issue_collection_representer.rb: -------------------------------------------------------------------------------- 1 | #-- encoding: UTF-8 2 | 3 | #-- copyright 4 | # OpenProject is an open source project management software. 5 | # Copyright (C) 2023 Ben Tey 6 | # 7 | # This program is free software; you can redistribute it and/or 8 | # modify it under the terms of the GNU General Public License version 3. 9 | # 10 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 11 | # Copyright (C) 2006-2013 Jean-Philippe Lang 12 | # Copyright (C) 2010-2013 the ChiliProject Team 13 | # Copyright (C) 2012-2021 the OpenProject GmbH 14 | # 15 | # This program is free software; you can redistribute it and/or 16 | # modify it under the terms of the GNU General Public License 17 | # as published by the Free Software Foundation; either version 2 18 | # of the License, or (at your option) any later version. 19 | # 20 | # This program is distributed in the hope that it will be useful, 21 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 22 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 23 | # GNU General Public License for more details. 24 | # 25 | # You should have received a copy of the GNU General Public License 26 | # along with this program; if not, write to the Free Software 27 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 28 | # 29 | # See docs/COPYRIGHT.rdoc for more details. 30 | #++ 31 | 32 | module API 33 | module V3 34 | module GitlabIssues 35 | class GitlabIssueCollectionRepresenter < ::API::Decorators::Collection 36 | self.to_eager_load = ::API::V3::GitlabIssues::GitlabIssueRepresenter.to_eager_load 37 | end 38 | end 39 | end 40 | end 41 | -------------------------------------------------------------------------------- /lib/api/v3/gitlab_issues/gitlab_issue_representer.rb: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | 30 | require 'roar/decorator' 31 | require 'roar/json/hal' 32 | 33 | module API 34 | module V3 35 | module GitlabIssues 36 | class GitlabIssueRepresenter < ::API::Decorators::Single 37 | include API::Caching::CachedRepresenter 38 | include API::Decorators::DateProperty 39 | include API::Decorators::FormattableProperty 40 | include API::Decorators::LinkedResource 41 | 42 | def initialize(model, current_user:, **_opts) 43 | # We force `embed_links` so that github_user and github_check_runs 44 | # are embedded and we can avoid having separate endpoints. 45 | super(model, current_user: current_user, embed_links: true) 46 | end 47 | 48 | cached_representer key_parts: %i[gitlab_user] 49 | 50 | property :id 51 | 52 | property :number 53 | 54 | property :gitlab_html_url, as: :htmlUrl 55 | 56 | property :state, 57 | render_nil: true 58 | 59 | property :repository, 60 | render_nil: true 61 | 62 | date_time_property :gitlab_updated_at, 63 | render_nil: true, 64 | setter: ->(*) { nil } 65 | 66 | property :title, 67 | render_nil: true 68 | 69 | formattable_property :body, 70 | render_nil: true 71 | 72 | property :labels 73 | 74 | associated_resource :gitlab_user, 75 | representer: ::API::V3::GitlabIssues::GitlabUserRepresenter, 76 | link_title_attribute: :gitlab_name 77 | 78 | date_time_property :created_at 79 | 80 | date_time_property :updated_at 81 | 82 | def _type 83 | 'GitlabIssue' 84 | end 85 | 86 | self.to_eager_load = %i[gitlab_user] 87 | end 88 | end 89 | end 90 | end 91 | -------------------------------------------------------------------------------- /lib/api/v3/gitlab_issues/gitlab_issues_by_work_package_api.rb: -------------------------------------------------------------------------------- 1 | #-- encoding: UTF-8 2 | 3 | #-- copyright 4 | # OpenProject is an open source project management software. 5 | # Copyright (C) 2023 Ben Tey 6 | # 7 | # This program is free software; you can redistribute it and/or 8 | # modify it under the terms of the GNU General Public License version 3. 9 | # 10 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 11 | # Copyright (C) 2006-2013 Jean-Philippe Lang 12 | # Copyright (C) 2010-2013 the ChiliProject Team 13 | # Copyright (C) 2012-2021 the OpenProject GmbH 14 | # 15 | # This program is free software; you can redistribute it and/or 16 | # modify it under the terms of the GNU General Public License 17 | # as published by the Free Software Foundation; either version 2 18 | # of the License, or (at your option) any later version. 19 | # 20 | # This program is distributed in the hope that it will be useful, 21 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 22 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 23 | # GNU General Public License for more details. 24 | # 25 | # You should have received a copy of the GNU General Public License 26 | # along with this program; if not, write to the Free Software 27 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 28 | # 29 | # See docs/COPYRIGHT.rdoc for more details. 30 | #++ 31 | 32 | module API 33 | module V3 34 | module GitlabIssues 35 | class GitlabIssuesByWorkPackageAPI < ::API::OpenProjectAPI 36 | after_validation do 37 | authorize_in_work_package(:show_gitlab_content, work_package: @work_package) 38 | @gitlab_issues = @work_package.gitlab_issues 39 | end 40 | 41 | resources :gitlab_issues do 42 | get do 43 | path = api_v3_paths.gitlab_issues_by_work_package(@work_package.id) 44 | GitlabIssueCollectionRepresenter.new(@gitlab_issues, 45 | @gitlab_issues.count, 46 | self_link: path, 47 | current_user:) 48 | end 49 | end 50 | end 51 | end 52 | end 53 | end 54 | -------------------------------------------------------------------------------- /lib/api/v3/gitlab_issues/gitlab_user_representer.rb: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | 30 | require 'roar/decorator' 31 | require 'roar/json/hal' 32 | 33 | module API 34 | module V3 35 | module GitlabIssues 36 | class GitlabUserRepresenter < ::API::Decorators::Single 37 | include API::Caching::CachedRepresenter 38 | 39 | self_link id_attribute: :id, 40 | title_getter: ->(*) { nil } 41 | 42 | property :gitlab_name, as: :login 43 | property :gitlab_email, as: :email 44 | property :gitlab_avatar_url, as: :avatarUrl 45 | 46 | def _type 47 | 'GitlabUser' 48 | end 49 | end 50 | end 51 | end 52 | end 53 | -------------------------------------------------------------------------------- /lib/api/v3/gitlab_merge_requests/gitlab_merge_request_collection_representer.rb: -------------------------------------------------------------------------------- 1 | #-- encoding: UTF-8 2 | 3 | #-- copyright 4 | # OpenProject is an open source project management software. 5 | # Copyright (C) 2023 Ben Tey 6 | # 7 | # This program is free software; you can redistribute it and/or 8 | # modify it under the terms of the GNU General Public License version 3. 9 | # 10 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 11 | # Copyright (C) 2006-2013 Jean-Philippe Lang 12 | # Copyright (C) 2010-2013 the ChiliProject Team 13 | # Copyright (C) 2012-2021 the OpenProject GmbH 14 | # 15 | # This program is free software; you can redistribute it and/or 16 | # modify it under the terms of the GNU General Public License 17 | # as published by the Free Software Foundation; either version 2 18 | # of the License, or (at your option) any later version. 19 | # 20 | # This program is distributed in the hope that it will be useful, 21 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 22 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 23 | # GNU General Public License for more details. 24 | # 25 | # You should have received a copy of the GNU General Public License 26 | # along with this program; if not, write to the Free Software 27 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 28 | # 29 | # See docs/COPYRIGHT.rdoc for more details. 30 | #++ 31 | 32 | module API 33 | module V3 34 | module GitlabMergeRequests 35 | class GitlabMergeRequestCollectionRepresenter < ::API::Decorators::Collection 36 | self.to_eager_load = ::API::V3::GitlabMergeRequests::GitlabMergeRequestRepresenter.to_eager_load 37 | end 38 | end 39 | end 40 | end 41 | -------------------------------------------------------------------------------- /lib/api/v3/gitlab_merge_requests/gitlab_merge_requests_by_work_package_api.rb: -------------------------------------------------------------------------------- 1 | #-- encoding: UTF-8 2 | 3 | #-- copyright 4 | # OpenProject is an open source project management software. 5 | # Copyright (C) 2023 Ben Tey 6 | # 7 | # This program is free software; you can redistribute it and/or 8 | # modify it under the terms of the GNU General Public License version 3. 9 | # 10 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 11 | # Copyright (C) 2006-2013 Jean-Philippe Lang 12 | # Copyright (C) 2010-2013 the ChiliProject Team 13 | # Copyright (C) 2012-2021 the OpenProject GmbH 14 | # 15 | # This program is free software; you can redistribute it and/or 16 | # modify it under the terms of the GNU General Public License 17 | # as published by the Free Software Foundation; either version 2 18 | # of the License, or (at your option) any later version. 19 | # 20 | # This program is distributed in the hope that it will be useful, 21 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 22 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 23 | # GNU General Public License for more details. 24 | # 25 | # You should have received a copy of the GNU General Public License 26 | # along with this program; if not, write to the Free Software 27 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 28 | # 29 | # See docs/COPYRIGHT.rdoc for more details. 30 | #++ 31 | 32 | module API 33 | module V3 34 | module GitlabMergeRequests 35 | class GitlabMergeRequestsByWorkPackageAPI < ::API::OpenProjectAPI 36 | after_validation do 37 | authorize_in_work_package(:show_gitlab_content, work_package: @work_package) 38 | @gitlab_merge_requests = @work_package.gitlab_merge_requests 39 | end 40 | 41 | resources :gitlab_merge_requests do 42 | get do 43 | path = api_v3_paths.gitlab_merge_requests_by_work_package(@work_package.id) 44 | GitlabMergeRequestCollectionRepresenter.new(@gitlab_merge_requests, 45 | @gitlab_merge_requests.count, 46 | self_link: path, 47 | current_user:) 48 | end 49 | end 50 | end 51 | end 52 | end 53 | end 54 | -------------------------------------------------------------------------------- /lib/api/v3/gitlab_merge_requests/gitlab_pipeline_representer.rb: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | 30 | require 'roar/decorator' 31 | require 'roar/json/hal' 32 | 33 | module API 34 | module V3 35 | module GitlabMergeRequests 36 | class GitlabPipelineRepresenter < ::API::Decorators::Single 37 | include API::Caching::CachedRepresenter 38 | include API::Decorators::DateProperty 39 | 40 | self_link id_attribute: :id, 41 | title_getter: ->(*) { nil } 42 | 43 | property :gitlab_html_url, as: :htmlUrl 44 | property :gitlab_user_avatar_url, as: :userAvatarUrl 45 | property :name 46 | property :status 47 | property :details_url 48 | property :ci_details 49 | property :username 50 | property :commit_id, as: :commitId 51 | 52 | date_time_property :started_at 53 | date_time_property :completed_at 54 | 55 | def _type 56 | 'GitlabPipeline' 57 | end 58 | end 59 | end 60 | end 61 | end 62 | -------------------------------------------------------------------------------- /lib/api/v3/gitlab_merge_requests/gitlab_user_representer.rb: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | 30 | require 'roar/decorator' 31 | require 'roar/json/hal' 32 | 33 | module API 34 | module V3 35 | module GitlabMergeRequests 36 | class GitlabUserRepresenter < ::API::Decorators::Single 37 | include API::Caching::CachedRepresenter 38 | 39 | self_link id_attribute: :id, 40 | title_getter: ->(*) { nil } 41 | 42 | property :gitlab_name, as: :login 43 | property :gitlab_email, as: :email 44 | property :gitlab_avatar_url, as: :avatarUrl 45 | 46 | def _type 47 | 'GitlabUser' 48 | end 49 | end 50 | end 51 | end 52 | end 53 | -------------------------------------------------------------------------------- /lib/open_project/gitlab_integration.rb: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | 30 | module OpenProject 31 | module GitlabIntegration 32 | require "open_project/gitlab_integration/engine" 33 | end 34 | end 35 | -------------------------------------------------------------------------------- /lib/open_project/gitlab_integration/hook_handler.rb: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | 30 | module OpenProject::GitlabIntegration 31 | class HookHandler 32 | # List of the gitlab events we can handle. 33 | KNOWN_EVENTS = %w[ 34 | push_hook 35 | issue_hook 36 | note_hook 37 | merge_request_hook 38 | pipeline_hook 39 | system_hook 40 | ].freeze 41 | 42 | # A gitlab webhook happened. 43 | # We need to check validity of the data and send a Notification 44 | # which we process in our NotificationHandler. 45 | def process(hook, request, params, user) 46 | event_type = request.env['HTTP_X_GITLAB_EVENT'] 47 | event_type.gsub!(' ','_') 48 | event_type = event_type.to_s.downcase 49 | 50 | Rails.logger.debug "Received gitlab webhook #{event_type}" 51 | 52 | return 404 unless KNOWN_EVENTS.include?(event_type) 53 | return 403 unless user.present? 54 | 55 | payload = params[:payload] 56 | .permit! 57 | .to_h 58 | .merge('open_project_user_id' => user.id, 59 | 'gitlab_event' => event_type) 60 | 61 | OpenProject::Notifications.send("gitlab.#{event_type}", payload) 62 | 63 | return 200 64 | end 65 | end 66 | end 67 | -------------------------------------------------------------------------------- /lib/open_project/gitlab_integration/notification_handler/issue_hook.rb: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | 30 | module OpenProject::GitlabIntegration 31 | module NotificationHandler 32 | ## 33 | # Handles Gitlab issue notifications. 34 | class IssueHook 35 | include OpenProject::GitlabIntegration::NotificationHandler::Helper 36 | 37 | def process(payload_params) 38 | @payload = wrap_payload(payload_params) 39 | user = User.find_by_id(payload.open_project_user_id) 40 | text = payload.object_attributes.title + ' - ' + payload.object_attributes.description 41 | work_packages = find_mentioned_work_packages(text, user) 42 | notes = generate_notes(payload) 43 | comment_on_referenced_work_packages(work_packages, user, notes) 44 | upsert_issue(work_packages) 45 | end 46 | 47 | private 48 | 49 | attr_reader :payload 50 | 51 | def generate_notes(payload) 52 | accepted_actions = %w[open reopen close] 53 | 54 | key_action = { 55 | 'open' => 'opened', 56 | 'reopen' => 'reopened', 57 | 'close' => 'closed' 58 | }[payload.object_attributes.action] 59 | 60 | return nil unless accepted_actions.include? payload.object_attributes.action 61 | I18n.t("gitlab_integration.issue_#{key_action}_referenced_comment", 62 | :issue_number => payload.object_attributes.iid, 63 | :issue_title => payload.object_attributes.title, 64 | :issue_url => payload.object_attributes.url, 65 | :repository => payload.repository.name, 66 | :repository_url => payload.repository.homepage, 67 | :gitlab_user => payload.user.name, 68 | :gitlab_user_url => payload.user.avatar_url) 69 | end 70 | 71 | def gitlab_issue 72 | @gitlab_issue ||= GitlabIssue 73 | .where(gitlab_id: payload.object_attributes.iid) 74 | .or(GitlabIssue.where(gitlab_html_url: payload.object_attributes.url)) 75 | .take 76 | end 77 | 78 | def upsert_issue(work_packages) 79 | return if work_packages.empty? && gitlab_issue.nil? 80 | OpenProject::GitlabIntegration::Services::UpsertIssue.new.call(payload, 81 | work_packages: work_packages) 82 | end 83 | end 84 | end 85 | end -------------------------------------------------------------------------------- /lib/open_project/gitlab_integration/notification_handler/pipeline_hook.rb: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | 30 | module OpenProject::GitlabIntegration 31 | module NotificationHandler 32 | ## 33 | # Handles Gitlab pipeline notifications. 34 | class PipelineHook 35 | include OpenProject::GitlabIntegration::NotificationHandler::Helper 36 | 37 | def process(payload_params) 38 | @payload = wrap_payload(payload_params) 39 | 40 | return if payload.merge_request.blank? 41 | 42 | merge_request = find_merge_request 43 | return unless merge_request 44 | return unless associated_with_mr? 45 | 46 | # disabled until gitlab issue resolution 47 | OpenProject::GitlabIntegration::Services::UpsertPipeline.new.call( 48 | payload, 49 | merge_request: 50 | ) 51 | end 52 | 53 | private 54 | 55 | attr_reader :payload 56 | 57 | def associated_with_mr? 58 | payload.merge_request.iid.present? 59 | end 60 | 61 | def find_merge_request 62 | gitlab_id = payload.merge_request.iid 63 | GitlabMergeRequest.find_by(gitlab_id:) 64 | end 65 | end 66 | end 67 | end 68 | -------------------------------------------------------------------------------- /lib/open_project/gitlab_integration/notification_handler/push_hook.rb: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | 30 | module OpenProject::GitlabIntegration 31 | module NotificationHandler 32 | ## 33 | # Handles Gitlab commit notifications. 34 | class PushHook 35 | include OpenProject::GitlabIntegration::NotificationHandler::Helper 36 | 37 | def process(payload_params) 38 | @payload = wrap_payload(payload_params) 39 | return nil unless payload.object_kind == 'push' 40 | payload.commits.each do |commit| 41 | user = User.find_by_id(payload.open_project_user_id) 42 | text = commit['title'] + " - " + commit['message'] 43 | work_packages = find_mentioned_work_packages(text, user) 44 | notes = generate_notes(commit, payload) 45 | comment_on_referenced_work_packages(work_packages, user, notes) 46 | end 47 | end 48 | 49 | private 50 | 51 | attr_reader :payload 52 | 53 | def generate_notes(commit, payload) 54 | commit_id = commit['id'] 55 | I18n.t("gitlab_integration.push_single_commit_comment", 56 | :commit_number => commit_id[0, 8], 57 | :commit_note => commit['message'], 58 | :commit_url => commit['url'], 59 | :commit_timestamp => commit['timestamp'], 60 | :repository => payload.repository.name, 61 | :repository_url => payload.repository.homepage, 62 | :gitlab_user => payload.user_name, 63 | :gitlab_user_url => payload.user_avatar) 64 | end 65 | end 66 | end 67 | end -------------------------------------------------------------------------------- /lib/open_project/gitlab_integration/notification_handler/system_hook.rb: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | 30 | module OpenProject::GitlabIntegration 31 | module NotificationHandler 32 | ## 33 | # Handles Gitlab commit notifications. 34 | class SystemHook 35 | include OpenProject::GitlabIntegration::NotificationHandler::Helper 36 | 37 | def process(payload_params) 38 | @payload = wrap_payload(payload_params) 39 | return nil unless payload.object_kind == 'push' 40 | payload.commits.each do |commit| 41 | user = User.find_by_id(payload.open_project_user_id) 42 | text = commit['title'] + " - " + commit['message'] 43 | work_packages = find_mentioned_work_packages(text, user) 44 | notes = generate_notes(commit, payload) 45 | comment_on_referenced_work_packages(work_packages, user, notes) 46 | end 47 | end 48 | 49 | private 50 | 51 | attr_reader :payload 52 | 53 | def generate_notes(commit, payload) 54 | commit_id = commit['id'] 55 | I18n.t("gitlab_integration.push_single_commit_comment", 56 | :commit_number => commit_id[0, 8], 57 | :commit_note => commit['message'], 58 | :commit_url => commit['url'], 59 | :commit_timestamp => commit['timestamp'], 60 | :repository => payload.repository.name, 61 | :repository_url => payload.repository.homepage, 62 | :gitlab_user => payload.user_name, 63 | :gitlab_user_url => payload.user_avatar) 64 | end 65 | end 66 | end 67 | end 68 | -------------------------------------------------------------------------------- /lib/open_project/gitlab_integration/notification_handlers.rb: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | 30 | require_relative './notification_handler/helper' 31 | require_relative './notification_handler/issue_hook' 32 | require_relative './notification_handler/merge_request_hook' 33 | require_relative './notification_handler/note_hook' 34 | require_relative './notification_handler/push_hook' 35 | require_relative './notification_handler/system_hook' 36 | 37 | module OpenProject::GitlabIntegration 38 | 39 | ## 40 | # Handles gitlab-related notifications. 41 | module NotificationHandlers 42 | class << self 43 | def merge_request_hook(payload) 44 | with_logging('merge_request_hook') do 45 | OpenProject::GitlabIntegration::NotificationHandler::MergeRequestHook.new.process(payload) 46 | end 47 | end 48 | 49 | def note_hook(payload) 50 | with_logging('note_hook') do 51 | OpenProject::GitlabIntegration::NotificationHandler::NoteHook.new.process(payload) 52 | end 53 | end 54 | 55 | def push_hook(payload) 56 | with_logging('push_hook') do 57 | OpenProject::GitlabIntegration::NotificationHandler::PushHook.new.process(payload) 58 | end 59 | end 60 | 61 | def issue_hook(payload) 62 | with_logging('issue_hook') do 63 | OpenProject::GitlabIntegration::NotificationHandler::IssueHook.new.process(payload) 64 | end 65 | end 66 | 67 | def pipeline_hook(payload) 68 | with_logging('pipeline_hook') do 69 | OpenProject::GitlabIntegration::NotificationHandler::PipelineHook.new.process(payload) 70 | end 71 | end 72 | 73 | def system_hook(payload) 74 | with_logging('system_hook') do 75 | OpenProject::GitlabIntegration::NotificationHandler::SystemHook.new.process(payload) 76 | end 77 | end 78 | 79 | private 80 | 81 | def with_logging(event_hook) 82 | yield if block_given? 83 | rescue StandardError => e 84 | Rails.logger.error "Failed to handle #{event_hook} from Gitlab: #{e} #{e.message}" 85 | raise e 86 | end 87 | end 88 | end 89 | end 90 | -------------------------------------------------------------------------------- /lib/open_project/gitlab_integration/patches/api/work_package_representer.rb: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | module OpenProject::GitlabIntegration 30 | module Patches 31 | module API 32 | module WorkPackageRepresenter 33 | module_function 34 | 35 | def extension # rubocop:disable Metrics/AbcSize 36 | ->(*) do 37 | link :gitlab, 38 | cache_if: -> { current_user.allowed_in_work_package?(:show_gitlab_content, represented) } do 39 | next if represented.new_record? 40 | 41 | { 42 | href: "#{work_package_path(id: represented.id)}/tabs/gitlab", 43 | title: "gitlab" 44 | } 45 | end 46 | 47 | link :gitlab_merge_requests do 48 | next if represented.new_record? 49 | 50 | { 51 | href: api_v3_paths.gitlab_merge_requests_by_work_package(represented.id), 52 | title: "Gitlab merge requests" 53 | } 54 | end 55 | 56 | link :gitlab_issues do 57 | next if represented.new_record? 58 | 59 | { 60 | href: api_v3_paths.gitlab_issues_by_work_package(represented.id), 61 | title: "Gitlab Issues" 62 | } 63 | end 64 | end 65 | end 66 | end 67 | end 68 | end 69 | end 70 | -------------------------------------------------------------------------------- /lib/open_project/gitlab_integration/patches/work_package_patch.rb: -------------------------------------------------------------------------------- 1 | module OpenProject::GitlabIntegration 2 | module Patches 3 | module WorkPackagePatch 4 | extend ActiveSupport::Concern 5 | 6 | included do 7 | has_and_belongs_to_many :gitlab_merge_requests 8 | has_and_belongs_to_many :gitlab_issues 9 | end 10 | end 11 | end 12 | end 13 | 14 | ::WorkPackage.include OpenProject::GitlabIntegration::Patches::WorkPackagePatch 15 | -------------------------------------------------------------------------------- /lib/open_project/gitlab_integration/services.rb: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | 30 | require_relative './services/params_helper' 31 | require_relative './services/upsert_pipeline' 32 | require_relative './services/upsert_gitlab_user' 33 | require_relative './services/upsert_merge_request' 34 | -------------------------------------------------------------------------------- /lib/open_project/gitlab_integration/services/params_helper.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | #-- copyright 4 | # OpenProject is an open source project management software. 5 | # Copyright (C) 2023 Ben Tey 6 | # 7 | # This program is free software; you can redistribute it and/or 8 | # modify it under the terms of the GNU General Public License version 3. 9 | # 10 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 11 | # Copyright (C) 2006-2013 Jean-Philippe Lang 12 | # Copyright (C) 2010-2013 the ChiliProject Team 13 | # Copyright (C) 2012-2021 the OpenProject GmbH 14 | # 15 | # This program is free software; you can redistribute it and/or 16 | # modify it under the terms of the GNU General Public License 17 | # as published by the Free Software Foundation; either version 2 18 | # of the License, or (at your option) any later version. 19 | # 20 | # This program is distributed in the hope that it will be useful, 21 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 22 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 23 | # GNU General Public License for more details. 24 | # 25 | # You should have received a copy of the GNU General Public License 26 | # along with this program; if not, write to the Free Software 27 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 28 | # 29 | # See docs/COPYRIGHT.rdoc for more details. 30 | #++ 31 | module OpenProject 32 | module GitlabIntegration 33 | module Services 34 | module ParamsHelper 35 | private 36 | 37 | EMPTY_AVATAR_URL = 'https://www.gravatar.com/avatar/?d=mp' 38 | EMPTY_DESCRIPTION = 'No description provided' 39 | 40 | def avatar_url(raw_url) 41 | raw_url.presence || EMPTY_AVATAR_URL 42 | end 43 | 44 | def description(raw_description) 45 | raw_description.presence || EMPTY_DESCRIPTION 46 | end 47 | end 48 | end 49 | end 50 | end 51 | -------------------------------------------------------------------------------- /lib/open_project/gitlab_integration/services/upsert_gitlab_user.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | #-- copyright 4 | # OpenProject is an open source project management software. 5 | # Copyright (C) 2023 Ben Tey 6 | # 7 | # This program is free software; you can redistribute it and/or 8 | # modify it under the terms of the GNU General Public License version 3. 9 | # 10 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 11 | # Copyright (C) 2006-2013 Jean-Philippe Lang 12 | # Copyright (C) 2010-2013 the ChiliProject Team 13 | # Copyright (C) 2012-2021 the OpenProject GmbH 14 | # 15 | # This program is free software; you can redistribute it and/or 16 | # modify it under the terms of the GNU General Public License 17 | # as published by the Free Software Foundation; either version 2 18 | # of the License, or (at your option) any later version. 19 | # 20 | # This program is distributed in the hope that it will be useful, 21 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 22 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 23 | # GNU General Public License for more details. 24 | # 25 | # You should have received a copy of the GNU General Public License 26 | # along with this program; if not, write to the Free Software 27 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 28 | # 29 | # See docs/COPYRIGHT.rdoc for more details. 30 | #++ 31 | module OpenProject 32 | module GitlabIntegration 33 | module Services 34 | ## 35 | # Takes user data coming from Gitlab webhook data and stores 36 | # them as a `GitlabUser`. 37 | # If the `GitlabUser` already exists, it is updated. 38 | # 39 | # Returns the upserted `GitlabUser`. 40 | class UpsertGitlabUser 41 | include ParamsHelper 42 | 43 | def call(payload) 44 | GitlabUser.find_or_initialize_by(gitlab_id: payload.id) 45 | .tap do |gitlab_user| 46 | gitlab_user.update!(extract_params(payload)) 47 | end 48 | end 49 | 50 | private 51 | 52 | ## 53 | # Receives the input from the gitlab webhook and translates them 54 | # to our internal representation. 55 | def extract_params(payload) 56 | { 57 | gitlab_id: payload.id, 58 | gitlab_name: payload.name, 59 | gitlab_username: payload.username, 60 | gitlab_email: payload.email, 61 | gitlab_avatar_url: avatar_url(payload.avatar_url) 62 | } 63 | end 64 | end 65 | end 66 | end 67 | end 68 | -------------------------------------------------------------------------------- /lib/open_project/gitlab_integration/services/upsert_issue.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | #-- copyright 4 | # OpenProject is an open source project management software. 5 | # Copyright (C) 2023 Ben Tey 6 | # 7 | # This program is free software; you can redistribute it and/or 8 | # modify it under the terms of the GNU General Public License version 3. 9 | # 10 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 11 | # Copyright (C) 2006-2013 Jean-Philippe Lang 12 | # Copyright (C) 2010-2013 the ChiliProject Team 13 | # Copyright (C) 2012-2021 the OpenProject GmbH 14 | # 15 | # This program is free software; you can redistribute it and/or 16 | # modify it under the terms of the GNU General Public License 17 | # as published by the Free Software Foundation; either version 2 18 | # of the License, or (at your option) any later version. 19 | # 20 | # This program is distributed in the hope that it will be useful, 21 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 22 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 23 | # GNU General Public License for more details. 24 | # 25 | # You should have received a copy of the GNU General Public License 26 | # along with this program; if not, write to the Free Software 27 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 28 | # 29 | # See docs/COPYRIGHT.rdoc for more details. 30 | #++ 31 | module OpenProject 32 | module GitlabIntegration 33 | module Services 34 | class UpsertIssue 35 | include ParamsHelper 36 | 37 | def call(payload, work_packages: []) 38 | find_or_initialize(payload).tap do |issue| 39 | issue.update!(work_packages: issue.work_packages | work_packages, **extract_params(payload)) 40 | end 41 | end 42 | 43 | private 44 | 45 | def find_or_initialize(payload) 46 | GitlabIssue.find_by_gitlab_identifiers(id: payload.object_attributes.iid, 47 | url: payload.object_attributes.url, 48 | initialize: true) 49 | end 50 | 51 | # Receives the input from the gitlab webhook and translates them 52 | # to our internal representation. 53 | # rubocop:disable Metrics/AbcSize 54 | def extract_params(payload) 55 | { 56 | gitlab_id: payload.object_attributes.iid, 57 | gitlab_user: gitlab_user_id(payload.user), 58 | number: payload.object_attributes.iid, 59 | gitlab_html_url: payload.object_attributes.url, 60 | gitlab_updated_at: payload.object_attributes.updated_at, 61 | state: payload.object_attributes.state, 62 | title: payload.object_attributes.title, 63 | body: description(payload.object_attributes.description), 64 | repository: payload.repository.name, 65 | labels: payload.labels.map { |values| extract_label_values(values) } 66 | } 67 | end 68 | # rubocop:enable Metrics/AbcSize 69 | 70 | def extract_label_values(payload) 71 | { 72 | title: payload['title'], 73 | color: payload['color'] 74 | } 75 | end 76 | 77 | def gitlab_user_id(payload) 78 | return if payload.blank? 79 | 80 | ::OpenProject::GitlabIntegration::Services::UpsertGitlabUser.new.call(payload) 81 | end 82 | end 83 | end 84 | end 85 | end 86 | -------------------------------------------------------------------------------- /lib/open_project/gitlab_integration/services/upsert_issue_note.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | #-- copyright 4 | # OpenProject is an open source project management software. 5 | # Copyright (C) 2023 Ben Tey 6 | # 7 | # This program is free software; you can redistribute it and/or 8 | # modify it under the terms of the GNU General Public License version 3. 9 | # 10 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 11 | # Copyright (C) 2006-2013 Jean-Philippe Lang 12 | # Copyright (C) 2010-2013 the ChiliProject Team 13 | # Copyright (C) 2012-2021 the OpenProject GmbH 14 | # 15 | # This program is free software; you can redistribute it and/or 16 | # modify it under the terms of the GNU General Public License 17 | # as published by the Free Software Foundation; either version 2 18 | # of the License, or (at your option) any later version. 19 | # 20 | # This program is distributed in the hope that it will be useful, 21 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 22 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 23 | # GNU General Public License for more details. 24 | # 25 | # You should have received a copy of the GNU General Public License 26 | # along with this program; if not, write to the Free Software 27 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 28 | # 29 | # See docs/COPYRIGHT.rdoc for more details. 30 | #++ 31 | module OpenProject 32 | module GitlabIntegration 33 | module Services 34 | class UpsertIssueNote 35 | include ParamsHelper 36 | 37 | def call(payload, work_packages: []) 38 | find_or_initialize(payload).tap do |issue| 39 | issue.update!(work_packages: issue.work_packages | work_packages, **extract_params(payload)) 40 | end 41 | end 42 | 43 | private 44 | 45 | def find_or_initialize(payload) 46 | GitlabIssue.find_by_gitlab_identifiers(id: payload.issue.iid, 47 | url: payload.issue.url, 48 | initialize: true) 49 | end 50 | 51 | # Receives the input from the gitlab webhook and translates them 52 | # to our internal representation. 53 | # rubocop:disable Metrics/AbcSize 54 | def extract_params(payload) 55 | { 56 | gitlab_id: payload.issue.iid, 57 | gitlab_user: gitlab_user_id(payload.user), 58 | number: payload.issue.iid, 59 | gitlab_html_url: payload.issue.url, 60 | gitlab_updated_at: payload.issue.updated_at, 61 | state: payload.issue.state, 62 | title: payload.issue.title, 63 | body: description(payload.object_attributes.description), 64 | repository: payload.repository.name, 65 | labels: payload.issue.labels.map { |values| extract_label_values(values) } 66 | } 67 | end 68 | # rubocop:enable Metrics/AbcSize 69 | 70 | def extract_label_values(payload) 71 | { 72 | title: payload['title'], 73 | color: payload['color'] 74 | } 75 | end 76 | 77 | def gitlab_user_id(payload) 78 | return if payload.blank? 79 | 80 | ::OpenProject::GitlabIntegration::Services::UpsertGitlabUser.new.call(payload) 81 | end 82 | end 83 | end 84 | end 85 | end 86 | -------------------------------------------------------------------------------- /lib/open_project/gitlab_integration/services/upsert_pipeline.rb: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | #-- copyright 4 | # OpenProject is an open source project management software. 5 | # Copyright (C) 2023 Ben Tey 6 | # 7 | # This program is free software; you can redistribute it and/or 8 | # modify it under the terms of the GNU General Public License version 3. 9 | # 10 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 11 | # Copyright (C) 2006-2013 Jean-Philippe Lang 12 | # Copyright (C) 2010-2013 the ChiliProject Team 13 | # Copyright (C) 2012-2021 the OpenProject GmbH 14 | # 15 | # This program is free software; you can redistribute it and/or 16 | # modify it under the terms of the GNU General Public License 17 | # as published by the Free Software Foundation; either version 2 18 | # of the License, or (at your option) any later version. 19 | # 20 | # This program is distributed in the hope that it will be useful, 21 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 22 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 23 | # GNU General Public License for more details. 24 | # 25 | # You should have received a copy of the GNU General Public License 26 | # along with this program; if not, write to the Free Software 27 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 28 | # 29 | # See docs/COPYRIGHT.rdoc for more details. 30 | #++ 31 | module OpenProject 32 | module GitlabIntegration 33 | module Services 34 | class UpsertPipeline 35 | include ParamsHelper 36 | 37 | def call(payload, merge_request:) 38 | GitlabPipeline.find_or_initialize_by(gitlab_id: payload.object_attributes.iid) 39 | .tap do |pipeline| 40 | pipeline.update!(gitlab_merge_request: merge_request, **extract_params(payload)) 41 | end 42 | end 43 | 44 | private 45 | 46 | # Receives the input from the gitlab webhook and translates them 47 | # to our internal representation. 48 | def extract_params(payload) 49 | { 50 | gitlab_id: payload.object_attributes.iid, 51 | gitlab_html_url: "#{payload.project.web_url}/-/pipelines/#{payload.object_attributes.iid}", 52 | project_id: payload.project.id, 53 | gitlab_user_avatar_url: avatar_url(payload.user.avatar_url), 54 | name: payload.object_attributes.iid, 55 | status: payload.object_attributes.status, 56 | details_url: "#{payload.project.web_url}/-/commit/#{payload.object_attributes.sha[0..7]}", 57 | commit_id: payload.object_attributes.sha[0..7], 58 | username: payload.user.name, 59 | ci_details: payload.builds, 60 | started_at: payload.object_attributes.created_at, 61 | completed_at: payload.object_attributes.finished_at 62 | } 63 | end 64 | end 65 | end 66 | end 67 | end 68 | -------------------------------------------------------------------------------- /lib/openproject-gitlab_integration.rb: -------------------------------------------------------------------------------- 1 | #-- copyright 2 | # OpenProject is an open source project management software. 3 | # Copyright (C) 2023 Ben Tey 4 | # 5 | # This program is free software; you can redistribute it and/or 6 | # modify it under the terms of the GNU General Public License version 3. 7 | # 8 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 9 | # Copyright (C) 2006-2013 Jean-Philippe Lang 10 | # Copyright (C) 2010-2013 the ChiliProject Team 11 | # Copyright (C) 2012-2021 the OpenProject GmbH 12 | # 13 | # This program is free software; you can redistribute it and/or 14 | # modify it under the terms of the GNU General Public License 15 | # as published by the Free Software Foundation; either version 2 16 | # of the License, or (at your option) any later version. 17 | # 18 | # This program is distributed in the hope that it will be useful, 19 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 20 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 21 | # GNU General Public License for more details. 22 | # 23 | # You should have received a copy of the GNU General Public License 24 | # along with this program; if not, write to the Free Software 25 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 26 | # 27 | # See docs/COPYRIGHT.rdoc for more details. 28 | #++ 29 | 30 | require 'open_project/gitlab_integration' 31 | -------------------------------------------------------------------------------- /openproject-gitlab_integration.gemspec: -------------------------------------------------------------------------------- 1 | # frozen_string_literal: true 2 | 3 | # 4 | #-- copyright 5 | # OpenProject is an open source project management software. 6 | # Copyright (C) 2023 Ben Tey 7 | # 8 | # This program is free software; you can redistribute it and/or 9 | # modify it under the terms of the GNU General Public License version 3. 10 | # 11 | # OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: 12 | # Copyright (C) 2006-2013 Jean-Philippe Lang 13 | # Copyright (C) 2010-2013 the ChiliProject Team 14 | # Copyright (C) 2012-2021 the OpenProject GmbH 15 | # 16 | # This program is free software; you can redistribute it and/or 17 | # modify it under the terms of the GNU General Public License 18 | # as published by the Free Software Foundation; either version 2 19 | # of the License, or (at your option) any later version. 20 | # 21 | # This program is distributed in the hope that it will be useful, 22 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 23 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 24 | # GNU General Public License for more details. 25 | # 26 | # You should have received a copy of the GNU General Public License 27 | # along with this program; if not, write to the Free Software 28 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 29 | # 30 | # See docs/COPYRIGHT.rdoc for more details. 31 | #++ 32 | 33 | Gem::Specification.new do |s| 34 | s.name = 'openproject-gitlab_integration' 35 | s.version = '2.1.6' 36 | s.authors = 'Ben Tey' 37 | s.email = 'ben.tey@outlook.com' 38 | s.homepage = 'https://github.com/btey/openproject-gitlab-integration' 39 | s.summary = 'OpenProject GitLab Integration' 40 | s.description = 'Integrates OpenProject and GitLab for a better workflow' 41 | s.license = 'GPLv3' 42 | 43 | s.files = Dir['{app,config,db,frontend,lib}/**/*'] + %w[README.md] 44 | 45 | s.add_dependency 'openproject-webhooks' 46 | end 47 | --------------------------------------------------------------------------------