OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
[#36153] link manually created pull request to a work package using the GitHub integration plug-in (#9070)
Philipp Tessenowbd906716e5b5
diff --git a/.rubocop.yml b/.rubocop.ymlindex 8f3909aa0e8..da7b683c8f8 100644--- a/.rubocop.yml+++ b/.rubocop.yml@@ -291,6 +291,7 @@ Style/HashTransformValues:RSpec/MultipleMemoizedHelpers:Max: 15+ AllowSubject: trueRSpec/MultipleExpectations:Max: 15diff --git a/app/models/work_package.rb b/app/models/work_package.rbindex eef88879630..e27a84c5382 100644--- a/app/models/work_package.rb+++ b/app/models/work_package.rb@@ -64,6 +64,8 @@ class WorkPackage < ApplicationRecordorder("#{Changeset.table_name}.committed_on ASC, #{Changeset.table_name}.id ASC")}+ has_and_belongs_to_many :github_pull_requests+scope :recently_updated, -> {order(updated_at: :desc)}diff --git a/lib/open_project/notifications.rb b/lib/open_project/notifications.rbindex 1229f2f992a..60cf6368fd9 100644--- a/lib/open_project/notifications.rb+++ b/lib/open_project/notifications.rb@@ -73,8 +73,8 @@ module OpenProjectendend- # Send a notification- # payload should be a Hash and might be marshalled and unmarshalled before being+ # Send a notification.+ # Payload should be a Hash and might be marshalled and unmarshalled before being# delivered (although it is not at the moment), so don't count on object equality# for the payload.def send(name, payload)diff --git a/modules/bim/spec/factories/bcf_issue_factory.rb b/modules/bim/spec/factories/bcf_issue_factory.rbindex 38f8c08efc7..b6eba7ee6a7 100644--- a/modules/bim/spec/factories/bcf_issue_factory.rb+++ b/modules/bim/spec/factories/bcf_issue_factory.rb@@ -111,7 +111,7 @@ FactoryBot.define doendstage { nil }labels { [] }- sequence(:index) { |n| n }+ sequence(:index)factory :bcf_issue_with_viewpoint doafter(:create) do |issue|diff --git a/modules/github_integration/app/models/github_check_run.rb b/modules/github_integration/app/models/github_check_run.rbnew file mode 100644index 00000000000..b698600fafd--- /dev/null+++ b/modules/github_integration/app/models/github_check_run.rb@@ -0,0 +1,56 @@+#-- encoding: UTF-8++#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2021 the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See docs/COPYRIGHT.rdoc for more details.+#++++class GithubCheckRun < ApplicationRecord+ belongs_to :github_pull_request, touch: true++ enum status: {+ completed: 'completed',+ in_progress: 'in_progress',+ queued: 'queued'+ }++ enum conclusion: {+ action_required: 'action_required',+ cancelled: 'cancelled',+ failure: 'failure',+ neutral: 'neutral',+ skipped: 'skipped',+ stale: 'stale',+ success: 'success',+ timed_out: 'timed_out'+ }++ validates_presence_of :github_app_owner_avatar_url,+ :github_html_url,+ :github_id,+ :status,+ :name+enddiff --git a/modules/github_integration/app/models/github_pull_request.rb b/modules/github_integration/app/models/github_pull_request.rbnew file mode 100644index 00000000000..6ccfa517f49--- /dev/null+++ b/modules/github_integration/app/models/github_pull_request.rb@@ -0,0 +1,79 @@+#-- encoding: UTF-8++#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2021 the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See docs/COPYRIGHT.rdoc for more details.+#++++class GithubPullRequest < ApplicationRecord+ LABEL_KEYS = %w[color name].freeze++ has_and_belongs_to_many :work_packages+ has_many :github_check_runs, dependent: :destroy+ belongs_to :github_user, optional: true+ belongs_to :merged_by, optional: true, class_name: 'GithubUser'++ enum state: {+ open: 'open',+ closed: 'closed',+ partial: 'partial'+ }++ validates_presence_of :github_html_url,+ :number,+ :repository,+ :state+ validates_presence_of :github_updated_at,+ :title,+ :body,+ :comments_count,+ :review_comments_count,+ :additions_count,+ :deletions_count,+ :changed_files_count,+ unless: :partial?+ validate :validate_labels_schema++ scope :complete, -> { where(state: ['open', 'closed']) }+ scope :without_work_package, -> { left_outer_joins(:work_packages).where(work_packages: { id: nil }) }++ ##+ # When a PR lives long enough and receives many pushes, the same check (say, a CI test run) can be run multiple times.+ # This method only returns the latest of each type of check_run.+ def latest_check_runs+ github_check_runs.select("DISTINCT ON (github_check_runs.app_id, github_check_runs.name) *")+ .order(app_id: :asc, name: :asc, started_at: :desc)+ end++ private++ def validate_labels_schema+ return if labels.nil?+ return if labels.all? { |label| label.keys.sort == LABEL_KEYS }++ errors.add(:labels, 'invalid schema')+ end+enddiff --git a/modules/github_integration/app/models/github_user.rb b/modules/github_integration/app/models/github_user.rbnew file mode 100644index 00000000000..c5b07dae9ce--- /dev/null+++ b/modules/github_integration/app/models/github_user.rb@@ -0,0 +1,38 @@+#-- encoding: UTF-8++#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2021 the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See docs/COPYRIGHT.rdoc for more details.+#++++class GithubUser < ApplicationRecord+ has_many :github_pull_requests++ validates_presence_of :github_id,+ :github_login,+ :github_html_url,+ :github_avatar_url+enddiff --git a/modules/github_integration/app/workers/cron/clear_old_pull_requests_job.rb b/modules/github_integration/app/workers/cron/clear_old_pull_requests_job.rbnew file mode 100644index 00000000000..6aa311916ca--- /dev/null+++ b/modules/github_integration/app/workers/cron/clear_old_pull_requests_job.rb@@ -0,0 +1,43 @@+#-- encoding: UTF-8++#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2021 the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See docs/COPYRIGHT.rdoc for more details.+#++++module Cron+ class ClearOldPullRequestsJob < CronJob+ priority_number :low++ # runs at 1:25 nightly+ self.cron_expression = '25 1 * * *'++ def perform+ GithubPullRequest.without_work_package+ .find_each(&:destroy!)+ end+ end+enddiff --git a/modules/github_integration/config/locales/de.yml b/modules/github_integration/config/locales/de.ymlindex 444b2b42470..f2b729301f5 100644--- a/modules/github_integration/config/locales/de.yml+++ b/modules/github_integration/config/locales/de.yml@@ -44,3 +44,6 @@ de:**Referenziert in PR:** ""%{github_user}":%{github_user_url} hat dieses Arbeitspaket inPull Request %{pr_number} “%{pr_title}”":%{pr_url} in "%{repository}":%{repository_url}referenziert.+ pull_request_ready_for_review_comment: >+ **PR Bereit zum Review:** Pull request %{pr_number} [%{pr_title}](%{pr_url}) in [%{repository}](%{repository_url})+ wurde als bereit zum Review markiert von [%{github_user}](%{github_user_url}).diff --git a/modules/github_integration/config/locales/en.yml b/modules/github_integration/config/locales/en.ymlindex 47986e48985..3277db49471 100644--- a/modules/github_integration/config/locales/en.yml+++ b/modules/github_integration/config/locales/en.yml@@ -43,3 +43,6 @@ en:pull_request_referenced_comment: >**Referenced in PR:** [%{github_user}](%{github_user_url}) referenced this work package inPull request %{pr_number} [%{pr_title}](%{pr_url}) on [%{repository}](%{repository_url}).+ pull_request_ready_for_review_comment: >+ **PR Ready for Review:** Pull request %{pr_number} [%{pr_title}](%{pr_url}) for [%{repository}](%{repository_url})+ was marked as ready for review by [%{github_user}](%{github_user_url}).diff --git a/modules/github_integration/db/migrate/20210407110000_github_integration_models.rb b/modules/github_integration/db/migrate/20210407110000_github_integration_models.rbnew file mode 100644index 00000000000..297bc3670a8--- /dev/null+++ b/modules/github_integration/db/migrate/20210407110000_github_integration_models.rb@@ -0,0 +1,67 @@+class GithubIntegrationModels < ActiveRecord::Migration[6.1]+ # rubocop:disable Metrics/AbcSize+ def change+ # see https://docs.github.com/en/rest/reference/pulls+ create_table :github_pull_requests do |t|+ t.references :github_user+ t.references :merged_by++ t.bigint :github_id, unique: true # may be null if we receive a comment and just know the html_url+ t.integer :number, null: false+ t.string :github_html_url, null: false, unique: true+ t.string :state, null: false+ t.string :repository, null: false+ t.datetime :github_updated_at+ t.string :title+ t.text :body+ t.boolean :draft+ t.boolean :merged+ t.datetime :merged_at+ t.integer :comments_count+ t.integer :review_comments_count+ t.integer :additions_count+ t.integer :deletions_count+ t.integer :changed_files_count+ t.json :labels # [{name, color}]+ t.timestamps+ end++ create_join_table :github_pull_requests, :work_packages do |t|+ t.index :github_pull_request_id, name: 'github_pr_wp_pr_id'+ t.index %i[github_pull_request_id work_package_id],+ unique: true,+ name: "unique_index_gh_prs_wps_on_gh_pr_id_and_wp_id"+ end++ # see: https://docs.github.com/en/rest/reference/users+ create_table :github_users do |t|+ t.bigint :github_id, null: false, unique: true+ t.string :github_login, null: false+ t.string :github_html_url, null: false+ t.string :github_avatar_url, null: false++ t.timestamps+ end++ # see: https://docs.github.com/en/rest/reference/checks+ create_table :github_check_runs do |t|+ t.references :github_pull_request, null: false++ t.bigint :github_id, null: false, unique: true+ t.string :github_html_url, null: false+ t.bigint :app_id, null: false+ t.string :github_app_owner_avatar_url, null: false+ t.string :status, null: false+ t.string :name, null: false+ t.string :conclusion+ t.string :output_title+ t.string :output_summary+ t.string :details_url+ t.datetime :started_at+ t.datetime :completed_at++ t.timestamps+ end+ end+ # rubocop:enable Metrics/AbcSize+enddiff --git a/modules/github_integration/lib/api/v3/github_pull_requests/github_check_run_representer.rb b/modules/github_integration/lib/api/v3/github_pull_requests/github_check_run_representer.rbnew file mode 100644index 00000000000..af1aef4e3ac--- /dev/null+++ b/modules/github_integration/lib/api/v3/github_pull_requests/github_check_run_representer.rb@@ -0,0 +1,60 @@+#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2021 the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See docs/COPYRIGHT.rdoc for more details.+#++++require 'roar/decorator'+require 'roar/json/hal'++module API+ module V3+ module GithubPullRequests+ class GithubCheckRunRepresenter < ::API::Decorators::Single+ include API::Caching::CachedRepresenter+ include API::Decorators::DateProperty++ self_link id_attribute: :id,+ title_getter: ->(*) { nil }++ property :github_html_url, as: :htmlUrl+ property :github_app_owner_avatar_url, as: :appOwnerAvatarUrl+ property :name+ property :status+ property :conclusion+ property :output_title+ property :output_summary+ property :details_url++ date_time_property :started_at+ date_time_property :completed_at++ def _type+ 'GithubCheckRun'+ end+ end+ end+ end+enddiff --git a/modules/github_integration/lib/api/v3/github_pull_requests/github_pull_request_collection_representer.rb b/modules/github_integration/lib/api/v3/github_pull_requests/github_pull_request_collection_representer.rbnew file mode 100644index 00000000000..24b9fa7f9ab--- /dev/null+++ b/modules/github_integration/lib/api/v3/github_pull_requests/github_pull_request_collection_representer.rb@@ -0,0 +1,39 @@+#-- encoding: UTF-8++#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2021 the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See docs/COPYRIGHT.rdoc for more details.+#++++module API+ module V3+ module GithubPullRequests+ class GithubPullRequestCollectionRepresenter < ::API::Decorators::Collection+ self.to_eager_load = ::API::V3::GithubPullRequests::GithubPullRequestRepresenter.to_eager_load+ end+ end+ end+enddiff --git a/modules/github_integration/lib/api/v3/github_pull_requests/github_pull_request_representer.rb b/modules/github_integration/lib/api/v3/github_pull_requests/github_pull_request_representer.rbnew file mode 100644index 00000000000..68c5cd2e529--- /dev/null+++ b/modules/github_integration/lib/api/v3/github_pull_requests/github_pull_request_representer.rb@@ -0,0 +1,124 @@+#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2021 the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See docs/COPYRIGHT.rdoc for more details.+#++++require 'roar/decorator'+require 'roar/json/hal'++module API+ module V3+ module GithubPullRequests+ class GithubPullRequestRepresenter < ::API::Decorators::Single+ include API::Caching::CachedRepresenter+ include API::Decorators::DateProperty+ include API::Decorators::FormattableProperty+ include API::Decorators::LinkedResource++ def initialize(model, current_user:, **_opts)+ # We force `embed_links` so that github_user and github_check_runs+ # are embedded and we can avoid having separate endpoints.+ super(model, current_user: current_user, embed_links: true)+ end++ cached_representer key_parts: %i[github_user merged_by]++ property :id++ property :number++ property :github_html_url, as: :htmlUrl++ property :state,+ render_nil: true++ property :repository,+ render_nil: true++ date_time_property :github_updated_at,+ render_nil: true,+ setter: ->(*) { nil }++ property :title,+ render_nil: true++ formattable_property :body,+ render_nil: true++ property :draft,+ render_nil: true++ property :merged,+ render_nil: true++ property :merged_at,+ render_nil: true++ property :comments_count,+ render_nil: true++ property :review_comments_count,+ render_nil: true++ property :additions_count,+ render_nil: true++ property :deletions_count,+ render_nil: true++ property :changed_files_count,+ render_nil: true++ property :labels++ associated_resource :github_user,+ representer: ::API::V3::GithubPullRequests::GithubUserRepresenter,+ link_title_attribute: :github_login++ associated_resource :merged_by,+ representer: ::API::V3::GithubPullRequests::GithubUserRepresenter,+ v3_path: :github_user,+ link_title_attribute: :github_login++ associated_resources :latest_check_runs,+ as: :checkRuns,+ representer: ::API::V3::GithubPullRequests::GithubCheckRunRepresenter,+ v3_path: :github_check_run,+ link_title_attribute: :name++ date_time_property :created_at++ date_time_property :updated_at++ def _type+ 'GithubPullRequest'+ end++ self.to_eager_load = %i[github_user merged_by]+ end+ end+ end+enddiff --git a/modules/github_integration/lib/api/v3/github_pull_requests/github_pull_requests_by_work_package_api.rb b/modules/github_integration/lib/api/v3/github_pull_requests/github_pull_requests_by_work_package_api.rbnew file mode 100644index 00000000000..4fb852890f6--- /dev/null+++ b/modules/github_integration/lib/api/v3/github_pull_requests/github_pull_requests_by_work_package_api.rb@@ -0,0 +1,52 @@+#-- encoding: UTF-8++#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2021 the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See docs/COPYRIGHT.rdoc for more details.+#++++module API+ module V3+ module GithubPullRequests+ class GithubPullRequestsByWorkPackageAPI < ::API::OpenProjectAPI+ after_validation do+ authorize(:show_github_content, context: @work_package.project)+ @github_pull_requests = @work_package.github_pull_requests+ end++ resources :github_pull_requests do+ get do+ path = api_v3_paths.github_pull_requests_by_work_package(@work_package.id)+ GithubPullRequestCollectionRepresenter.new(@github_pull_requests,+ @github_pull_requests.count,+ self_link: path,+ current_user: current_user)+ end+ end+ end+ end+ end+enddiff --git a/modules/github_integration/lib/api/v3/github_pull_requests/github_user_representer.rb b/modules/github_integration/lib/api/v3/github_pull_requests/github_user_representer.rbnew file mode 100644index 00000000000..fa6c2aa3f15--- /dev/null+++ b/modules/github_integration/lib/api/v3/github_pull_requests/github_user_representer.rb@@ -0,0 +1,51 @@+#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2021 the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See docs/COPYRIGHT.rdoc for more details.+#++++require 'roar/decorator'+require 'roar/json/hal'++module API+ module V3+ module GithubPullRequests+ class GithubUserRepresenter < ::API::Decorators::Single+ include API::Caching::CachedRepresenter++ self_link id_attribute: :id,+ title_getter: ->(*) { nil }++ property :github_login, as: :login+ property :github_html_url, as: :htmlUrl+ property :github_avatar_url, as: :avatarUrl++ def _type+ 'GithubUser'+ end+ end+ end+ end+enddiff --git a/modules/github_integration/lib/open_project/github_integration/engine.rb b/modules/github_integration/lib/open_project/github_integration/engine.rbindex 00a21b63900..e26f6eda047 100644--- a/modules/github_integration/lib/open_project/github_integration/engine.rb+++ b/modules/github_integration/lib/open_project/github_integration/engine.rb@@ -29,8 +29,9 @@require 'open_project/plugins'require_relative './patches/api/work_package_representer'-require_relative './notification_handlers'+require_relative './notification_handler'require_relative './hook_handler'+require_relative './services'module OpenProject::GithubIntegrationclass Engine < ::Rails::Engine@@ -49,10 +50,12 @@ module OpenProject::GithubIntegrationendinitializer 'github.subscribe_to_notifications' do- ::OpenProject::Notifications.subscribe('github.pull_request',- &NotificationHandlers.method(:pull_request))+ ::OpenProject::Notifications.subscribe('github.check_run',+ &NotificationHandler.method(:check_run))::OpenProject::Notifications.subscribe('github.issue_comment',- &NotificationHandlers.method(:issue_comment))+ &NotificationHandler.method(:issue_comment))+ ::OpenProject::Notifications.subscribe('github.pull_request',+ &NotificationHandler.method(:pull_request))endinitializer 'github.permissions' do@@ -65,5 +68,26 @@ module OpenProject::GithubIntegrationextend_api_response(:v3, :work_packages, :work_package,&::OpenProject::GithubIntegration::Patches::API::WorkPackageRepresenter.extension)++ add_api_path :github_pull_requests_by_work_package do |id|+ "#{work_package(id)}/github_pull_requests"+ end++ add_api_path :github_user do |id|+ "github_users/#{id}"+ end++ add_api_path :github_check_run do |id|+ "github_check_run/#{id}"+ end++ add_api_endpoint 'API::V3::WorkPackages::WorkPackagesAPI', :id do+ mount ::API::V3::GithubPullRequests::GithubPullRequestsByWorkPackageAPI+ end++ config.to_prepare do+ # Register the cron job to clean up old github pull requests+ ::Cron::CronJob.register! ::Cron::ClearOldPullRequestsJob+ endendenddiff --git a/modules/github_integration/lib/open_project/github_integration/hook_handler.rb b/modules/github_integration/lib/open_project/github_integration/hook_handler.rbindex a4149a1941f..e6ef5d0a0af 100644--- a/modules/github_integration/lib/open_project/github_integration/hook_handler.rb+++ b/modules/github_integration/lib/open_project/github_integration/hook_handler.rb@@ -29,11 +29,16 @@module OpenProject::GithubIntegrationclass HookHandler# List of the github events we can handle.- KNOWN_EVENTS = %w[ping pull_request issue_comment].freeze+ KNOWN_EVENTS = %w[+ check_run+ issue_comment+ ping+ pull_request+ ].freeze# A github webhook happened.# We need to check validity of the data and send a Notification- # which we process in our NotificationHandler.+ # to be processed in our `NotificationHandler`.def process(_hook, request, params, user)event_type = request.env['HTTP_X_GITHUB_EVENT']event_delivery = request.env['HTTP_X_GITHUB_DELIVERY']diff --git a/modules/github_integration/lib/open_project/github_integration/notification_handler.rb b/modules/github_integration/lib/open_project/github_integration/notification_handler.rbnew file mode 100644index 00000000000..477f1aa4c43--- /dev/null+++ b/modules/github_integration/lib/open_project/github_integration/notification_handler.rb@@ -0,0 +1,68 @@+#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2021 the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See docs/COPYRIGHT.rdoc for more details.+#++++require_relative './notification_handler/helper'+require_relative './notification_handler/issue_comment'+require_relative './notification_handler/pull_request'++module OpenProject::GithubIntegration+ ##+ # Handles github-related notifications.+ # Each method is named after their webhook "event" as documented here:+ # https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads+ module NotificationHandler+ class << self+ def check_run(payload)+ with_logging do+ OpenProject::GithubIntegration::NotificationHandler::CheckRun.new.process(payload)+ end+ end++ def issue_comment(payload)+ with_logging do+ OpenProject::GithubIntegration::NotificationHandler::IssueComment.new.process(payload)+ end+ end++ def pull_request(payload)+ with_logging do+ OpenProject::GithubIntegration::NotificationHandler::PullRequest.new.process(payload)+ end+ end++ private++ def with_logging+ yield if block_given?+ rescue StandardError => e+ Rails.logger.error "Failed to handle issue_comment event: #{e} #{e.message}"+ raise e+ end+ end+ end+enddiff --git a/modules/github_integration/lib/open_project/github_integration/notification_handler/check_run.rb b/modules/github_integration/lib/open_project/github_integration/notification_handler/check_run.rbnew file mode 100644index 00000000000..5c773ad2201--- /dev/null+++ b/modules/github_integration/lib/open_project/github_integration/notification_handler/check_run.rb@@ -0,0 +1,66 @@+#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2021 the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See docs/COPYRIGHT.rdoc for more details.+#++++module OpenProject::GithubIntegration+ module NotificationHandler+ ##+ # Handles GitHub issue comment notifications.+ class CheckRun+ include OpenProject::GithubIntegration::NotificationHandler::Helper++ def process(params)+ @payload = wrap_payload(params)+ return unless associated_with_pr?++ pull_request = find_pull_request+ return unless pull_request++ OpenProject::GithubIntegration::Services::UpsertCheckRun.new.call(+ payload.check_run.to_h,+ pull_request: pull_request+ )+ end++ private++ attr_reader :payload++ def associated_with_pr?+ payload.check_run.pull_requests?.present?+ end++ def find_pull_request+ github_id = payload.check_run+ .pull_requests+ .first+ .fetch('id')+ GithubPullRequest.find_by(github_id: github_id)+ end+ end+ end+enddiff --git a/modules/github_integration/lib/open_project/github_integration/notification_handler/helper.rb b/modules/github_integration/lib/open_project/github_integration/notification_handler/helper.rbnew file mode 100644index 00000000000..cf94426d034--- /dev/null+++ b/modules/github_integration/lib/open_project/github_integration/notification_handler/helper.rb@@ -0,0 +1,130 @@+#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2021 the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See docs/COPYRIGHT.rdoc for more details.+#++++module OpenProject::GithubIntegration+ module NotificationHandler+ module Helper+ ##+ # Parses the given `text` and returns a list of work_package ids mentioned in that text.+ def extract_work_package_ids(text)+ # matches the following things (given that `Setting.host_name` equals 'www.openproject.org')+ # - http://www.openproject.org/wp/1234+ # - https://www.openproject.org/wp/1234+ # - http://www.openproject.org/work_packages/1234+ # - https://www.openproject.org/projects/:identifier/work_packages/1234+ # - https://www.openproject.org/projects/:identifier/wp/1234+ # - https://www.openproject.org/any/sub/directories/work_packages/1234+ # Or with the following prefix: OP#+ # e.g.,: This is a reference to OP#1234+ host_name = Regexp.escape(Setting.host_name)+ wp_regex = /OP#(\d+)|http(?:s?):\/\/#{host_name}\/(?:\S+?\/)*(?:work_packages|wp)\/([0-9]+)/++ text.scan(wp_regex)+ .map { |first, second| (first || second).to_i }+ .select(&:positive?)+ .uniq+ end++ ##+ # Given a list of work package ids, this methods returns all work packages that match those ids+ # and are visible by the given user.+ # Params:+ # - Array<int>: An list of WorkPackage ids+ # - User: The user who may (or may not) see those WorkPackages+ # Returns:+ # - Array<WorkPackage>+ def find_visible_work_packages(ids, user)+ WorkPackage.includes(:project)+ .where(id: ids)+ .select { |wp| user.allowed_to?(:add_work_package_notes, wp.project) }+ end++ # Returns a list of `WorkPackage`s that were referenced in the `text` and are visible to the given `user`.+ def find_mentioned_work_packages(text, user)+ find_visible_work_packages(extract_work_package_ids(text), user)+ end++ ##+ # Adds comments to the given WorkPackages.+ def comment_on_referenced_work_packages(work_packages, user, notes)+ return if notes.nil?++ work_packages.each do |work_package|+ ::WorkPackages::UpdateService+ .new(user: user, model: work_package)+ .call(journal_notes: notes, send_notifications: false)+ end+ end++ ##+ # Filters a list of work packages, removing those that are associated to+ # the given `GithubPullRequest`.+ def without_already_referenced(work_packages, github_pull_request)+ referenced_work_packages = github_pull_request&.work_packages || []+ work_packages - referenced_work_packages+ end++ ##+ # A wapper around a ruby Hash to access webhook payloads.+ # All methods called on it are converted to `.fetch` hash-access, raising an error if the string-key does not exist.+ # If the method ends with a question mark, e.g. "comment?" not error is raised if the key does not exist.+ # If the fetched value is again a hash, the value is wrapped into a new payload object.+ class Payload+ def initialize(payload)+ @payload = payload+ end++ def to_h+ @payload.dup+ end++ def method_missing(name, *args, &block)+ super unless args.empty? && block.nil?++ value = if name.end_with?('?')+ @payload.fetch(name.to_s[..-2], nil)+ else+ @payload.fetch(name.to_s)+ end++ return Payload.new(value) if value.is_a?(Hash)++ value+ end++ def respond_to_missing?(_method_name, _include_private = false)+ true+ end+ end++ def wrap_payload(payload)+ Payload.new(payload)+ end+ end+ end+enddiff --git a/modules/github_integration/lib/open_project/github_integration/notification_handler/issue_comment.rb b/modules/github_integration/lib/open_project/github_integration/notification_handler/issue_comment.rbnew file mode 100644index 00000000000..a6788c57862--- /dev/null+++ b/modules/github_integration/lib/open_project/github_integration/notification_handler/issue_comment.rb@@ -0,0 +1,100 @@+#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2021 the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See docs/COPYRIGHT.rdoc for more details.+#++++module OpenProject::GithubIntegration+ module NotificationHandler+ ##+ # Handles GitHub issue comment notifications.+ class IssueComment+ include OpenProject::GithubIntegration::NotificationHandler::Helper++ COMMENT_ACTIONS = %w[+ created+ edited+ ].freeze++ def process(params)+ @payload = wrap_payload(params)+ return unless associated_with_pr?++ github_system_user = User.find_by(id: payload.open_project_user_id)+ work_packages = find_mentioned_work_packages(payload.comment.body, github_system_user)+ new_work_packages = without_already_referenced(work_packages, pull_request)++ upsert_partial_pull_request(new_work_packages)+ comment_on_referenced_work_packages(new_work_packages, github_system_user, journal_entry) if new_work_packages.any?+ end++ private++ attr_reader :payload++ def associated_with_pr?+ payload.issue.pull_request?.present?+ end++ def pull_request+ @pull_request ||= GithubPullRequest.find_by(github_html_url: payload.issue.pull_request.html_url)+ end++ def upsert_partial_pull_request(work_packages)+ # Sadly, the webhook data for `issue_comment` events does not give us proper PR data (nor githubs PR id).+ # Thus, we have to search for the only data we have: html_url.+ # Even worse, when the PR is unknown to us, we don't have any useful data to create a GithubPullRequest record.+ # We still want to create a PR record (even if it just has partial data), to remember that it was referenced+ # and avoid adding reference-comments twice.+ OpenProject::GithubIntegration::Services::UpsertPartialPullRequest.new.call(+ github_html_url: payload.issue.pull_request.html_url,+ number: payload.issue.number,+ repository: payload.repository.full_name,+ work_packages: work_packages+ )+ end++ # rubocop:disable Metrics/AbcSize+ def journal_entry+ return unless COMMENT_ACTIONS.include?(payload.action)++ issue = payload.issue+ comment = payload.comment+ repository = payload.repository+ user = comment.user++ I18n.t("github_integration.pull_request_referenced_comment",+ pr_number: issue.number,+ pr_title: issue.title,+ pr_url: comment.html_url,+ repository: repository.full_name,+ repository_url: repository.html_url,+ github_user: user.login,+ github_user_url: user.html_url)+ end+ # rubocop:enable Metrics/AbcSize+ end+ end+enddiff --git a/modules/github_integration/lib/open_project/github_integration/notification_handler/pull_request.rb b/modules/github_integration/lib/open_project/github_integration/notification_handler/pull_request.rbnew file mode 100644index 00000000000..2976dde20f4--- /dev/null+++ b/modules/github_integration/lib/open_project/github_integration/notification_handler/pull_request.rb@@ -0,0 +1,114 @@+#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2021 the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See docs/COPYRIGHT.rdoc for more details.+#++++module OpenProject::GithubIntegration+ module NotificationHandler+ ##+ # Handles GitHub pull request notifications.+ class PullRequest+ include OpenProject::GithubIntegration::NotificationHandler::Helper++ COMMENT_ACTIONS = %w[+ closed+ opened+ ready_for_review+ reopened+ ].freeze++ def process(params)+ @payload = wrap_payload(params)+ github_system_user = User.find_by(id: payload.open_project_user_id)+ work_packages = find_mentioned_work_packages(payload.pull_request.body, github_system_user)++ comment_on_referenced_work_packages(+ work_packages_to_comment_on(payload.action, work_packages),+ github_system_user,+ journal_entry+ )+ upsert_pull_request(work_packages)+ end++ private++ attr_reader :payload++ def work_packages_to_comment_on(action, work_packages)+ if action == 'edited'+ without_already_referenced(work_packages, pull_request)+ else+ COMMENT_ACTIONS.include?(action) ? work_packages : []+ end+ end++ def pull_request+ @pull_request ||= GithubPullRequest.find_by(github_id: payload.pull_request.id)+ end++ def upsert_pull_request(work_packages)+ return if work_packages.empty? && pull_request.nil?++ OpenProject::GithubIntegration::Services::UpsertPullRequest.new.call(payload.pull_request.to_h,+ work_packages: work_packages)+ end++ def journal_entry+ key = journal_entry_i18n_key+ return nil unless key++ pull_request = payload.pull_request+ repository = pull_request.base.repo+ sender = payload.sender++ I18n.t("github_integration.pull_request_#{key}_comment",+ pr_number: pull_request.number,+ pr_title: pull_request.title,+ pr_url: pull_request.html_url,+ repository: repository.full_name,+ repository_url: repository.html_url,+ github_user: sender.login,+ github_user_url: sender.html_url)+ end++ def journal_entry_i18n_key+ key = {+ 'opened' => 'opened',+ 'reopened' => 'opened',+ 'closed' => 'closed',+ 'edited' => 'referenced',+ 'referenced' => 'referenced',+ 'ready_for_review' => 'ready_for_review'+ }[payload.action]++ return 'merged' if key == 'closed' && payload.pull_request.merged+ return 'draft' if key == 'open' && payload.pull_request.draft++ key+ end+ end+ end+enddiff --git a/modules/github_integration/lib/open_project/github_integration/notification_handlers.rb b/modules/github_integration/lib/open_project/github_integration/notification_handlers.rbdeleted file mode 100644index a6c759b073e..00000000000--- a/modules/github_integration/lib/open_project/github_integration/notification_handlers.rb+++ /dev/null@@ -1,204 +0,0 @@-#-- copyright-# OpenProject is an open source project management software.-# Copyright (C) 2012-2021 the OpenProject GmbH-#-# This program is free software; you can redistribute it and/or-# modify it under the terms of the GNU General Public License version 3.-#-# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:-# Copyright (C) 2006-2013 Jean-Philippe Lang-# Copyright (C) 2010-2013 the ChiliProject Team-#-# This program is free software; you can redistribute it and/or-# modify it under the terms of the GNU General Public License-# as published by the Free Software Foundation; either version 2-# of the License, or (at your option) any later version.-#-# This program is distributed in the hope that it will be useful,-# but WITHOUT ANY WARRANTY; without even the implied warranty of-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-# GNU General Public License for more details.-#-# You should have received a copy of the GNU General Public License-# along with this program; if not, write to the Free Software-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.-#-# See docs/COPYRIGHT.rdoc for more details.-#++--module OpenProject::GithubIntegration- ##- # Handles github-related notifications.- module NotificationHandlers- class << self- ##- # Handles a pull_request webhook notification.- # The payload looks similar to this:- # { open_project_user_id: <the id of the OpenProject user in whose name the webhook is processed>,- # github_event: 'pull_request',- # github_delivery: <randomly generated ID idenfitying a single github notification>,- # Have a look at the github documentation about the next keys:- # http://developer.github.com/v3/activity/events/types/#pullrequestevent- # action: 'opened' | 'closed' | 'synchronize' | 'reopened',- # number: <pull request number>,- # pull_request: <details of the pull request>- # We observed the following keys to appear. However they are not documented by github- # sender: <the github user who opened a pull request> (might not appear on closed,- # synchronized, or reopened - we haven't checked)- # repository: <the repository in action>- # }- def pull_request(payload)- # Don't add comments on new pushes to the pull request => ignore synchronize.- # Don't add comments about assignments and labels either.- ignored_actions = %w[synchronize assigned unassigned labeled unlabeled]- return if ignored_actions.include? payload['action']-- comment_on_referenced_work_packages payload['pull_request']['body'], payload- rescue StandardError => e- Rails.logger.error "Failed to handle pull_request event: #{e} #{e.message}"- raise e- end-- ##- # Handles an issue_comment webhook notification.- # The payload looks similar to this:- # { open_project_user_id: <the id of the OpenProject user in whose name the webhook is processed>,- # github_event: 'issue_comment',- # github_delivery: <randomly generated ID idenfitying a single github notification>,- # Have a look at the github documentation about the next keys:- # http://developer.github.com/v3/activity/events/types/#pullrequestevent- # action: 'created',- # issue: <details of the pull request/github issue>- # comment: <details of the created comment>- # We observed the following keys to appear. However they are not documented by github- # sender: <the github user who opened a pull request> (might not appear on closed,- # synchronized, or reopened - we haven't checked)- # repository: <the repository in action>- # }- def issue_comment(payload)- # if the comment is not associated with a PR, ignore it- return unless payload['issue']['pull_request']['html_url']-- comment_on_referenced_work_packages(payload['comment']['body'], payload)- rescue StandardError => e- Rails.logger.error "Failed to handle issue_comment event: #{e} #{e.message}"- raise e- end-- ##- # Parses the given source string and returns a list of work_package ids- # which it finds.- # WorkPackages are identified by their URL.- # Params:- # source: string- # Returns:- # Array<int>- def extract_work_package_ids(source)- # matches the following things (given that `Setting.host_name` equals 'www.openproject.org')- # - http://www.openproject.org/wp/1234- # - https://www.openproject.org/wp/1234- # - http://www.openproject.org/work_packages/1234- # - https://www.openproject.org/subdirectory/work_packages/1234- # Or with the following prefix: OP#- # e.g.,: This is a reference to OP#1234- host_name = Regexp.escape(Setting.host_name)- wp_regex = /OP#(\d+)|http(?:s?):\/\/#{host_name}\/(?:\S+?\/)*(?:work_packages|wp)\/([0-9]+)/-- source.scan(wp_regex)- .map { |first, second| (first || second).to_i }- .select { |el| el > 0 }- .uniq- end-- ##- # Given a list of work package ids this methods returns all work packages that match those ids- # and are visible by the given user.- # Params:- # - Array<int>: An list of WorkPackage ids- # - User: The user who may (or may not) see those WorkPackages- # Returns:- # - Array<WorkPackage>- def find_visible_work_packages(ids, user)- WorkPackage.includes(:project)- .where(id: ids)- .select { |wp| user.allowed_to?(:add_work_package_notes, wp.project) }- end-- private-- ##- # Parses the text for links to WorkPackages and adds a comment- # to those WorkPackages depending on the payload.- def comment_on_referenced_work_packages(text, payload)- user = User.find_by(id: payload['open_project_user_id'])- wp_ids = extract_work_package_ids(text)- wps = find_visible_work_packages(wp_ids, user)-- # We may get events for pull_request type that we don't support- # such as review_requested.- notes = notes_for_payload(payload)- return if notes.nil?-- attributes = { journal_notes: notes }- wps.each do |wp|- ::WorkPackages::UpdateService- .new(user: user, model: wp)- .call(attributes.merge(send_notifications: false).symbolize_keys)- end- end-- ##- # Find a matching translation for the action specified in the payload.- def notes_for_payload(payload)- case payload['github_event']- when 'pull_request'- notes_for_pull_request_payload(payload)- when 'issue_comment'- notes_for_issue_comment_payload(payload)- end- end-- # rubocop:disable Metrics/AbcSize- def notes_for_pull_request_payload(payload)- key = {- 'opened' => 'opened',- 'reopened' => 'opened',- 'closed' => 'closed',- 'edited' => 'referenced',- 'referenced' => 'referenced'- }[payload['action']]-- # a closed pull request which has been merged- # deserves a different label :)- key = 'merged' if key == 'closed' && payload['pull_request']['merged']-- return nil unless key-- I18n.t("github_integration.pull_request_#{key}_comment",- pr_number: payload['number'],- pr_title: payload['pull_request']['title'],- pr_url: payload['pull_request']['html_url'],- repository: payload['pull_request']['base']['repo']['full_name'],- repository_url: payload['pull_request']['base']['repo']['html_url'],- github_user: payload['sender']['login'],- github_user_url: payload['sender']['html_url'])- end- # rubocop:enable Metrics/AbcSize-- # rubocop:disable Metrics/AbcSize- def notes_for_issue_comment_payload(payload)- return nil unless payload['action'] == 'created'-- I18n.t("github_integration.pull_request_referenced_comment",- pr_number: payload['issue']['number'],- pr_title: payload['issue']['title'],- pr_url: payload['comment']['html_url'],- repository: payload['repository']['full_name'],- repository_url: payload['repository']['html_url'],- github_user: payload['comment']['user']['login'],- github_user_url: payload['comment']['user']['html_url'])- end- # rubocop:enable Metrics/AbcSize- end- end-enddiff --git a/modules/github_integration/lib/open_project/github_integration/patches/api/work_package_representer.rb b/modules/github_integration/lib/open_project/github_integration/patches/api/work_package_representer.rbindex 8538b1f7064..e607bc296c4 100644--- a/modules/github_integration/lib/open_project/github_integration/patches/api/work_package_representer.rb+++ b/modules/github_integration/lib/open_project/github_integration/patches/api/work_package_representer.rb@@ -13,6 +13,13 @@ module OpenProject::GithubIntegrationtitle: "github"}end++ link :github_pull_requests do+ {+ href: api_v3_paths.github_pull_requests_by_work_package(represented.id),+ title: "GitHub pull requests"+ }+ endendendenddiff --git a/modules/github_integration/lib/open_project/github_integration/services.rb b/modules/github_integration/lib/open_project/github_integration/services.rbnew file mode 100644index 00000000000..51d22939e01--- /dev/null+++ b/modules/github_integration/lib/open_project/github_integration/services.rb@@ -0,0 +1,31 @@+#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2021 the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See docs/COPYRIGHT.rdoc for more details.+#++++require_relative './services/upsert_check_run'+require_relative './services/upsert_github_user'+require_relative './services/upsert_pull_request'diff --git a/modules/github_integration/lib/open_project/github_integration/services/upsert_check_run.rb b/modules/github_integration/lib/open_project/github_integration/services/upsert_check_run.rbnew file mode 100644index 00000000000..041f1779949--- /dev/null+++ b/modules/github_integration/lib/open_project/github_integration/services/upsert_check_run.rb@@ -0,0 +1,73 @@+#-- encoding: UTF-8++#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2021 the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See docs/COPYRIGHT.rdoc for more details.+#+++module OpenProject::GithubIntegration::Services+ ##+ # Takes check_run data coming from GitHub webhook data and stores+ # them as a `GithubCheckRun`.+ # If the `GithubCheckRun` already exists, it is updated.+ #+ # Returns the upserted `GithubCheckRun`.+ #+ # See: https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#check_run+ class UpsertCheckRun+ def call(payload, pull_request:)+ GithubCheckRun.find_or_initialize_by(github_id: payload.fetch('id'))+ .tap do |check_run|+ check_run.update!(github_pull_request: pull_request, **extract_params(payload))+ end+ end++ private++ # Receives the input from the github webhook and translates them+ # to our internal representation.+ # See: https://docs.github.com/en/rest/reference/checks+ def extract_params(payload)+ output = payload.fetch('output')+ app = payload.fetch('app')++ {+ github_id: payload.fetch('id'),+ github_html_url: payload.fetch('html_url'),+ app_id: app.fetch('id'),+ github_app_owner_avatar_url: app.fetch('owner')+ .fetch('avatar_url'),+ name: payload.fetch('name'),+ status: payload.fetch('status'),+ conclusion: payload['conclusion'],+ output_title: output.fetch('title'),+ output_summary: output.fetch('summary'),+ details_url: payload['details_url'],+ started_at: payload['started_at'],+ completed_at: payload['completed_at']+ }+ end+ end+enddiff --git a/modules/github_integration/lib/open_project/github_integration/services/upsert_github_user.rb b/modules/github_integration/lib/open_project/github_integration/services/upsert_github_user.rbnew file mode 100644index 00000000000..3deb258d803--- /dev/null+++ b/modules/github_integration/lib/open_project/github_integration/services/upsert_github_user.rb@@ -0,0 +1,62 @@+#-- encoding: UTF-8++#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2021 the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See docs/COPYRIGHT.rdoc for more details.+#+++module OpenProject::GithubIntegration::Services+ ##+ # Takes user data coming from GitHub webhook data and stores+ # them as a `GithubUser`.+ # If the `GithubUser` already exists, it is updated.+ #+ # Returns the upserted `GithubUser`.+ #+ # See: https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#pull_request+ class UpsertGithubUser+ def call(payload)+ GithubUser.find_or_initialize_by(github_id: payload.fetch('id'))+ .tap do |github_user|+ github_user.update!(extract_params(payload))+ end+ end++ private++ ##+ # Receives the input from the github webhook and translates them+ # to our internal representation.+ # See: https://docs.github.com/en/rest/reference/users+ def extract_params(payload)+ {+ github_id: payload.fetch('id'),+ github_login: payload.fetch('login'),+ github_html_url: payload.fetch('html_url'),+ github_avatar_url: payload.fetch('avatar_url')+ }+ end+ end+enddiff --git a/modules/github_integration/lib/open_project/github_integration/services/upsert_partial_pull_request.rb b/modules/github_integration/lib/open_project/github_integration/services/upsert_partial_pull_request.rbnew file mode 100644index 00000000000..3f161cf6be1--- /dev/null+++ b/modules/github_integration/lib/open_project/github_integration/services/upsert_partial_pull_request.rb@@ -0,0 +1,66 @@+#-- encoding: UTF-8++#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2021 the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See docs/COPYRIGHT.rdoc for more details.+#+++module OpenProject::GithubIntegration::Services+ ##+ # Takes pull request data coming from GitHub webhook data and stores+ # them as a `GithubPullRequest`.+ # issue_comments webhooks don't give us the full PR data, but just a html_url.+ # As described in [the docs](https://docs.github.com/en/rest/reference/issues#list-organization-issues-assigned-to-the-authenticated-user),+ # pull request are considered to also be issues+ #+ # Returns the upserted partial `GithubPullRequest`.+ class UpsertPartialPullRequest+ def call(github_html_url:, number:, repository:, work_packages:)+ pull_request = find_full(github_html_url)++ if pull_request.present?+ pull_request.update!(work_packages: pull_request.work_packages | work_packages)+ else+ find_or_initialize_partial(github_html_url).tap do |pr|+ pr.update!(+ number: number,+ repository: repository,+ work_packages: pr.work_packages | work_packages+ )+ end+ end+ end++ private++ def find_full(github_html_url)+ GithubPullRequest.complete.find_by(github_html_url: github_html_url)+ end++ def find_or_initialize_partial(github_html_url)+ GithubPullRequest.partial.find_or_initialize_by(github_html_url: github_html_url)+ end+ end+enddiff --git a/modules/github_integration/lib/open_project/github_integration/services/upsert_pull_request.rb b/modules/github_integration/lib/open_project/github_integration/services/upsert_pull_request.rbnew file mode 100644index 00000000000..d0fe177684c--- /dev/null+++ b/modules/github_integration/lib/open_project/github_integration/services/upsert_pull_request.rb@@ -0,0 +1,101 @@+#-- encoding: UTF-8++#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2021 the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See docs/COPYRIGHT.rdoc for more details.+#+++module OpenProject::GithubIntegration::Services+ ##+ # Takes pull request data coming from GitHub webhook data and stores+ # them as a `GithubPullRequest`.+ # If the `GithubPullRequest` already exists, it is updated.+ #+ # Returns the upserted `GithubPullRequest`.+ #+ # See: https://docs.github.com/en/developers/webhooks-and-events/webhook-events-and-payloads#pull_request+ class UpsertPullRequest+ def call(payload, work_packages: [])+ find_or_initialize(payload).tap do |pr|+ pr.update!(work_packages: pr.work_packages | work_packages, **extract_params(payload))+ end+ end++ private++ def find_or_initialize(payload)+ GithubPullRequest.partial.find_by(+ github_html_url: payload.fetch('html_url')+ ) ||+ GithubPullRequest.find_or_initialize_by(+ github_id: payload.fetch('id')+ )+ end++ # Receives the input from the github webhook and translates them+ # to our internal representation.+ # See: https://docs.github.com/en/rest/reference/pulls+ # rubocop:disable Metrics/AbcSize+ def extract_params(payload)+ {+ github_id: payload.fetch('id'),+ github_user: github_user_id(payload.fetch('user')),+ number: payload.fetch('number'),+ github_html_url: payload.fetch('html_url'),+ github_updated_at: payload.fetch('updated_at'),+ state: payload.fetch('state'),+ title: payload.fetch('title'),+ body: payload.fetch('body'),+ repository: payload.fetch('base')+ .fetch('repo')+ .fetch('full_name'),+ draft: payload.fetch('draft'),+ merged: payload.fetch('merged'),+ merged_by: github_user_id(payload['merged_by']),+ merged_at: payload['merged_at'],+ comments_count: payload.fetch('comments'),+ review_comments_count: payload.fetch('review_comments'),+ additions_count: payload.fetch('additions'),+ deletions_count: payload.fetch('deletions'),+ changed_files_count: payload.fetch('changed_files'),+ labels: payload.fetch('labels').map { |values| extract_label_values(values) }+ }+ end+ # rubocop:enable Metrics/AbcSize++ def extract_label_values(payload)+ {+ name: payload.fetch('name'),+ color: payload.fetch('color')+ }+ end++ def github_user_id(payload)+ return if payload.blank?++ ::OpenProject::GithubIntegration::Services::UpsertGithubUser.new.call(payload)+ end+ end+enddiff --git a/modules/github_integration/openproject-github_integration.gemspec b/modules/github_integration/openproject-github_integration.gemspecindex 0ed758a7268..34eca0b5004 100644--- a/modules/github_integration/openproject-github_integration.gemspec+++ b/modules/github_integration/openproject-github_integration.gemspec@@ -5,12 +5,12 @@ Gem::Specification.new do |s|s.version = '1.0.0's.authors = "OpenProject GmbH"s.email = "[email protected]"- s.homepage = "https://community.openproject.org/projects/github-integration"+ s.homepage = "https://docs.openproject.org/system-admin-guide/github-integration/"s.summary = 'OpenProject Github Integration's.description = 'Integrates OpenProject and Github for a better workflow's.license = 'GPLv3'- s.files = Dir["{app,config,db,doc,lib}/**/*"] + %w(README.md)+ s.files = Dir["{app,config,db,frontend,lib}/**/*"] + %w(README.md)s.add_dependency "openproject-webhooks"enddiff --git a/modules/github_integration/spec/factories/github_check_run_factory.rb b/modules/github_integration/spec/factories/github_check_run_factory.rbnew file mode 100644index 00000000000..9026cd85d88--- /dev/null+++ b/modules/github_integration/spec/factories/github_check_run_factory.rb@@ -0,0 +1,46 @@+#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2021 the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See docs/COPYRIGHT.rdoc for more details.+#++++FactoryBot.define do+ factory :github_check_run do+ github_pull_request++ sequence(:github_id)+ github_html_url { "https://github.com/check_runs/#{github_id}" }+ github_app_owner_avatar_url { "https://github.com/apps/#{github_id}/owner.jpg" }+ name { 'test' }+ app_id { 12345 }+ status { 'completed' }+ conclusion { 'success' }+ output_title { 'an output title' }+ output_summary { 'an output summary' }+ details_url { "https://github.com/check_runs/#{github_id}/details" }+ started_at { 1.hour.ago }+ completed_at { 1.minute.ago }+ end+enddiff --git a/modules/github_integration/spec/factories/github_pull_request_factory.rb b/modules/github_integration/spec/factories/github_pull_request_factory.rbnew file mode 100644index 00000000000..6063c3c25bf--- /dev/null+++ b/modules/github_integration/spec/factories/github_pull_request_factory.rb@@ -0,0 +1,92 @@+#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2021 the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See docs/COPYRIGHT.rdoc for more details.+#++++FactoryBot.define do+ factory :github_pull_request do+ github_user++ sequence(:number)+ sequence(:github_id)+ state { 'open' }+ github_html_url { "https://github.com/test_user/test_repo/pull/#{number}" }++ labels { [] }+ github_updated_at { Time.current }+ sequence(:title) { |n| "Title of PR #{n}" }+ sequence(:body) { |n| "Body of PR #{n}" }+ sequence(:repository) { |n| "test_user/repo_#{n}" }++ draft { false }+ merged { false }+ merged_by { nil }+ merged_at { nil }++ comments_count { 1 }+ review_comments_count { 2 }+ additions_count { 3 }+ deletions_count { 4 }+ changed_files_count { 5 }++ trait :partial do+ state { 'partial' }++ github_user { nil }+ github_id { nil }+ labels { nil }+ github_updated_at { nil }+ title { nil }+ body { nil }+ draft { false }+ merged { false }+ merged_by { nil }+ merged_at { nil }+ comments_count { nil }+ review_comments_count { nil }+ additions_count { nil }+ deletions_count { nil }+ changed_files_count { nil }+ end++ trait :draft do+ draft { true }+ end++ trait :open++ trait :closed_unmerged do+ state { 'closed' }+ end++ trait :closed_merged do+ state { 'closed' }+ merged { true }+ merged_by { association :github_user }+ merged_at { Time.current }+ end+ end+enddiff --git a/modules/github_integration/spec/factories/github_user_factory.rb b/modules/github_integration/spec/factories/github_user_factory.rbnew file mode 100644index 00000000000..3d56287c383--- /dev/null+++ b/modules/github_integration/spec/factories/github_user_factory.rb@@ -0,0 +1,36 @@+#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2021 the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See docs/COPYRIGHT.rdoc for more details.+#++++FactoryBot.define do+ factory :github_user do+ sequence(:github_id)+ sequence(:github_login) { |n| "user_#{n}" }+ github_html_url { "https://github.com/#{github_login}" }+ github_avatar_url { "https://github.com/#{github_login}_avatar.jpg" }+ end+enddiff --git a/modules/github_integration/spec/fixtures/github_webhooks/check_run/completed_failure.json b/modules/github_integration/spec/fixtures/github_webhooks/check_run/completed_failure.jsonnew file mode 100644index 00000000000..529529f2216--- /dev/null+++ b/modules/github_integration/spec/fixtures/github_webhooks/check_run/completed_failure.json@@ -0,0 +1,733 @@+{+ "action": "handle_hook",+ "check_run": {+ "id": 2241416592,+ "node_id": "MDg6Q2hlY2tSdW4yMjQxNDE2NTky",+ "head_sha": "be5bc00c5c99607db592d62b4358db3c82356497",+ "external_id": "5264e576-3c6f-51f6-f055-fab409685f20",+ "url": "https://api.github.com/repos/test_user/webhooks_playground/check-runs/2241416592",+ "html_url": "https://github.com/test_user/webhooks_playground/runs/2241416592",+ "details_url": "https://github.com/test_user/webhooks_playground/runs/2241416592",+ "status": "completed",+ "conclusion": "failure",+ "started_at": "2021-03-31T23:02:44Z",+ "completed_at": "2021-03-31T23:02:55Z",+ "output": {+ "title": null,+ "summary": null,+ "text": null,+ "annotations_count": 0,+ "annotations_url": "https://api.github.com/repos/test_user/webhooks_playground/check-runs/2241416592/annotations"+ },+ "name": "test",+ "check_suite": {+ "id": 2394430178,+ "node_id": "MDEwOkNoZWNrU3VpdGUyMzk0NDMwMTc4",+ "head_branch": "add_correct_platform_for_ci",+ "head_sha": "be5bc00c5c99607db592d62b4358db3c82356497",+ "status": "in_progress",+ "conclusion": null,+ "url": "https://api.github.com/repos/test_user/webhooks_playground/check-suites/2394430178",+ "before": "0000000000000000000000000000000000000000",+ "after": "be5bc00c5c99607db592d62b4358db3c82356497",+ "pull_requests": [+ {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1",+ "id": 606508565,+ "number": 1,+ "head": {+ "ref": "add_correct_platform_for_ci",+ "sha": "be5bc00c5c99607db592d62b4358db3c82356497",+ "repo": {+ "id": 353509696,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "name": "webhooks_playground"+ }+ },+ "base": {+ "ref": "main",+ "sha": "e651d567c82bc263d197a706cc3358a9166f1953",+ "repo": {+ "id": 353509696,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "name": "webhooks_playground"+ }+ }+ }+ ],+ "app": {+ "id": 15368,+ "slug": "github-actions",+ "node_id": "MDM6QXBwMTUzNjg=",+ "owner": {+ "login": "github",+ "id": 9919,+ "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=",+ "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/github",+ "html_url": "https://github.com/github",+ "followers_url": "https://api.github.com/users/github/followers",+ "following_url": "https://api.github.com/users/github/following{/other_user}",+ "gists_url": "https://api.github.com/users/github/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/github/subscriptions",+ "organizations_url": "https://api.github.com/users/github/orgs",+ "repos_url": "https://api.github.com/users/github/repos",+ "events_url": "https://api.github.com/users/github/events{/privacy}",+ "received_events_url": "https://api.github.com/users/github/received_events",+ "type": "Organization",+ "site_admin": false+ },+ "name": "GitHub Actions",+ "description": "Automate your workflow from idea to production",+ "external_url": "https://help.github.com/en/actions",+ "html_url": "https://github.com/apps/github-actions",+ "created_at": "2018-07-30T09:30:17Z",+ "updated_at": "2019-12-10T19:04:12Z",+ "permissions": {+ "actions": "write",+ "checks": "write",+ "contents": "write",+ "deployments": "write",+ "issues": "write",+ "metadata": "read",+ "organization_packages": "write",+ "packages": "write",+ "pages": "write",+ "pull_requests": "write",+ "repository_hooks": "write",+ "repository_projects": "write",+ "security_events": "write",+ "statuses": "write",+ "vulnerability_alerts": "read"+ },+ "events": [+ "check_run",+ "check_suite",+ "create",+ "delete",+ "deployment",+ "deployment_status",+ "fork",+ "gollum",+ "issues",+ "issue_comment",+ "label",+ "milestone",+ "page_build",+ "project",+ "project_card",+ "project_column",+ "public",+ "pull_request",+ "pull_request_review",+ "pull_request_review_comment",+ "push",+ "registry_package",+ "release",+ "repository",+ "repository_dispatch",+ "status",+ "watch",+ "workflow_dispatch",+ "workflow_run"+ ]+ },+ "created_at": "2021-03-31T23:02:34Z",+ "updated_at": "2021-03-31T23:02:45Z"+ },+ "app": {+ "id": 15368,+ "slug": "github-actions",+ "node_id": "MDM6QXBwMTUzNjg=",+ "owner": {+ "login": "github",+ "id": 9919,+ "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=",+ "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/github",+ "html_url": "https://github.com/github",+ "followers_url": "https://api.github.com/users/github/followers",+ "following_url": "https://api.github.com/users/github/following{/other_user}",+ "gists_url": "https://api.github.com/users/github/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/github/subscriptions",+ "organizations_url": "https://api.github.com/users/github/orgs",+ "repos_url": "https://api.github.com/users/github/repos",+ "events_url": "https://api.github.com/users/github/events{/privacy}",+ "received_events_url": "https://api.github.com/users/github/received_events",+ "type": "Organization",+ "site_admin": false+ },+ "name": "GitHub Actions",+ "description": "Automate your workflow from idea to production",+ "external_url": "https://help.github.com/en/actions",+ "html_url": "https://github.com/apps/github-actions",+ "created_at": "2018-07-30T09:30:17Z",+ "updated_at": "2019-12-10T19:04:12Z",+ "permissions": {+ "actions": "write",+ "checks": "write",+ "contents": "write",+ "deployments": "write",+ "issues": "write",+ "metadata": "read",+ "organization_packages": "write",+ "packages": "write",+ "pages": "write",+ "pull_requests": "write",+ "repository_hooks": "write",+ "repository_projects": "write",+ "security_events": "write",+ "statuses": "write",+ "vulnerability_alerts": "read"+ },+ "events": [+ "check_run",+ "check_suite",+ "create",+ "delete",+ "deployment",+ "deployment_status",+ "fork",+ "gollum",+ "issues",+ "issue_comment",+ "label",+ "milestone",+ "page_build",+ "project",+ "project_card",+ "project_column",+ "public",+ "pull_request",+ "pull_request_review",+ "pull_request_review_comment",+ "push",+ "registry_package",+ "release",+ "repository",+ "repository_dispatch",+ "status",+ "watch",+ "workflow_dispatch",+ "workflow_run"+ ]+ },+ "pull_requests": [+ {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1",+ "id": 606508565,+ "number": 1,+ "head": {+ "ref": "add_correct_platform_for_ci",+ "sha": "be5bc00c5c99607db592d62b4358db3c82356497",+ "repo": {+ "id": 353509696,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "name": "webhooks_playground"+ }+ },+ "base": {+ "ref": "main",+ "sha": "e651d567c82bc263d197a706cc3358a9166f1953",+ "repo": {+ "id": 353509696,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "name": "webhooks_playground"+ }+ }+ }+ ]+ },+ "repository": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T23:02:40Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main"+ },+ "sender": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "key": "12a17eb237b75e3625f4642ce7ecefa8cfd91a619d8bf12dc738415a7bed860a",+ "controller": "webhooks/incoming/hooks",+ "hook_name": "github",+ "payload": {+ "action": "completed",+ "check_run": {+ "id": 2241416592,+ "node_id": "MDg6Q2hlY2tSdW4yMjQxNDE2NTky",+ "head_sha": "be5bc00c5c99607db592d62b4358db3c82356497",+ "external_id": "5264e576-3c6f-51f6-f055-fab409685f20",+ "url": "https://api.github.com/repos/test_user/webhooks_playground/check-runs/2241416592",+ "html_url": "https://github.com/test_user/webhooks_playground/runs/2241416592",+ "details_url": "https://github.com/test_user/webhooks_playground/runs/2241416592",+ "status": "completed",+ "conclusion": "failure",+ "started_at": "2021-03-31T23:02:44Z",+ "completed_at": "2021-03-31T23:02:55Z",+ "output": {+ "title": null,+ "summary": null,+ "text": null,+ "annotations_count": 0,+ "annotations_url": "https://api.github.com/repos/test_user/webhooks_playground/check-runs/2241416592/annotations"+ },+ "name": "test",+ "check_suite": {+ "id": 2394430178,+ "node_id": "MDEwOkNoZWNrU3VpdGUyMzk0NDMwMTc4",+ "head_branch": "add_correct_platform_for_ci",+ "head_sha": "be5bc00c5c99607db592d62b4358db3c82356497",+ "status": "in_progress",+ "conclusion": null,+ "url": "https://api.github.com/repos/test_user/webhooks_playground/check-suites/2394430178",+ "before": "0000000000000000000000000000000000000000",+ "after": "be5bc00c5c99607db592d62b4358db3c82356497",+ "pull_requests": [+ {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1",+ "id": 606508565,+ "number": 1,+ "head": {+ "ref": "add_correct_platform_for_ci",+ "sha": "be5bc00c5c99607db592d62b4358db3c82356497",+ "repo": {+ "id": 353509696,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "name": "webhooks_playground"+ }+ },+ "base": {+ "ref": "main",+ "sha": "e651d567c82bc263d197a706cc3358a9166f1953",+ "repo": {+ "id": 353509696,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "name": "webhooks_playground"+ }+ }+ }+ ],+ "app": {+ "id": 15368,+ "slug": "github-actions",+ "node_id": "MDM6QXBwMTUzNjg=",+ "owner": {+ "login": "github",+ "id": 9919,+ "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=",+ "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/github",+ "html_url": "https://github.com/github",+ "followers_url": "https://api.github.com/users/github/followers",+ "following_url": "https://api.github.com/users/github/following{/other_user}",+ "gists_url": "https://api.github.com/users/github/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/github/subscriptions",+ "organizations_url": "https://api.github.com/users/github/orgs",+ "repos_url": "https://api.github.com/users/github/repos",+ "events_url": "https://api.github.com/users/github/events{/privacy}",+ "received_events_url": "https://api.github.com/users/github/received_events",+ "type": "Organization",+ "site_admin": false+ },+ "name": "GitHub Actions",+ "description": "Automate your workflow from idea to production",+ "external_url": "https://help.github.com/en/actions",+ "html_url": "https://github.com/apps/github-actions",+ "created_at": "2018-07-30T09:30:17Z",+ "updated_at": "2019-12-10T19:04:12Z",+ "permissions": {+ "actions": "write",+ "checks": "write",+ "contents": "write",+ "deployments": "write",+ "issues": "write",+ "metadata": "read",+ "organization_packages": "write",+ "packages": "write",+ "pages": "write",+ "pull_requests": "write",+ "repository_hooks": "write",+ "repository_projects": "write",+ "security_events": "write",+ "statuses": "write",+ "vulnerability_alerts": "read"+ },+ "events": [+ "check_run",+ "check_suite",+ "create",+ "delete",+ "deployment",+ "deployment_status",+ "fork",+ "gollum",+ "issues",+ "issue_comment",+ "label",+ "milestone",+ "page_build",+ "project",+ "project_card",+ "project_column",+ "public",+ "pull_request",+ "pull_request_review",+ "pull_request_review_comment",+ "push",+ "registry_package",+ "release",+ "repository",+ "repository_dispatch",+ "status",+ "watch",+ "workflow_dispatch",+ "workflow_run"+ ]+ },+ "created_at": "2021-03-31T23:02:34Z",+ "updated_at": "2021-03-31T23:02:45Z"+ },+ "app": {+ "id": 15368,+ "slug": "github-actions",+ "node_id": "MDM6QXBwMTUzNjg=",+ "owner": {+ "login": "github",+ "id": 9919,+ "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=",+ "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/github",+ "html_url": "https://github.com/github",+ "followers_url": "https://api.github.com/users/github/followers",+ "following_url": "https://api.github.com/users/github/following{/other_user}",+ "gists_url": "https://api.github.com/users/github/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/github/subscriptions",+ "organizations_url": "https://api.github.com/users/github/orgs",+ "repos_url": "https://api.github.com/users/github/repos",+ "events_url": "https://api.github.com/users/github/events{/privacy}",+ "received_events_url": "https://api.github.com/users/github/received_events",+ "type": "Organization",+ "site_admin": false+ },+ "name": "GitHub Actions",+ "description": "Automate your workflow from idea to production",+ "external_url": "https://help.github.com/en/actions",+ "html_url": "https://github.com/apps/github-actions",+ "created_at": "2018-07-30T09:30:17Z",+ "updated_at": "2019-12-10T19:04:12Z",+ "permissions": {+ "actions": "write",+ "checks": "write",+ "contents": "write",+ "deployments": "write",+ "issues": "write",+ "metadata": "read",+ "organization_packages": "write",+ "packages": "write",+ "pages": "write",+ "pull_requests": "write",+ "repository_hooks": "write",+ "repository_projects": "write",+ "security_events": "write",+ "statuses": "write",+ "vulnerability_alerts": "read"+ },+ "events": [+ "check_run",+ "check_suite",+ "create",+ "delete",+ "deployment",+ "deployment_status",+ "fork",+ "gollum",+ "issues",+ "issue_comment",+ "label",+ "milestone",+ "page_build",+ "project",+ "project_card",+ "project_column",+ "public",+ "pull_request",+ "pull_request_review",+ "pull_request_review_comment",+ "push",+ "registry_package",+ "release",+ "repository",+ "repository_dispatch",+ "status",+ "watch",+ "workflow_dispatch",+ "workflow_run"+ ]+ },+ "pull_requests": [+ {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1",+ "id": 606508565,+ "number": 1,+ "head": {+ "ref": "add_correct_platform_for_ci",+ "sha": "be5bc00c5c99607db592d62b4358db3c82356497",+ "repo": {+ "id": 353509696,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "name": "webhooks_playground"+ }+ },+ "base": {+ "ref": "main",+ "sha": "e651d567c82bc263d197a706cc3358a9166f1953",+ "repo": {+ "id": 353509696,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "name": "webhooks_playground"+ }+ }+ }+ ]+ },+ "repository": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T23:02:40Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main"+ },+ "sender": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ }+ }+}diff --git a/modules/github_integration/spec/fixtures/github_webhooks/check_run/completed_success.json b/modules/github_integration/spec/fixtures/github_webhooks/check_run/completed_success.jsonnew file mode 100644index 00000000000..37735d431bf--- /dev/null+++ b/modules/github_integration/spec/fixtures/github_webhooks/check_run/completed_success.json@@ -0,0 +1,733 @@+{+ "action": "handle_hook",+ "check_run": {+ "id": 2241431836,+ "node_id": "MDg6Q2hlY2tSdW4yMjQxNDMxODM2",+ "head_sha": "183eada9a2c17ed1465d91e73bc315fe13338274",+ "external_id": "5264e576-3c6f-51f6-f055-fab409685f20",+ "url": "https://api.github.com/repos/test_user/webhooks_playground/check-runs/2241431836",+ "html_url": "https://github.com/test_user/webhooks_playground/runs/2241431836",+ "details_url": "https://github.com/test_user/webhooks_playground/runs/2241431836",+ "status": "completed",+ "conclusion": "success",+ "started_at": "2021-03-31T23:05:18Z",+ "completed_at": "2021-03-31T23:05:29Z",+ "output": {+ "title": null,+ "summary": null,+ "text": null,+ "annotations_count": 0,+ "annotations_url": "https://api.github.com/repos/test_user/webhooks_playground/check-runs/2241431836/annotations"+ },+ "name": "test",+ "check_suite": {+ "id": 2394448067,+ "node_id": "MDEwOkNoZWNrU3VpdGUyMzk0NDQ4MDY3",+ "head_branch": "add_correct_platform_for_ci",+ "head_sha": "183eada9a2c17ed1465d91e73bc315fe13338274",+ "status": "in_progress",+ "conclusion": null,+ "url": "https://api.github.com/repos/test_user/webhooks_playground/check-suites/2394448067",+ "before": "07a21e0bc6f0dbf2fadbf51146e62a7ec96ec7ae",+ "after": "183eada9a2c17ed1465d91e73bc315fe13338274",+ "pull_requests": [+ {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1",+ "id": 606508565,+ "number": 1,+ "head": {+ "ref": "add_correct_platform_for_ci",+ "sha": "183eada9a2c17ed1465d91e73bc315fe13338274",+ "repo": {+ "id": 353509696,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "name": "webhooks_playground"+ }+ },+ "base": {+ "ref": "main",+ "sha": "e651d567c82bc263d197a706cc3358a9166f1953",+ "repo": {+ "id": 353509696,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "name": "webhooks_playground"+ }+ }+ }+ ],+ "app": {+ "id": 15368,+ "slug": "github-actions",+ "node_id": "MDM6QXBwMTUzNjg=",+ "owner": {+ "login": "github",+ "id": 9919,+ "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=",+ "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/github",+ "html_url": "https://github.com/github",+ "followers_url": "https://api.github.com/users/github/followers",+ "following_url": "https://api.github.com/users/github/following{/other_user}",+ "gists_url": "https://api.github.com/users/github/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/github/subscriptions",+ "organizations_url": "https://api.github.com/users/github/orgs",+ "repos_url": "https://api.github.com/users/github/repos",+ "events_url": "https://api.github.com/users/github/events{/privacy}",+ "received_events_url": "https://api.github.com/users/github/received_events",+ "type": "Organization",+ "site_admin": false+ },+ "name": "GitHub Actions",+ "description": "Automate your workflow from idea to production",+ "external_url": "https://help.github.com/en/actions",+ "html_url": "https://github.com/apps/github-actions",+ "created_at": "2018-07-30T09:30:17Z",+ "updated_at": "2019-12-10T19:04:12Z",+ "permissions": {+ "actions": "write",+ "checks": "write",+ "contents": "write",+ "deployments": "write",+ "issues": "write",+ "metadata": "read",+ "organization_packages": "write",+ "packages": "write",+ "pages": "write",+ "pull_requests": "write",+ "repository_hooks": "write",+ "repository_projects": "write",+ "security_events": "write",+ "statuses": "write",+ "vulnerability_alerts": "read"+ },+ "events": [+ "check_run",+ "check_suite",+ "create",+ "delete",+ "deployment",+ "deployment_status",+ "fork",+ "gollum",+ "issues",+ "issue_comment",+ "label",+ "milestone",+ "page_build",+ "project",+ "project_card",+ "project_column",+ "public",+ "pull_request",+ "pull_request_review",+ "pull_request_review_comment",+ "push",+ "registry_package",+ "release",+ "repository",+ "repository_dispatch",+ "status",+ "watch",+ "workflow_dispatch",+ "workflow_run"+ ]+ },+ "created_at": "2021-03-31T23:05:11Z",+ "updated_at": "2021-03-31T23:05:19Z"+ },+ "app": {+ "id": 15368,+ "slug": "github-actions",+ "node_id": "MDM6QXBwMTUzNjg=",+ "owner": {+ "login": "github",+ "id": 9919,+ "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=",+ "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/github",+ "html_url": "https://github.com/github",+ "followers_url": "https://api.github.com/users/github/followers",+ "following_url": "https://api.github.com/users/github/following{/other_user}",+ "gists_url": "https://api.github.com/users/github/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/github/subscriptions",+ "organizations_url": "https://api.github.com/users/github/orgs",+ "repos_url": "https://api.github.com/users/github/repos",+ "events_url": "https://api.github.com/users/github/events{/privacy}",+ "received_events_url": "https://api.github.com/users/github/received_events",+ "type": "Organization",+ "site_admin": false+ },+ "name": "GitHub Actions",+ "description": "Automate your workflow from idea to production",+ "external_url": "https://help.github.com/en/actions",+ "html_url": "https://github.com/apps/github-actions",+ "created_at": "2018-07-30T09:30:17Z",+ "updated_at": "2019-12-10T19:04:12Z",+ "permissions": {+ "actions": "write",+ "checks": "write",+ "contents": "write",+ "deployments": "write",+ "issues": "write",+ "metadata": "read",+ "organization_packages": "write",+ "packages": "write",+ "pages": "write",+ "pull_requests": "write",+ "repository_hooks": "write",+ "repository_projects": "write",+ "security_events": "write",+ "statuses": "write",+ "vulnerability_alerts": "read"+ },+ "events": [+ "check_run",+ "check_suite",+ "create",+ "delete",+ "deployment",+ "deployment_status",+ "fork",+ "gollum",+ "issues",+ "issue_comment",+ "label",+ "milestone",+ "page_build",+ "project",+ "project_card",+ "project_column",+ "public",+ "pull_request",+ "pull_request_review",+ "pull_request_review_comment",+ "push",+ "registry_package",+ "release",+ "repository",+ "repository_dispatch",+ "status",+ "watch",+ "workflow_dispatch",+ "workflow_run"+ ]+ },+ "pull_requests": [+ {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1",+ "id": 606508565,+ "number": 1,+ "head": {+ "ref": "add_correct_platform_for_ci",+ "sha": "183eada9a2c17ed1465d91e73bc315fe13338274",+ "repo": {+ "id": 353509696,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "name": "webhooks_playground"+ }+ },+ "base": {+ "ref": "main",+ "sha": "e651d567c82bc263d197a706cc3358a9166f1953",+ "repo": {+ "id": 353509696,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "name": "webhooks_playground"+ }+ }+ }+ ]+ },+ "repository": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T23:05:11Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main"+ },+ "sender": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "key": "12a17eb237b75e3625f4642ce7ecefa8cfd91a619d8bf12dc738415a7bed860a",+ "controller": "webhooks/incoming/hooks",+ "hook_name": "github",+ "payload": {+ "action": "completed",+ "check_run": {+ "id": 2241431836,+ "node_id": "MDg6Q2hlY2tSdW4yMjQxNDMxODM2",+ "head_sha": "183eada9a2c17ed1465d91e73bc315fe13338274",+ "external_id": "5264e576-3c6f-51f6-f055-fab409685f20",+ "url": "https://api.github.com/repos/test_user/webhooks_playground/check-runs/2241431836",+ "html_url": "https://github.com/test_user/webhooks_playground/runs/2241431836",+ "details_url": "https://github.com/test_user/webhooks_playground/runs/2241431836",+ "status": "completed",+ "conclusion": "success",+ "started_at": "2021-03-31T23:05:18Z",+ "completed_at": "2021-03-31T23:05:29Z",+ "output": {+ "title": null,+ "summary": null,+ "text": null,+ "annotations_count": 0,+ "annotations_url": "https://api.github.com/repos/test_user/webhooks_playground/check-runs/2241431836/annotations"+ },+ "name": "test",+ "check_suite": {+ "id": 2394448067,+ "node_id": "MDEwOkNoZWNrU3VpdGUyMzk0NDQ4MDY3",+ "head_branch": "add_correct_platform_for_ci",+ "head_sha": "183eada9a2c17ed1465d91e73bc315fe13338274",+ "status": "in_progress",+ "conclusion": null,+ "url": "https://api.github.com/repos/test_user/webhooks_playground/check-suites/2394448067",+ "before": "07a21e0bc6f0dbf2fadbf51146e62a7ec96ec7ae",+ "after": "183eada9a2c17ed1465d91e73bc315fe13338274",+ "pull_requests": [+ {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1",+ "id": 606508565,+ "number": 1,+ "head": {+ "ref": "add_correct_platform_for_ci",+ "sha": "183eada9a2c17ed1465d91e73bc315fe13338274",+ "repo": {+ "id": 353509696,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "name": "webhooks_playground"+ }+ },+ "base": {+ "ref": "main",+ "sha": "e651d567c82bc263d197a706cc3358a9166f1953",+ "repo": {+ "id": 353509696,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "name": "webhooks_playground"+ }+ }+ }+ ],+ "app": {+ "id": 15368,+ "slug": "github-actions",+ "node_id": "MDM6QXBwMTUzNjg=",+ "owner": {+ "login": "github",+ "id": 9919,+ "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=",+ "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/github",+ "html_url": "https://github.com/github",+ "followers_url": "https://api.github.com/users/github/followers",+ "following_url": "https://api.github.com/users/github/following{/other_user}",+ "gists_url": "https://api.github.com/users/github/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/github/subscriptions",+ "organizations_url": "https://api.github.com/users/github/orgs",+ "repos_url": "https://api.github.com/users/github/repos",+ "events_url": "https://api.github.com/users/github/events{/privacy}",+ "received_events_url": "https://api.github.com/users/github/received_events",+ "type": "Organization",+ "site_admin": false+ },+ "name": "GitHub Actions",+ "description": "Automate your workflow from idea to production",+ "external_url": "https://help.github.com/en/actions",+ "html_url": "https://github.com/apps/github-actions",+ "created_at": "2018-07-30T09:30:17Z",+ "updated_at": "2019-12-10T19:04:12Z",+ "permissions": {+ "actions": "write",+ "checks": "write",+ "contents": "write",+ "deployments": "write",+ "issues": "write",+ "metadata": "read",+ "organization_packages": "write",+ "packages": "write",+ "pages": "write",+ "pull_requests": "write",+ "repository_hooks": "write",+ "repository_projects": "write",+ "security_events": "write",+ "statuses": "write",+ "vulnerability_alerts": "read"+ },+ "events": [+ "check_run",+ "check_suite",+ "create",+ "delete",+ "deployment",+ "deployment_status",+ "fork",+ "gollum",+ "issues",+ "issue_comment",+ "label",+ "milestone",+ "page_build",+ "project",+ "project_card",+ "project_column",+ "public",+ "pull_request",+ "pull_request_review",+ "pull_request_review_comment",+ "push",+ "registry_package",+ "release",+ "repository",+ "repository_dispatch",+ "status",+ "watch",+ "workflow_dispatch",+ "workflow_run"+ ]+ },+ "created_at": "2021-03-31T23:05:11Z",+ "updated_at": "2021-03-31T23:05:19Z"+ },+ "app": {+ "id": 15368,+ "slug": "github-actions",+ "node_id": "MDM6QXBwMTUzNjg=",+ "owner": {+ "login": "github",+ "id": 9919,+ "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=",+ "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/github",+ "html_url": "https://github.com/github",+ "followers_url": "https://api.github.com/users/github/followers",+ "following_url": "https://api.github.com/users/github/following{/other_user}",+ "gists_url": "https://api.github.com/users/github/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/github/subscriptions",+ "organizations_url": "https://api.github.com/users/github/orgs",+ "repos_url": "https://api.github.com/users/github/repos",+ "events_url": "https://api.github.com/users/github/events{/privacy}",+ "received_events_url": "https://api.github.com/users/github/received_events",+ "type": "Organization",+ "site_admin": false+ },+ "name": "GitHub Actions",+ "description": "Automate your workflow from idea to production",+ "external_url": "https://help.github.com/en/actions",+ "html_url": "https://github.com/apps/github-actions",+ "created_at": "2018-07-30T09:30:17Z",+ "updated_at": "2019-12-10T19:04:12Z",+ "permissions": {+ "actions": "write",+ "checks": "write",+ "contents": "write",+ "deployments": "write",+ "issues": "write",+ "metadata": "read",+ "organization_packages": "write",+ "packages": "write",+ "pages": "write",+ "pull_requests": "write",+ "repository_hooks": "write",+ "repository_projects": "write",+ "security_events": "write",+ "statuses": "write",+ "vulnerability_alerts": "read"+ },+ "events": [+ "check_run",+ "check_suite",+ "create",+ "delete",+ "deployment",+ "deployment_status",+ "fork",+ "gollum",+ "issues",+ "issue_comment",+ "label",+ "milestone",+ "page_build",+ "project",+ "project_card",+ "project_column",+ "public",+ "pull_request",+ "pull_request_review",+ "pull_request_review_comment",+ "push",+ "registry_package",+ "release",+ "repository",+ "repository_dispatch",+ "status",+ "watch",+ "workflow_dispatch",+ "workflow_run"+ ]+ },+ "pull_requests": [+ {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1",+ "id": 606508565,+ "number": 1,+ "head": {+ "ref": "add_correct_platform_for_ci",+ "sha": "183eada9a2c17ed1465d91e73bc315fe13338274",+ "repo": {+ "id": 353509696,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "name": "webhooks_playground"+ }+ },+ "base": {+ "ref": "main",+ "sha": "e651d567c82bc263d197a706cc3358a9166f1953",+ "repo": {+ "id": 353509696,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "name": "webhooks_playground"+ }+ }+ }+ ]+ },+ "repository": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T23:05:11Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main"+ },+ "sender": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ }+ }+}diff --git a/modules/github_integration/spec/fixtures/github_webhooks/check_run/queued.json b/modules/github_integration/spec/fixtures/github_webhooks/check_run/queued.jsonnew file mode 100644index 00000000000..918a00c0e88--- /dev/null+++ b/modules/github_integration/spec/fixtures/github_webhooks/check_run/queued.json@@ -0,0 +1,733 @@+{+ "action": "handle_hook",+ "check_run": {+ "id": 2241417510,+ "node_id": "MDg6Q2hlY2tSdW4yMjQxNDE3NTEw",+ "head_sha": "be5bc00c5c99607db592d62b4358db3c82356497",+ "external_id": "5264e576-3c6f-51f6-f055-fab409685f20",+ "url": "https://api.github.com/repos/test_user/webhooks_playground/check-runs/2241417510",+ "html_url": "https://github.com/test_user/webhooks_playground/runs/2241417510",+ "details_url": "https://github.com/test_user/webhooks_playground/runs/2241417510",+ "status": "queued",+ "conclusion": null,+ "started_at": "2021-03-31T23:02:44Z",+ "completed_at": null,+ "output": {+ "title": null,+ "summary": null,+ "text": null,+ "annotations_count": 0,+ "annotations_url": "https://api.github.com/repos/test_user/webhooks_playground/check-runs/2241417510/annotations"+ },+ "name": "test",+ "check_suite": {+ "id": 2394431080,+ "node_id": "MDEwOkNoZWNrU3VpdGUyMzk0NDMxMDgw",+ "head_branch": "add_correct_platform_for_ci",+ "head_sha": "be5bc00c5c99607db592d62b4358db3c82356497",+ "status": "queued",+ "conclusion": null,+ "url": "https://api.github.com/repos/test_user/webhooks_playground/check-suites/2394431080",+ "before": "0000000000000000000000000000000000000000",+ "after": "be5bc00c5c99607db592d62b4358db3c82356497",+ "pull_requests": [+ {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1",+ "id": 606508565,+ "number": 1,+ "head": {+ "ref": "add_correct_platform_for_ci",+ "sha": "be5bc00c5c99607db592d62b4358db3c82356497",+ "repo": {+ "id": 353509696,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "name": "webhooks_playground"+ }+ },+ "base": {+ "ref": "main",+ "sha": "e651d567c82bc263d197a706cc3358a9166f1953",+ "repo": {+ "id": 353509696,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "name": "webhooks_playground"+ }+ }+ }+ ],+ "app": {+ "id": 15368,+ "slug": "github-actions",+ "node_id": "MDM6QXBwMTUzNjg=",+ "owner": {+ "login": "github",+ "id": 9919,+ "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=",+ "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/github",+ "html_url": "https://github.com/github",+ "followers_url": "https://api.github.com/users/github/followers",+ "following_url": "https://api.github.com/users/github/following{/other_user}",+ "gists_url": "https://api.github.com/users/github/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/github/subscriptions",+ "organizations_url": "https://api.github.com/users/github/orgs",+ "repos_url": "https://api.github.com/users/github/repos",+ "events_url": "https://api.github.com/users/github/events{/privacy}",+ "received_events_url": "https://api.github.com/users/github/received_events",+ "type": "Organization",+ "site_admin": false+ },+ "name": "GitHub Actions",+ "description": "Automate your workflow from idea to production",+ "external_url": "https://help.github.com/en/actions",+ "html_url": "https://github.com/apps/github-actions",+ "created_at": "2018-07-30T09:30:17Z",+ "updated_at": "2019-12-10T19:04:12Z",+ "permissions": {+ "actions": "write",+ "checks": "write",+ "contents": "write",+ "deployments": "write",+ "issues": "write",+ "metadata": "read",+ "organization_packages": "write",+ "packages": "write",+ "pages": "write",+ "pull_requests": "write",+ "repository_hooks": "write",+ "repository_projects": "write",+ "security_events": "write",+ "statuses": "write",+ "vulnerability_alerts": "read"+ },+ "events": [+ "check_run",+ "check_suite",+ "create",+ "delete",+ "deployment",+ "deployment_status",+ "fork",+ "gollum",+ "issues",+ "issue_comment",+ "label",+ "milestone",+ "page_build",+ "project",+ "project_card",+ "project_column",+ "public",+ "pull_request",+ "pull_request_review",+ "pull_request_review_comment",+ "push",+ "registry_package",+ "release",+ "repository",+ "repository_dispatch",+ "status",+ "watch",+ "workflow_dispatch",+ "workflow_run"+ ]+ },+ "created_at": "2021-03-31T23:02:43Z",+ "updated_at": "2021-03-31T23:02:43Z"+ },+ "app": {+ "id": 15368,+ "slug": "github-actions",+ "node_id": "MDM6QXBwMTUzNjg=",+ "owner": {+ "login": "github",+ "id": 9919,+ "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=",+ "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/github",+ "html_url": "https://github.com/github",+ "followers_url": "https://api.github.com/users/github/followers",+ "following_url": "https://api.github.com/users/github/following{/other_user}",+ "gists_url": "https://api.github.com/users/github/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/github/subscriptions",+ "organizations_url": "https://api.github.com/users/github/orgs",+ "repos_url": "https://api.github.com/users/github/repos",+ "events_url": "https://api.github.com/users/github/events{/privacy}",+ "received_events_url": "https://api.github.com/users/github/received_events",+ "type": "Organization",+ "site_admin": false+ },+ "name": "GitHub Actions",+ "description": "Automate your workflow from idea to production",+ "external_url": "https://help.github.com/en/actions",+ "html_url": "https://github.com/apps/github-actions",+ "created_at": "2018-07-30T09:30:17Z",+ "updated_at": "2019-12-10T19:04:12Z",+ "permissions": {+ "actions": "write",+ "checks": "write",+ "contents": "write",+ "deployments": "write",+ "issues": "write",+ "metadata": "read",+ "organization_packages": "write",+ "packages": "write",+ "pages": "write",+ "pull_requests": "write",+ "repository_hooks": "write",+ "repository_projects": "write",+ "security_events": "write",+ "statuses": "write",+ "vulnerability_alerts": "read"+ },+ "events": [+ "check_run",+ "check_suite",+ "create",+ "delete",+ "deployment",+ "deployment_status",+ "fork",+ "gollum",+ "issues",+ "issue_comment",+ "label",+ "milestone",+ "page_build",+ "project",+ "project_card",+ "project_column",+ "public",+ "pull_request",+ "pull_request_review",+ "pull_request_review_comment",+ "push",+ "registry_package",+ "release",+ "repository",+ "repository_dispatch",+ "status",+ "watch",+ "workflow_dispatch",+ "workflow_run"+ ]+ },+ "pull_requests": [+ {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1",+ "id": 606508565,+ "number": 1,+ "head": {+ "ref": "add_correct_platform_for_ci",+ "sha": "be5bc00c5c99607db592d62b4358db3c82356497",+ "repo": {+ "id": 353509696,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "name": "webhooks_playground"+ }+ },+ "base": {+ "ref": "main",+ "sha": "e651d567c82bc263d197a706cc3358a9166f1953",+ "repo": {+ "id": 353509696,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "name": "webhooks_playground"+ }+ }+ }+ ]+ },+ "repository": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T23:02:40Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main"+ },+ "sender": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "key": "12a17eb237b75e3625f4642ce7ecefa8cfd91a619d8bf12dc738415a7bed860a",+ "controller": "webhooks/incoming/hooks",+ "hook_name": "github",+ "payload": {+ "action": "created",+ "check_run": {+ "id": 2241417510,+ "node_id": "MDg6Q2hlY2tSdW4yMjQxNDE3NTEw",+ "head_sha": "be5bc00c5c99607db592d62b4358db3c82356497",+ "external_id": "5264e576-3c6f-51f6-f055-fab409685f20",+ "url": "https://api.github.com/repos/test_user/webhooks_playground/check-runs/2241417510",+ "html_url": "https://github.com/test_user/webhooks_playground/runs/2241417510",+ "details_url": "https://github.com/test_user/webhooks_playground/runs/2241417510",+ "status": "queued",+ "conclusion": null,+ "started_at": "2021-03-31T23:02:44Z",+ "completed_at": null,+ "output": {+ "title": null,+ "summary": null,+ "text": null,+ "annotations_count": 0,+ "annotations_url": "https://api.github.com/repos/test_user/webhooks_playground/check-runs/2241417510/annotations"+ },+ "name": "test",+ "check_suite": {+ "id": 2394431080,+ "node_id": "MDEwOkNoZWNrU3VpdGUyMzk0NDMxMDgw",+ "head_branch": "add_correct_platform_for_ci",+ "head_sha": "be5bc00c5c99607db592d62b4358db3c82356497",+ "status": "queued",+ "conclusion": null,+ "url": "https://api.github.com/repos/test_user/webhooks_playground/check-suites/2394431080",+ "before": "0000000000000000000000000000000000000000",+ "after": "be5bc00c5c99607db592d62b4358db3c82356497",+ "pull_requests": [+ {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1",+ "id": 606508565,+ "number": 1,+ "head": {+ "ref": "add_correct_platform_for_ci",+ "sha": "be5bc00c5c99607db592d62b4358db3c82356497",+ "repo": {+ "id": 353509696,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "name": "webhooks_playground"+ }+ },+ "base": {+ "ref": "main",+ "sha": "e651d567c82bc263d197a706cc3358a9166f1953",+ "repo": {+ "id": 353509696,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "name": "webhooks_playground"+ }+ }+ }+ ],+ "app": {+ "id": 15368,+ "slug": "github-actions",+ "node_id": "MDM6QXBwMTUzNjg=",+ "owner": {+ "login": "github",+ "id": 9919,+ "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=",+ "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/github",+ "html_url": "https://github.com/github",+ "followers_url": "https://api.github.com/users/github/followers",+ "following_url": "https://api.github.com/users/github/following{/other_user}",+ "gists_url": "https://api.github.com/users/github/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/github/subscriptions",+ "organizations_url": "https://api.github.com/users/github/orgs",+ "repos_url": "https://api.github.com/users/github/repos",+ "events_url": "https://api.github.com/users/github/events{/privacy}",+ "received_events_url": "https://api.github.com/users/github/received_events",+ "type": "Organization",+ "site_admin": false+ },+ "name": "GitHub Actions",+ "description": "Automate your workflow from idea to production",+ "external_url": "https://help.github.com/en/actions",+ "html_url": "https://github.com/apps/github-actions",+ "created_at": "2018-07-30T09:30:17Z",+ "updated_at": "2019-12-10T19:04:12Z",+ "permissions": {+ "actions": "write",+ "checks": "write",+ "contents": "write",+ "deployments": "write",+ "issues": "write",+ "metadata": "read",+ "organization_packages": "write",+ "packages": "write",+ "pages": "write",+ "pull_requests": "write",+ "repository_hooks": "write",+ "repository_projects": "write",+ "security_events": "write",+ "statuses": "write",+ "vulnerability_alerts": "read"+ },+ "events": [+ "check_run",+ "check_suite",+ "create",+ "delete",+ "deployment",+ "deployment_status",+ "fork",+ "gollum",+ "issues",+ "issue_comment",+ "label",+ "milestone",+ "page_build",+ "project",+ "project_card",+ "project_column",+ "public",+ "pull_request",+ "pull_request_review",+ "pull_request_review_comment",+ "push",+ "registry_package",+ "release",+ "repository",+ "repository_dispatch",+ "status",+ "watch",+ "workflow_dispatch",+ "workflow_run"+ ]+ },+ "created_at": "2021-03-31T23:02:43Z",+ "updated_at": "2021-03-31T23:02:43Z"+ },+ "app": {+ "id": 15368,+ "slug": "github-actions",+ "node_id": "MDM6QXBwMTUzNjg=",+ "owner": {+ "login": "github",+ "id": 9919,+ "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=",+ "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/github",+ "html_url": "https://github.com/github",+ "followers_url": "https://api.github.com/users/github/followers",+ "following_url": "https://api.github.com/users/github/following{/other_user}",+ "gists_url": "https://api.github.com/users/github/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/github/subscriptions",+ "organizations_url": "https://api.github.com/users/github/orgs",+ "repos_url": "https://api.github.com/users/github/repos",+ "events_url": "https://api.github.com/users/github/events{/privacy}",+ "received_events_url": "https://api.github.com/users/github/received_events",+ "type": "Organization",+ "site_admin": false+ },+ "name": "GitHub Actions",+ "description": "Automate your workflow from idea to production",+ "external_url": "https://help.github.com/en/actions",+ "html_url": "https://github.com/apps/github-actions",+ "created_at": "2018-07-30T09:30:17Z",+ "updated_at": "2019-12-10T19:04:12Z",+ "permissions": {+ "actions": "write",+ "checks": "write",+ "contents": "write",+ "deployments": "write",+ "issues": "write",+ "metadata": "read",+ "organization_packages": "write",+ "packages": "write",+ "pages": "write",+ "pull_requests": "write",+ "repository_hooks": "write",+ "repository_projects": "write",+ "security_events": "write",+ "statuses": "write",+ "vulnerability_alerts": "read"+ },+ "events": [+ "check_run",+ "check_suite",+ "create",+ "delete",+ "deployment",+ "deployment_status",+ "fork",+ "gollum",+ "issues",+ "issue_comment",+ "label",+ "milestone",+ "page_build",+ "project",+ "project_card",+ "project_column",+ "public",+ "pull_request",+ "pull_request_review",+ "pull_request_review_comment",+ "push",+ "registry_package",+ "release",+ "repository",+ "repository_dispatch",+ "status",+ "watch",+ "workflow_dispatch",+ "workflow_run"+ ]+ },+ "pull_requests": [+ {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1",+ "id": 606508565,+ "number": 1,+ "head": {+ "ref": "add_correct_platform_for_ci",+ "sha": "be5bc00c5c99607db592d62b4358db3c82356497",+ "repo": {+ "id": 353509696,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "name": "webhooks_playground"+ }+ },+ "base": {+ "ref": "main",+ "sha": "e651d567c82bc263d197a706cc3358a9166f1953",+ "repo": {+ "id": 353509696,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "name": "webhooks_playground"+ }+ }+ }+ ]+ },+ "repository": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T23:02:40Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main"+ },+ "sender": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ }+ }+}diff --git a/modules/github_integration/spec/fixtures/github_webhooks/check_run/queued_no_associated_pr.json b/modules/github_integration/spec/fixtures/github_webhooks/check_run/queued_no_associated_pr.jsonnew file mode 100644index 00000000000..692f2adee2b--- /dev/null+++ b/modules/github_integration/spec/fixtures/github_webhooks/check_run/queued_no_associated_pr.json@@ -0,0 +1,637 @@+{+ "action": "handle_hook",+ "check_run": {+ "id": 2241416592,+ "node_id": "MDg6Q2hlY2tSdW4yMjQxNDE2NTky",+ "head_sha": "be5bc00c5c99607db592d62b4358db3c82356497",+ "external_id": "5264e576-3c6f-51f6-f055-fab409685f20",+ "url": "https://api.github.com/repos/test_user/webhooks_playground/check-runs/2241416592",+ "html_url": "https://github.com/test_user/webhooks_playground/runs/2241416592",+ "details_url": "https://github.com/test_user/webhooks_playground/runs/2241416592",+ "status": "queued",+ "conclusion": null,+ "started_at": "2021-03-31T23:02:36Z",+ "completed_at": null,+ "output": {+ "title": null,+ "summary": null,+ "text": null,+ "annotations_count": 0,+ "annotations_url": "https://api.github.com/repos/test_user/webhooks_playground/check-runs/2241416592/annotations"+ },+ "name": "test",+ "check_suite": {+ "id": 2394430178,+ "node_id": "MDEwOkNoZWNrU3VpdGUyMzk0NDMwMTc4",+ "head_branch": "add_correct_platform_for_ci",+ "head_sha": "be5bc00c5c99607db592d62b4358db3c82356497",+ "status": "queued",+ "conclusion": null,+ "url": "https://api.github.com/repos/test_user/webhooks_playground/check-suites/2394430178",+ "before": "0000000000000000000000000000000000000000",+ "after": "be5bc00c5c99607db592d62b4358db3c82356497",+ "pull_requests": [],+ "app": {+ "id": 15368,+ "slug": "github-actions",+ "node_id": "MDM6QXBwMTUzNjg=",+ "owner": {+ "login": "github",+ "id": 9919,+ "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=",+ "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/github",+ "html_url": "https://github.com/github",+ "followers_url": "https://api.github.com/users/github/followers",+ "following_url": "https://api.github.com/users/github/following{/other_user}",+ "gists_url": "https://api.github.com/users/github/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/github/subscriptions",+ "organizations_url": "https://api.github.com/users/github/orgs",+ "repos_url": "https://api.github.com/users/github/repos",+ "events_url": "https://api.github.com/users/github/events{/privacy}",+ "received_events_url": "https://api.github.com/users/github/received_events",+ "type": "Organization",+ "site_admin": false+ },+ "name": "GitHub Actions",+ "description": "Automate your workflow from idea to production",+ "external_url": "https://help.github.com/en/actions",+ "html_url": "https://github.com/apps/github-actions",+ "created_at": "2018-07-30T09:30:17Z",+ "updated_at": "2019-12-10T19:04:12Z",+ "permissions": {+ "actions": "write",+ "checks": "write",+ "contents": "write",+ "deployments": "write",+ "issues": "write",+ "metadata": "read",+ "organization_packages": "write",+ "packages": "write",+ "pages": "write",+ "pull_requests": "write",+ "repository_hooks": "write",+ "repository_projects": "write",+ "security_events": "write",+ "statuses": "write",+ "vulnerability_alerts": "read"+ },+ "events": [+ "check_run",+ "check_suite",+ "create",+ "delete",+ "deployment",+ "deployment_status",+ "fork",+ "gollum",+ "issues",+ "issue_comment",+ "label",+ "milestone",+ "page_build",+ "project",+ "project_card",+ "project_column",+ "public",+ "pull_request",+ "pull_request_review",+ "pull_request_review_comment",+ "push",+ "registry_package",+ "release",+ "repository",+ "repository_dispatch",+ "status",+ "watch",+ "workflow_dispatch",+ "workflow_run"+ ]+ },+ "created_at": "2021-03-31T23:02:34Z",+ "updated_at": "2021-03-31T23:02:34Z"+ },+ "app": {+ "id": 15368,+ "slug": "github-actions",+ "node_id": "MDM6QXBwMTUzNjg=",+ "owner": {+ "login": "github",+ "id": 9919,+ "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=",+ "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/github",+ "html_url": "https://github.com/github",+ "followers_url": "https://api.github.com/users/github/followers",+ "following_url": "https://api.github.com/users/github/following{/other_user}",+ "gists_url": "https://api.github.com/users/github/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/github/subscriptions",+ "organizations_url": "https://api.github.com/users/github/orgs",+ "repos_url": "https://api.github.com/users/github/repos",+ "events_url": "https://api.github.com/users/github/events{/privacy}",+ "received_events_url": "https://api.github.com/users/github/received_events",+ "type": "Organization",+ "site_admin": false+ },+ "name": "GitHub Actions",+ "description": "Automate your workflow from idea to production",+ "external_url": "https://help.github.com/en/actions",+ "html_url": "https://github.com/apps/github-actions",+ "created_at": "2018-07-30T09:30:17Z",+ "updated_at": "2019-12-10T19:04:12Z",+ "permissions": {+ "actions": "write",+ "checks": "write",+ "contents": "write",+ "deployments": "write",+ "issues": "write",+ "metadata": "read",+ "organization_packages": "write",+ "packages": "write",+ "pages": "write",+ "pull_requests": "write",+ "repository_hooks": "write",+ "repository_projects": "write",+ "security_events": "write",+ "statuses": "write",+ "vulnerability_alerts": "read"+ },+ "events": [+ "check_run",+ "check_suite",+ "create",+ "delete",+ "deployment",+ "deployment_status",+ "fork",+ "gollum",+ "issues",+ "issue_comment",+ "label",+ "milestone",+ "page_build",+ "project",+ "project_card",+ "project_column",+ "public",+ "pull_request",+ "pull_request_review",+ "pull_request_review_comment",+ "push",+ "registry_package",+ "release",+ "repository",+ "repository_dispatch",+ "status",+ "watch",+ "workflow_dispatch",+ "workflow_run"+ ]+ },+ "pull_requests": []+ },+ "repository": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T23:02:33Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 0,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 0,+ "watchers": 0,+ "default_branch": "main"+ },+ "sender": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "key": "12a17eb237b75e3625f4642ce7ecefa8cfd91a619d8bf12dc738415a7bed860a",+ "controller": "webhooks/incoming/hooks",+ "hook_name": "github",+ "payload": {+ "action": "created",+ "check_run": {+ "id": 2241416592,+ "node_id": "MDg6Q2hlY2tSdW4yMjQxNDE2NTky",+ "head_sha": "be5bc00c5c99607db592d62b4358db3c82356497",+ "external_id": "5264e576-3c6f-51f6-f055-fab409685f20",+ "url": "https://api.github.com/repos/test_user/webhooks_playground/check-runs/2241416592",+ "html_url": "https://github.com/test_user/webhooks_playground/runs/2241416592",+ "details_url": "https://github.com/test_user/webhooks_playground/runs/2241416592",+ "status": "queued",+ "conclusion": null,+ "started_at": "2021-03-31T23:02:36Z",+ "completed_at": null,+ "output": {+ "title": null,+ "summary": null,+ "text": null,+ "annotations_count": 0,+ "annotations_url": "https://api.github.com/repos/test_user/webhooks_playground/check-runs/2241416592/annotations"+ },+ "name": "test",+ "check_suite": {+ "id": 2394430178,+ "node_id": "MDEwOkNoZWNrU3VpdGUyMzk0NDMwMTc4",+ "head_branch": "add_correct_platform_for_ci",+ "head_sha": "be5bc00c5c99607db592d62b4358db3c82356497",+ "status": "queued",+ "conclusion": null,+ "url": "https://api.github.com/repos/test_user/webhooks_playground/check-suites/2394430178",+ "before": "0000000000000000000000000000000000000000",+ "after": "be5bc00c5c99607db592d62b4358db3c82356497",+ "pull_requests": [],+ "app": {+ "id": 15368,+ "slug": "github-actions",+ "node_id": "MDM6QXBwMTUzNjg=",+ "owner": {+ "login": "github",+ "id": 9919,+ "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=",+ "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/github",+ "html_url": "https://github.com/github",+ "followers_url": "https://api.github.com/users/github/followers",+ "following_url": "https://api.github.com/users/github/following{/other_user}",+ "gists_url": "https://api.github.com/users/github/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/github/subscriptions",+ "organizations_url": "https://api.github.com/users/github/orgs",+ "repos_url": "https://api.github.com/users/github/repos",+ "events_url": "https://api.github.com/users/github/events{/privacy}",+ "received_events_url": "https://api.github.com/users/github/received_events",+ "type": "Organization",+ "site_admin": false+ },+ "name": "GitHub Actions",+ "description": "Automate your workflow from idea to production",+ "external_url": "https://help.github.com/en/actions",+ "html_url": "https://github.com/apps/github-actions",+ "created_at": "2018-07-30T09:30:17Z",+ "updated_at": "2019-12-10T19:04:12Z",+ "permissions": {+ "actions": "write",+ "checks": "write",+ "contents": "write",+ "deployments": "write",+ "issues": "write",+ "metadata": "read",+ "organization_packages": "write",+ "packages": "write",+ "pages": "write",+ "pull_requests": "write",+ "repository_hooks": "write",+ "repository_projects": "write",+ "security_events": "write",+ "statuses": "write",+ "vulnerability_alerts": "read"+ },+ "events": [+ "check_run",+ "check_suite",+ "create",+ "delete",+ "deployment",+ "deployment_status",+ "fork",+ "gollum",+ "issues",+ "issue_comment",+ "label",+ "milestone",+ "page_build",+ "project",+ "project_card",+ "project_column",+ "public",+ "pull_request",+ "pull_request_review",+ "pull_request_review_comment",+ "push",+ "registry_package",+ "release",+ "repository",+ "repository_dispatch",+ "status",+ "watch",+ "workflow_dispatch",+ "workflow_run"+ ]+ },+ "created_at": "2021-03-31T23:02:34Z",+ "updated_at": "2021-03-31T23:02:34Z"+ },+ "app": {+ "id": 15368,+ "slug": "github-actions",+ "node_id": "MDM6QXBwMTUzNjg=",+ "owner": {+ "login": "github",+ "id": 9919,+ "node_id": "MDEyOk9yZ2FuaXphdGlvbjk5MTk=",+ "avatar_url": "https://avatars.githubusercontent.com/u/9919?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/github",+ "html_url": "https://github.com/github",+ "followers_url": "https://api.github.com/users/github/followers",+ "following_url": "https://api.github.com/users/github/following{/other_user}",+ "gists_url": "https://api.github.com/users/github/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/github/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/github/subscriptions",+ "organizations_url": "https://api.github.com/users/github/orgs",+ "repos_url": "https://api.github.com/users/github/repos",+ "events_url": "https://api.github.com/users/github/events{/privacy}",+ "received_events_url": "https://api.github.com/users/github/received_events",+ "type": "Organization",+ "site_admin": false+ },+ "name": "GitHub Actions",+ "description": "Automate your workflow from idea to production",+ "external_url": "https://help.github.com/en/actions",+ "html_url": "https://github.com/apps/github-actions",+ "created_at": "2018-07-30T09:30:17Z",+ "updated_at": "2019-12-10T19:04:12Z",+ "permissions": {+ "actions": "write",+ "checks": "write",+ "contents": "write",+ "deployments": "write",+ "issues": "write",+ "metadata": "read",+ "organization_packages": "write",+ "packages": "write",+ "pages": "write",+ "pull_requests": "write",+ "repository_hooks": "write",+ "repository_projects": "write",+ "security_events": "write",+ "statuses": "write",+ "vulnerability_alerts": "read"+ },+ "events": [+ "check_run",+ "check_suite",+ "create",+ "delete",+ "deployment",+ "deployment_status",+ "fork",+ "gollum",+ "issues",+ "issue_comment",+ "label",+ "milestone",+ "page_build",+ "project",+ "project_card",+ "project_column",+ "public",+ "pull_request",+ "pull_request_review",+ "pull_request_review_comment",+ "push",+ "registry_package",+ "release",+ "repository",+ "repository_dispatch",+ "status",+ "watch",+ "workflow_dispatch",+ "workflow_run"+ ]+ },+ "pull_requests": []+ },+ "repository": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T23:02:33Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 0,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 0,+ "watchers": 0,+ "default_branch": "main"+ },+ "sender": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ }+ }+}diff --git a/modules/github_integration/spec/fixtures/github_webhooks/issue_comment/create.json b/modules/github_integration/spec/fixtures/github_webhooks/issue_comment/create.jsonnew file mode 100644index 00000000000..9182de30077--- /dev/null+++ b/modules/github_integration/spec/fixtures/github_webhooks/issue_comment/create.json@@ -0,0 +1,455 @@+{+ "action": "handle_hook",+ "issue": {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1",+ "repository_url": "https://api.github.com/repos/test_user/webhooks_playground",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1/labels{/name}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1/comments",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1/events",+ "html_url": "https://github.com/test_user/webhooks_playground/pull/1",+ "id": 847496523,+ "node_id": "MDExOlB1bGxSZXF1ZXN0NjA2NTA4NTY1",+ "number": 1,+ "title": "added x86_64-linux to known platforms in Gemfile.lock",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "labels": [+ {+ "id": 2874042113,+ "node_id": "MDU6TGFiZWwyODc0MDQyMTEz",+ "url": "https://api.github.com/repos/test_user/webhooks_playground/labels/bug",+ "name": "bug",+ "color": "d73a4a",+ "default": true,+ "description": "Something isn't working"+ },+ {+ "id": 2874042116,+ "node_id": "MDU6TGFiZWwyODc0MDQyMTE2",+ "url": "https://api.github.com/repos/test_user/webhooks_playground/labels/enhancement",+ "name": "enhancement",+ "color": "a2eeef",+ "default": true,+ "description": "New feature or request"+ }+ ],+ "state": "closed",+ "locked": false,+ "assignee": null,+ "assignees": [],+ "milestone": null,+ "comments": 3,+ "created_at": "2021-03-31T23:02:40Z",+ "updated_at": "2021-04-06T15:16:03Z",+ "closed_at": "2021-03-31T23:07:10Z",+ "author_association": "OWNER",+ "active_lock_reason": null,+ "pull_request": {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1",+ "html_url": "https://github.com/test_user/webhooks_playground/pull/1",+ "diff_url": "https://github.com/test_user/webhooks_playground/pull/1.diff",+ "patch_url": "https://github.com/test_user/webhooks_playground/pull/1.patch"+ },+ "body": "",+ "performed_via_github_app": null+ },+ "comment": {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments/814203670",+ "html_url": "https://github.com/test_user/webhooks_playground/pull/1#issuecomment-814203670",+ "issue_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1",+ "id": 814203670,+ "node_id": "MDEyOklzc3VlQ29tbWVudDgxNDIwMzY3MA==",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "created_at": "2021-04-06T15:16:02Z",+ "updated_at": "2021-04-06T15:16:02Z",+ "author_association": "OWNER",+ "body": "${body}",+ "performed_via_github_app": null+ },+ "repository": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T23:08:14Z",+ "pushed_at": "2021-03-31T23:13:18Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 4,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main"+ },+ "sender": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "key": "fc6766384e75423e9149aa9f399354eac46c09cc236baab7707aaab0d8e15114",+ "controller": "webhooks/incoming/hooks",+ "hook_name": "github",+ "payload": {+ "action": "created",+ "issue": {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1",+ "repository_url": "https://api.github.com/repos/test_user/webhooks_playground",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1/labels{/name}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1/comments",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1/events",+ "html_url": "https://github.com/test_user/webhooks_playground/pull/1",+ "id": 847496523,+ "node_id": "MDExOlB1bGxSZXF1ZXN0NjA2NTA4NTY1",+ "number": 1,+ "title": "added x86_64-linux to known platforms in Gemfile.lock",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "labels": [+ {+ "id": 2874042113,+ "node_id": "MDU6TGFiZWwyODc0MDQyMTEz",+ "url": "https://api.github.com/repos/test_user/webhooks_playground/labels/bug",+ "name": "bug",+ "color": "d73a4a",+ "default": true,+ "description": "Something isn't working"+ },+ {+ "id": 2874042116,+ "node_id": "MDU6TGFiZWwyODc0MDQyMTE2",+ "url": "https://api.github.com/repos/test_user/webhooks_playground/labels/enhancement",+ "name": "enhancement",+ "color": "a2eeef",+ "default": true,+ "description": "New feature or request"+ }+ ],+ "state": "closed",+ "locked": false,+ "assignee": null,+ "assignees": [],+ "milestone": null,+ "comments": 3,+ "created_at": "2021-03-31T23:02:40Z",+ "updated_at": "2021-04-06T15:16:03Z",+ "closed_at": "2021-03-31T23:07:10Z",+ "author_association": "OWNER",+ "active_lock_reason": null,+ "pull_request": {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1",+ "html_url": "https://github.com/test_user/webhooks_playground/pull/1",+ "diff_url": "https://github.com/test_user/webhooks_playground/pull/1.diff",+ "patch_url": "https://github.com/test_user/webhooks_playground/pull/1.patch"+ },+ "body": "",+ "performed_via_github_app": null+ },+ "comment": {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments/814203670",+ "html_url": "https://github.com/test_user/webhooks_playground/pull/1#issuecomment-814203670",+ "issue_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1",+ "id": 814203670,+ "node_id": "MDEyOklzc3VlQ29tbWVudDgxNDIwMzY3MA==",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "created_at": "2021-04-06T15:16:02Z",+ "updated_at": "2021-04-06T15:16:02Z",+ "author_association": "OWNER",+ "body": "${body}",+ "performed_via_github_app": null+ },+ "repository": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T23:08:14Z",+ "pushed_at": "2021-03-31T23:13:18Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 4,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main"+ },+ "sender": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ }+ }+}diff --git a/modules/github_integration/spec/fixtures/github_webhooks/issue_comment/create_not_associated_to_pr.json b/modules/github_integration/spec/fixtures/github_webhooks/issue_comment/create_not_associated_to_pr.jsonnew file mode 100644index 00000000000..4636f96d170--- /dev/null+++ b/modules/github_integration/spec/fixtures/github_webhooks/issue_comment/create_not_associated_to_pr.json@@ -0,0 +1,405 @@+{+ "action": "handle_hook",+ "issue": {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/issues/3",+ "repository_url": "https://api.github.com/repos/test_user/webhooks_playground",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/3/labels{/name}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/3/comments",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/3/events",+ "html_url": "https://github.com/test_user/webhooks_playground/issues/3",+ "id": 851525524,+ "node_id": "MDU6SXNzdWU4NTE1MjU1MjQ=",+ "number": 3,+ "title": "Test Issue",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "labels": [],+ "state": "open",+ "locked": false,+ "assignee": null,+ "assignees": [],+ "milestone": null,+ "comments": 1,+ "created_at": "2021-04-06T15:10:00Z",+ "updated_at": "2021-04-06T15:10:06Z",+ "closed_at": null,+ "author_association": "OWNER",+ "active_lock_reason": null,+ "body": "",+ "performed_via_github_app": null+ },+ "comment": {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments/814199162",+ "html_url": "https://github.com/test_user/webhooks_playground/issues/3#issuecomment-814199162",+ "issue_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/3",+ "id": 814199162,+ "node_id": "MDEyOklzc3VlQ29tbWVudDgxNDE5OTE2Mg==",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "created_at": "2021-04-06T15:10:06Z",+ "updated_at": "2021-04-06T15:10:06Z",+ "author_association": "OWNER",+ "body": "a comment on an issue mentioning ${body}",+ "performed_via_github_app": null+ },+ "repository": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T23:08:14Z",+ "pushed_at": "2021-03-31T23:13:18Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 4,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main"+ },+ "sender": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "key": "fc6766384e75423e9149aa9f399354eac46c09cc236baab7707aaab0d8e15114",+ "controller": "webhooks/incoming/hooks",+ "hook_name": "github",+ "payload": {+ "action": "created",+ "issue": {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/issues/3",+ "repository_url": "https://api.github.com/repos/test_user/webhooks_playground",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/3/labels{/name}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/3/comments",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/3/events",+ "html_url": "https://github.com/test_user/webhooks_playground/issues/3",+ "id": 851525524,+ "node_id": "MDU6SXNzdWU4NTE1MjU1MjQ=",+ "number": 3,+ "title": "Test Issue",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "labels": [],+ "state": "open",+ "locked": false,+ "assignee": null,+ "assignees": [],+ "milestone": null,+ "comments": 1,+ "created_at": "2021-04-06T15:10:00Z",+ "updated_at": "2021-04-06T15:10:06Z",+ "closed_at": null,+ "author_association": "OWNER",+ "active_lock_reason": null,+ "body": "",+ "performed_via_github_app": null+ },+ "comment": {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments/814199162",+ "html_url": "https://github.com/test_user/webhooks_playground/issues/3#issuecomment-814199162",+ "issue_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/3",+ "id": 814199162,+ "node_id": "MDEyOklzc3VlQ29tbWVudDgxNDE5OTE2Mg==",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "created_at": "2021-04-06T15:10:06Z",+ "updated_at": "2021-04-06T15:10:06Z",+ "author_association": "OWNER",+ "body": "a comment on an issue mentioning ${body}",+ "performed_via_github_app": null+ },+ "repository": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T23:08:14Z",+ "pushed_at": "2021-03-31T23:13:18Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 4,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main"+ },+ "sender": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ }+ }+}diff --git a/modules/github_integration/spec/fixtures/github_webhooks/issue_comment/edited.json b/modules/github_integration/spec/fixtures/github_webhooks/issue_comment/edited.jsonnew file mode 100644index 00000000000..3d7a5fd1dbf--- /dev/null+++ b/modules/github_integration/spec/fixtures/github_webhooks/issue_comment/edited.json@@ -0,0 +1,457 @@+{+ "action": "handle_hook",+ "changes": { "body": { "from": "${old_body}" } },+ "issue": {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1",+ "repository_url": "https://api.github.com/repos/test_user/webhooks_playground",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1/labels{/name}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1/comments",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1/events",+ "html_url": "https://github.com/test_user/webhooks_playground/pull/1",+ "id": 847496523,+ "node_id": "MDExOlB1bGxSZXF1ZXN0NjA2NTA4NTY1",+ "number": 1,+ "title": "Added x86_64-linux to known platforms",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "labels": [+ {+ "id": 2874042113,+ "node_id": "MDU6TGFiZWwyODc0MDQyMTEz",+ "url": "https://api.github.com/repos/test_user/webhooks_playground/labels/bug",+ "name": "bug",+ "color": "d73a4a",+ "default": true,+ "description": "Something isn't working"+ },+ {+ "id": 2874042116,+ "node_id": "MDU6TGFiZWwyODc0MDQyMTE2",+ "url": "https://api.github.com/repos/test_user/webhooks_playground/labels/enhancement",+ "name": "enhancement",+ "color": "a2eeef",+ "default": true,+ "description": "New feature or request"+ }+ ],+ "state": "closed",+ "locked": false,+ "assignee": null,+ "assignees": [],+ "milestone": null,+ "comments": 3,+ "created_at": "2021-03-31T23:02:40Z",+ "updated_at": "2021-04-07T14:03:45Z",+ "closed_at": "2021-03-31T23:07:10Z",+ "author_association": "OWNER",+ "active_lock_reason": null,+ "pull_request": {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1",+ "html_url": "https://github.com/test_user/webhooks_playground/pull/1",+ "diff_url": "https://github.com/test_user/webhooks_playground/pull/1.diff",+ "patch_url": "https://github.com/test_user/webhooks_playground/pull/1.patch"+ },+ "body": "",+ "performed_via_github_app": null+ },+ "comment": {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments/814203670",+ "html_url": "https://github.com/test_user/webhooks_playground/pull/1#issuecomment-814203670",+ "issue_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1",+ "id": 814203670,+ "node_id": "MDEyOklzc3VlQ29tbWVudDgxNDIwMzY3MA==",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "created_at": "2021-04-06T15:16:02Z",+ "updated_at": "2021-04-07T14:03:45Z",+ "author_association": "OWNER",+ "body": "${body}",+ "performed_via_github_app": null+ },+ "repository": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T23:08:14Z",+ "pushed_at": "2021-03-31T23:13:18Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 4,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main"+ },+ "sender": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "key": "fc6766384e75423e9149aa9f399354eac46c09cc236baab7707aaab0d8e15114",+ "controller": "webhooks/incoming/hooks",+ "hook_name": "github",+ "payload": {+ "action": "edited",+ "changes": { "body": { "from": "${old_body}" } },+ "issue": {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1",+ "repository_url": "https://api.github.com/repos/test_user/webhooks_playground",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1/labels{/name}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1/comments",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1/events",+ "html_url": "https://github.com/test_user/webhooks_playground/pull/1",+ "id": 847496523,+ "node_id": "MDExOlB1bGxSZXF1ZXN0NjA2NTA4NTY1",+ "number": 1,+ "title": "Added x86_64-linux to known platforms",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "labels": [+ {+ "id": 2874042113,+ "node_id": "MDU6TGFiZWwyODc0MDQyMTEz",+ "url": "https://api.github.com/repos/test_user/webhooks_playground/labels/bug",+ "name": "bug",+ "color": "d73a4a",+ "default": true,+ "description": "Something isn't working"+ },+ {+ "id": 2874042116,+ "node_id": "MDU6TGFiZWwyODc0MDQyMTE2",+ "url": "https://api.github.com/repos/test_user/webhooks_playground/labels/enhancement",+ "name": "enhancement",+ "color": "a2eeef",+ "default": true,+ "description": "New feature or request"+ }+ ],+ "state": "closed",+ "locked": false,+ "assignee": null,+ "assignees": [],+ "milestone": null,+ "comments": 3,+ "created_at": "2021-03-31T23:02:40Z",+ "updated_at": "2021-04-07T14:03:45Z",+ "closed_at": "2021-03-31T23:07:10Z",+ "author_association": "OWNER",+ "active_lock_reason": null,+ "pull_request": {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1",+ "html_url": "https://github.com/test_user/webhooks_playground/pull/1",+ "diff_url": "https://github.com/test_user/webhooks_playground/pull/1.diff",+ "patch_url": "https://github.com/test_user/webhooks_playground/pull/1.patch"+ },+ "body": "",+ "performed_via_github_app": null+ },+ "comment": {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments/814203670",+ "html_url": "https://github.com/test_user/webhooks_playground/pull/1#issuecomment-814203670",+ "issue_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1",+ "id": 814203670,+ "node_id": "MDEyOklzc3VlQ29tbWVudDgxNDIwMzY3MA==",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "created_at": "2021-04-06T15:16:02Z",+ "updated_at": "2021-04-07T14:03:45Z",+ "author_association": "OWNER",+ "body": "${body}",+ "performed_via_github_app": null+ },+ "repository": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T23:08:14Z",+ "pushed_at": "2021-03-31T23:13:18Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 4,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main"+ },+ "sender": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ }+ }+}diff --git a/modules/github_integration/spec/fixtures/github_webhooks/issue_comment/edited_not_associated_to_pr.json b/modules/github_integration/spec/fixtures/github_webhooks/issue_comment/edited_not_associated_to_pr.jsonnew file mode 100644index 00000000000..b5f16309ae2--- /dev/null+++ b/modules/github_integration/spec/fixtures/github_webhooks/issue_comment/edited_not_associated_to_pr.json@@ -0,0 +1,407 @@+{+ "action": "handle_hook",+ "changes": { "body": { "from": "a comment on an issue" } },+ "issue": {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/issues/3",+ "repository_url": "https://api.github.com/repos/test_user/webhooks_playground",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/3/labels{/name}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/3/comments",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/3/events",+ "html_url": "https://github.com/test_user/webhooks_playground/issues/3",+ "id": 851525524,+ "node_id": "MDU6SXNzdWU4NTE1MjU1MjQ=",+ "number": 3,+ "title": "Test Issue",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "labels": [],+ "state": "open",+ "locked": false,+ "assignee": null,+ "assignees": [],+ "milestone": null,+ "comments": 3,+ "created_at": "2021-04-06T15:10:00Z",+ "updated_at": "2021-04-07T14:01:22Z",+ "closed_at": null,+ "author_association": "OWNER",+ "active_lock_reason": null,+ "body": "",+ "performed_via_github_app": null+ },+ "comment": {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments/814199162",+ "html_url": "https://github.com/test_user/webhooks_playground/issues/3#issuecomment-814199162",+ "issue_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/3",+ "id": 814199162,+ "node_id": "MDEyOklzc3VlQ29tbWVudDgxNDE5OTE2Mg==",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "created_at": "2021-04-06T15:10:06Z",+ "updated_at": "2021-04-07T14:01:22Z",+ "author_association": "OWNER",+ "body": "this comment was edited",+ "performed_via_github_app": null+ },+ "repository": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T23:08:14Z",+ "pushed_at": "2021-03-31T23:13:18Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 4,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main"+ },+ "sender": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "key": "fc6766384e75423e9149aa9f399354eac46c09cc236baab7707aaab0d8e15114",+ "controller": "webhooks/incoming/hooks",+ "hook_name": "github",+ "payload": {+ "action": "edited",+ "changes": { "body": { "from": "a comment on an issue" } },+ "issue": {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/issues/3",+ "repository_url": "https://api.github.com/repos/test_user/webhooks_playground",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/3/labels{/name}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/3/comments",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/3/events",+ "html_url": "https://github.com/test_user/webhooks_playground/issues/3",+ "id": 851525524,+ "node_id": "MDU6SXNzdWU4NTE1MjU1MjQ=",+ "number": 3,+ "title": "Test Issue",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "labels": [],+ "state": "open",+ "locked": false,+ "assignee": null,+ "assignees": [],+ "milestone": null,+ "comments": 3,+ "created_at": "2021-04-06T15:10:00Z",+ "updated_at": "2021-04-07T14:01:22Z",+ "closed_at": null,+ "author_association": "OWNER",+ "active_lock_reason": null,+ "body": "",+ "performed_via_github_app": null+ },+ "comment": {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments/814199162",+ "html_url": "https://github.com/test_user/webhooks_playground/issues/3#issuecomment-814199162",+ "issue_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/3",+ "id": 814199162,+ "node_id": "MDEyOklzc3VlQ29tbWVudDgxNDE5OTE2Mg==",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "created_at": "2021-04-06T15:10:06Z",+ "updated_at": "2021-04-07T14:01:22Z",+ "author_association": "OWNER",+ "body": "this comment was edited",+ "performed_via_github_app": null+ },+ "repository": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T23:08:14Z",+ "pushed_at": "2021-03-31T23:13:18Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 4,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main"+ },+ "sender": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ }+ }+}diff --git a/modules/github_integration/spec/fixtures/github_webhooks/ping/ping.json b/modules/github_integration/spec/fixtures/github_webhooks/ping/ping.jsonnew file mode 100644index 00000000000..5aacde075a6--- /dev/null+++ b/modules/github_integration/spec/fixtures/github_webhooks/ping/ping.json@@ -0,0 +1,288 @@+{+ "zen": "Favor focus over features.",+ "hook_id": 289587351,+ "hook": {+ "type": "Repository",+ "id": 289587351,+ "name": "web",+ "active": true,+ "events": ["*"],+ "config": {+ "content_type": "json",+ "insecure_ssl": "0",+ "url": "http://dyndns.test_usernaut.de/webhooks/github?key=12a17eb237b75e3625f4642ce7ecefa8cfd91a619d8bf12dc738415a7bed860a"+ },+ "updated_at": "2021-03-31T23:00:38Z",+ "created_at": "2021-03-31T23:00:38Z",+ "url": "https://api.github.com/repos/test_user/webhooks_playground/hooks/289587351",+ "test_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks/289587351/test",+ "ping_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks/289587351/pings",+ "last_response": { "code": null, "status": "unused", "message": null }+ },+ "repository": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T22:59:44Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 0,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 0,+ "watchers": 0,+ "default_branch": "main"+ },+ "sender": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "key": "12a17eb237b75e3625f4642ce7ecefa8cfd91a619d8bf12dc738415a7bed860a",+ "controller": "webhooks/incoming/hooks",+ "action": "handle_hook",+ "hook_name": "github",+ "payload": {+ "zen": "Favor focus over features.",+ "hook_id": 289587351,+ "hook": {+ "type": "Repository",+ "id": 289587351,+ "name": "web",+ "active": true,+ "events": ["*"],+ "config": {+ "content_type": "json",+ "insecure_ssl": "0",+ "url": "http://dyndns.test_usernaut.de/webhooks/github?key=12a17eb237b75e3625f4642ce7ecefa8cfd91a619d8bf12dc738415a7bed860a"+ },+ "updated_at": "2021-03-31T23:00:38Z",+ "created_at": "2021-03-31T23:00:38Z",+ "url": "https://api.github.com/repos/test_user/webhooks_playground/hooks/289587351",+ "test_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks/289587351/test",+ "ping_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks/289587351/pings",+ "last_response": { "code": null, "status": "unused", "message": null }+ },+ "repository": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T22:59:44Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 0,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 0,+ "watchers": 0,+ "default_branch": "main"+ },+ "sender": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ }+ }+}diff --git a/modules/github_integration/spec/fixtures/github_webhooks/pull_request/closed_merged.json b/modules/github_integration/spec/fixtures/github_webhooks/pull_request/closed_merged.jsonnew file mode 100644index 00000000000..fa935c3ce92--- /dev/null+++ b/modules/github_integration/spec/fixtures/github_webhooks/pull_request/closed_merged.json@@ -0,0 +1,961 @@+{+ "action": "handle_hook",+ "number": 1,+ "pull_request": {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1",+ "id": 606508565,+ "node_id": "MDExOlB1bGxSZXF1ZXN0NjA2NTA4NTY1",+ "html_url": "https://github.com/test_user/webhooks_playground/pull/1",+ "diff_url": "https://github.com/test_user/webhooks_playground/pull/1.diff",+ "patch_url": "https://github.com/test_user/webhooks_playground/pull/1.patch",+ "issue_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1",+ "number": 1,+ "state": "closed",+ "locked": false,+ "title": "${title}",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "body": "${body}",+ "created_at": "2021-03-31T23:02:40Z",+ "updated_at": "2021-03-31T23:07:10Z",+ "closed_at": "2021-03-31T23:07:10Z",+ "merged_at": "2021-03-31T23:07:10Z",+ "merge_commit_sha": "80afec0510ae5acefa701e6747f96d4f41cc6fb9",+ "assignee": null,+ "assignees": [],+ "requested_reviewers": [],+ "requested_teams": [],+ "labels": [],+ "milestone": null,+ "draft": false,+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/commits",+ "review_comments_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/comments",+ "review_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/comments{/number}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1/comments",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/183eada9a2c17ed1465d91e73bc315fe13338274",+ "head": {+ "label": "test_user:add_correct_platform_for_ci",+ "ref": "add_correct_platform_for_ci",+ "sha": "183eada9a2c17ed1465d91e73bc315fe13338274",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "repo": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T23:07:10Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 0,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 0,+ "watchers": 0,+ "default_branch": "main",+ "allow_squash_merge": true,+ "allow_merge_commit": true,+ "allow_rebase_merge": true,+ "delete_branch_on_merge": false+ }+ },+ "base": {+ "label": "test_user:main",+ "ref": "main",+ "sha": "e651d567c82bc263d197a706cc3358a9166f1953",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "repo": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T23:07:10Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 0,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 0,+ "watchers": 0,+ "default_branch": "main",+ "allow_squash_merge": true,+ "allow_merge_commit": true,+ "allow_rebase_merge": true,+ "delete_branch_on_merge": false+ }+ },+ "_links": {+ "self": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1" },+ "html": { "href": "https://github.com/test_user/webhooks_playground/pull/1" },+ "issue": { "href": "https://api.github.com/repos/test_user/webhooks_playground/issues/1" },+ "comments": { "href": "https://api.github.com/repos/test_user/webhooks_playground/issues/1/comments" },+ "review_comments": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/comments" },+ "review_comment": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/comments{/number}" },+ "commits": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/commits" },+ "statuses": {+ "href": "https://api.github.com/repos/test_user/webhooks_playground/statuses/183eada9a2c17ed1465d91e73bc315fe13338274"+ }+ },+ "author_association": "OWNER",+ "auto_merge": null,+ "active_lock_reason": null,+ "merged": true,+ "mergeable": null,+ "rebaseable": null,+ "mergeable_state": "unknown",+ "merged_by": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "comments": 22,+ "review_comments": 33,+ "maintainer_can_modify": false,+ "commits": 3,+ "additions": 123,+ "deletions": 321,+ "changed_files": 12+ },+ "repository": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T23:07:10Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 0,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 0,+ "watchers": 0,+ "default_branch": "main"+ },+ "sender": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "key": "12a17eb237b75e3625f4642ce7ecefa8cfd91a619d8bf12dc738415a7bed860a",+ "controller": "webhooks/incoming/hooks",+ "hook_name": "github",+ "payload": {+ "action": "closed",+ "number": 1,+ "pull_request": {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1",+ "id": 606508565,+ "node_id": "MDExOlB1bGxSZXF1ZXN0NjA2NTA4NTY1",+ "html_url": "https://github.com/test_user/webhooks_playground/pull/1",+ "diff_url": "https://github.com/test_user/webhooks_playground/pull/1.diff",+ "patch_url": "https://github.com/test_user/webhooks_playground/pull/1.patch",+ "issue_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1",+ "number": 1,+ "state": "closed",+ "locked": false,+ "title": "${title}",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "body": "${body}",+ "created_at": "2021-03-31T23:02:40Z",+ "updated_at": "2021-03-31T23:07:10Z",+ "closed_at": "2021-03-31T23:07:10Z",+ "merged_at": "2021-03-31T23:07:10Z",+ "merge_commit_sha": "80afec0510ae5acefa701e6747f96d4f41cc6fb9",+ "assignee": null,+ "assignees": [],+ "requested_reviewers": [],+ "requested_teams": [],+ "labels": [],+ "milestone": null,+ "draft": false,+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/commits",+ "review_comments_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/comments",+ "review_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/comments{/number}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1/comments",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/183eada9a2c17ed1465d91e73bc315fe13338274",+ "head": {+ "label": "test_user:add_correct_platform_for_ci",+ "ref": "add_correct_platform_for_ci",+ "sha": "183eada9a2c17ed1465d91e73bc315fe13338274",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "repo": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T23:07:10Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 0,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 0,+ "watchers": 0,+ "default_branch": "main",+ "allow_squash_merge": true,+ "allow_merge_commit": true,+ "allow_rebase_merge": true,+ "delete_branch_on_merge": false+ }+ },+ "base": {+ "label": "test_user:main",+ "ref": "main",+ "sha": "e651d567c82bc263d197a706cc3358a9166f1953",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "repo": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T23:07:10Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 0,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 0,+ "watchers": 0,+ "default_branch": "main",+ "allow_squash_merge": true,+ "allow_merge_commit": true,+ "allow_rebase_merge": true,+ "delete_branch_on_merge": false+ }+ },+ "_links": {+ "self": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1" },+ "html": { "href": "https://github.com/test_user/webhooks_playground/pull/1" },+ "issue": { "href": "https://api.github.com/repos/test_user/webhooks_playground/issues/1" },+ "comments": { "href": "https://api.github.com/repos/test_user/webhooks_playground/issues/1/comments" },+ "review_comments": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/comments" },+ "review_comment": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/comments{/number}" },+ "commits": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/commits" },+ "statuses": {+ "href": "https://api.github.com/repos/test_user/webhooks_playground/statuses/183eada9a2c17ed1465d91e73bc315fe13338274"+ }+ },+ "author_association": "OWNER",+ "auto_merge": null,+ "active_lock_reason": null,+ "merged": true,+ "mergeable": null,+ "rebaseable": null,+ "mergeable_state": "unknown",+ "merged_by": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "comments": 22,+ "review_comments": 33,+ "maintainer_can_modify": false,+ "commits": 3,+ "additions": 123,+ "deletions": 321,+ "changed_files": 12+ },+ "repository": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T23:07:10Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 0,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 0,+ "watchers": 0,+ "default_branch": "main"+ },+ "sender": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ }+ }+}diff --git a/modules/github_integration/spec/fixtures/github_webhooks/pull_request/closed_no_merge.json b/modules/github_integration/spec/fixtures/github_webhooks/pull_request/closed_no_merge.jsonnew file mode 100644index 00000000000..421ff79fd03--- /dev/null+++ b/modules/github_integration/spec/fixtures/github_webhooks/pull_request/closed_no_merge.json@@ -0,0 +1,923 @@+{+ "action": "handle_hook",+ "number": 1,+ "pull_request": {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2",+ "id": 606520854,+ "node_id": "MDExOlB1bGxSZXF1ZXN0NjA2NTIwODU0",+ "html_url": "https://github.com/test_user/webhooks_playground/pull/2",+ "diff_url": "https://github.com/test_user/webhooks_playground/pull/2.diff",+ "patch_url": "https://github.com/test_user/webhooks_playground/pull/2.patch",+ "issue_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/2",+ "number": 1,+ "state": "closed",+ "locked": false,+ "title": "${title}",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "body": "${body}",+ "created_at": "2021-03-31T23:13:02Z",+ "updated_at": "2021-03-31T23:13:13Z",+ "closed_at": "2021-03-31T23:13:13Z",+ "merged_at": null,+ "merge_commit_sha": "e964ea33ef996d56a93a5633b3e05adc55ab88ff",+ "assignee": null,+ "assignees": [],+ "requested_reviewers": [],+ "requested_teams": [],+ "labels": [],+ "milestone": null,+ "draft": false,+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2/commits",+ "review_comments_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2/comments",+ "review_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/comments{/number}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/2/comments",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/d138eeb97b5abfb136c8a5f24d72982851518e40",+ "head": {+ "label": "test_user:test_user-patch-1",+ "ref": "test_user-patch-1",+ "sha": "d138eeb97b5abfb136c8a5f24d72982851518e40",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "repo": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T23:08:14Z",+ "pushed_at": "2021-03-31T23:13:02Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 0,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 0,+ "watchers": 0,+ "default_branch": "main",+ "allow_squash_merge": true,+ "allow_merge_commit": false,+ "allow_rebase_merge": false,+ "delete_branch_on_merge": true+ }+ },+ "base": {+ "label": "test_user:main",+ "ref": "main",+ "sha": "80afec0510ae5acefa701e6747f96d4f41cc6fb9",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "repo": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T23:08:14Z",+ "pushed_at": "2021-03-31T23:13:02Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 0,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 0,+ "watchers": 0,+ "default_branch": "main",+ "allow_squash_merge": true,+ "allow_merge_commit": false,+ "allow_rebase_merge": false,+ "delete_branch_on_merge": true+ }+ },+ "_links": {+ "self": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2" },+ "html": { "href": "https://github.com/test_user/webhooks_playground/pull/2" },+ "issue": { "href": "https://api.github.com/repos/test_user/webhooks_playground/issues/2" },+ "comments": { "href": "https://api.github.com/repos/test_user/webhooks_playground/issues/2/comments" },+ "review_comments": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2/comments" },+ "review_comment": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/comments{/number}" },+ "commits": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2/commits" },+ "statuses": {+ "href": "https://api.github.com/repos/test_user/webhooks_playground/statuses/d138eeb97b5abfb136c8a5f24d72982851518e40"+ }+ },+ "author_association": "OWNER",+ "auto_merge": null,+ "active_lock_reason": null,+ "merged": false,+ "mergeable": true,+ "rebaseable": false,+ "mergeable_state": "unstable",+ "merged_by": null,+ "comments": 22,+ "review_comments": 33,+ "maintainer_can_modify": false,+ "commits": 1,+ "additions": 123,+ "deletions": 321,+ "changed_files": 12+ },+ "repository": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T23:08:14Z",+ "pushed_at": "2021-03-31T23:13:02Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 0,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 0,+ "watchers": 0,+ "default_branch": "main"+ },+ "sender": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "key": "12a17eb237b75e3625f4642ce7ecefa8cfd91a619d8bf12dc738415a7bed860a",+ "controller": "webhooks/incoming/hooks",+ "hook_name": "github",+ "payload": {+ "action": "closed",+ "number": 1,+ "pull_request": {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2",+ "id": 606520854,+ "node_id": "MDExOlB1bGxSZXF1ZXN0NjA2NTIwODU0",+ "html_url": "https://github.com/test_user/webhooks_playground/pull/2",+ "diff_url": "https://github.com/test_user/webhooks_playground/pull/2.diff",+ "patch_url": "https://github.com/test_user/webhooks_playground/pull/2.patch",+ "issue_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/2",+ "number": 1,+ "state": "closed",+ "locked": false,+ "title": "${title}",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "body": "${body}",+ "created_at": "2021-03-31T23:13:02Z",+ "updated_at": "2021-03-31T23:13:13Z",+ "closed_at": "2021-03-31T23:13:13Z",+ "merged_at": null,+ "merge_commit_sha": "e964ea33ef996d56a93a5633b3e05adc55ab88ff",+ "assignee": null,+ "assignees": [],+ "requested_reviewers": [],+ "requested_teams": [],+ "labels": [],+ "milestone": null,+ "draft": false,+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2/commits",+ "review_comments_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2/comments",+ "review_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/comments{/number}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/2/comments",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/d138eeb97b5abfb136c8a5f24d72982851518e40",+ "head": {+ "label": "test_user:test_user-patch-1",+ "ref": "test_user-patch-1",+ "sha": "d138eeb97b5abfb136c8a5f24d72982851518e40",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "repo": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T23:08:14Z",+ "pushed_at": "2021-03-31T23:13:02Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 0,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 0,+ "watchers": 0,+ "default_branch": "main",+ "allow_squash_merge": true,+ "allow_merge_commit": false,+ "allow_rebase_merge": false,+ "delete_branch_on_merge": true+ }+ },+ "base": {+ "label": "test_user:main",+ "ref": "main",+ "sha": "80afec0510ae5acefa701e6747f96d4f41cc6fb9",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "repo": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T23:08:14Z",+ "pushed_at": "2021-03-31T23:13:02Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 0,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 0,+ "watchers": 0,+ "default_branch": "main",+ "allow_squash_merge": true,+ "allow_merge_commit": false,+ "allow_rebase_merge": false,+ "delete_branch_on_merge": true+ }+ },+ "_links": {+ "self": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2" },+ "html": { "href": "https://github.com/test_user/webhooks_playground/pull/2" },+ "issue": { "href": "https://api.github.com/repos/test_user/webhooks_playground/issues/2" },+ "comments": { "href": "https://api.github.com/repos/test_user/webhooks_playground/issues/2/comments" },+ "review_comments": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2/comments" },+ "review_comment": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/comments{/number}" },+ "commits": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2/commits" },+ "statuses": {+ "href": "https://api.github.com/repos/test_user/webhooks_playground/statuses/d138eeb97b5abfb136c8a5f24d72982851518e40"+ }+ },+ "author_association": "OWNER",+ "auto_merge": null,+ "active_lock_reason": null,+ "merged": false,+ "mergeable": true,+ "rebaseable": false,+ "mergeable_state": "unstable",+ "merged_by": null,+ "comments": 22,+ "review_comments": 33,+ "maintainer_can_modify": false,+ "commits": 1,+ "additions": 123,+ "deletions": 321,+ "changed_files": 12+ },+ "repository": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T23:08:14Z",+ "pushed_at": "2021-03-31T23:13:02Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 0,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 0,+ "watchers": 0,+ "default_branch": "main"+ },+ "sender": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ }+ }+}diff --git a/modules/github_integration/spec/fixtures/github_webhooks/pull_request/converted_to_draft.json b/modules/github_integration/spec/fixtures/github_webhooks/pull_request/converted_to_draft.jsonnew file mode 100644index 00000000000..8dcb9ad43c6--- /dev/null+++ b/modules/github_integration/spec/fixtures/github_webhooks/pull_request/converted_to_draft.json@@ -0,0 +1,923 @@+{+ "action": "handle_hook",+ "number": 1,+ "pull_request": {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1",+ "id": 606508565,+ "node_id": "MDExOlB1bGxSZXF1ZXN0NjA2NTA4NTY1",+ "html_url": "https://github.com/test_user/webhooks_playground/pull/1",+ "diff_url": "https://github.com/test_user/webhooks_playground/pull/1.diff",+ "patch_url": "https://github.com/test_user/webhooks_playground/pull/1.patch",+ "issue_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1",+ "number": 1,+ "state": "open",+ "locked": false,+ "title": "${title}",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "body": "${body}",+ "created_at": "2021-03-31T23:02:40Z",+ "updated_at": "2021-03-31T23:04:34Z",+ "closed_at": null,+ "merged_at": null,+ "merge_commit_sha": "3e118e22d5eb5eaf8da0e1193c501a2e4df0d9d5",+ "assignee": null,+ "assignees": [],+ "requested_reviewers": [],+ "requested_teams": [],+ "labels": [],+ "milestone": null,+ "draft": true,+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/commits",+ "review_comments_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/comments",+ "review_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/comments{/number}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1/comments",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/07a21e0bc6f0dbf2fadbf51146e62a7ec96ec7ae",+ "head": {+ "label": "test_user:add_correct_platform_for_ci",+ "ref": "add_correct_platform_for_ci",+ "sha": "07a21e0bc6f0dbf2fadbf51146e62a7ec96ec7ae",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "repo": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T23:03:39Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main",+ "allow_squash_merge": true,+ "allow_merge_commit": true,+ "allow_rebase_merge": true,+ "delete_branch_on_merge": false+ }+ },+ "base": {+ "label": "test_user:main",+ "ref": "main",+ "sha": "e651d567c82bc263d197a706cc3358a9166f1953",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "repo": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T23:03:39Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main",+ "allow_squash_merge": true,+ "allow_merge_commit": true,+ "allow_rebase_merge": true,+ "delete_branch_on_merge": false+ }+ },+ "_links": {+ "self": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1" },+ "html": { "href": "https://github.com/test_user/webhooks_playground/pull/1" },+ "issue": { "href": "https://api.github.com/repos/test_user/webhooks_playground/issues/1" },+ "comments": { "href": "https://api.github.com/repos/test_user/webhooks_playground/issues/1/comments" },+ "review_comments": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/comments" },+ "review_comment": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/comments{/number}" },+ "commits": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/commits" },+ "statuses": {+ "href": "https://api.github.com/repos/test_user/webhooks_playground/statuses/07a21e0bc6f0dbf2fadbf51146e62a7ec96ec7ae"+ }+ },+ "author_association": "OWNER",+ "auto_merge": null,+ "active_lock_reason": null,+ "merged": false,+ "mergeable": true,+ "rebaseable": true,+ "mergeable_state": "draft",+ "merged_by": null,+ "comments": 22,+ "review_comments": 33,+ "maintainer_can_modify": false,+ "commits": 2,+ "additions": 123,+ "deletions": 321,+ "changed_files": 12+ },+ "repository": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T23:03:39Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main"+ },+ "sender": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "key": "12a17eb237b75e3625f4642ce7ecefa8cfd91a619d8bf12dc738415a7bed860a",+ "controller": "webhooks/incoming/hooks",+ "hook_name": "github",+ "payload": {+ "action": "converted_to_draft",+ "number": 1,+ "pull_request": {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1",+ "id": 606508565,+ "node_id": "MDExOlB1bGxSZXF1ZXN0NjA2NTA4NTY1",+ "html_url": "https://github.com/test_user/webhooks_playground/pull/1",+ "diff_url": "https://github.com/test_user/webhooks_playground/pull/1.diff",+ "patch_url": "https://github.com/test_user/webhooks_playground/pull/1.patch",+ "issue_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1",+ "number": 1,+ "state": "open",+ "locked": false,+ "title": "${title}",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "body": "${body}",+ "created_at": "2021-03-31T23:02:40Z",+ "updated_at": "2021-03-31T23:04:34Z",+ "closed_at": null,+ "merged_at": null,+ "merge_commit_sha": "3e118e22d5eb5eaf8da0e1193c501a2e4df0d9d5",+ "assignee": null,+ "assignees": [],+ "requested_reviewers": [],+ "requested_teams": [],+ "labels": [],+ "milestone": null,+ "draft": true,+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/commits",+ "review_comments_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/comments",+ "review_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/comments{/number}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1/comments",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/07a21e0bc6f0dbf2fadbf51146e62a7ec96ec7ae",+ "head": {+ "label": "test_user:add_correct_platform_for_ci",+ "ref": "add_correct_platform_for_ci",+ "sha": "07a21e0bc6f0dbf2fadbf51146e62a7ec96ec7ae",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "repo": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T23:03:39Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main",+ "allow_squash_merge": true,+ "allow_merge_commit": true,+ "allow_rebase_merge": true,+ "delete_branch_on_merge": false+ }+ },+ "base": {+ "label": "test_user:main",+ "ref": "main",+ "sha": "e651d567c82bc263d197a706cc3358a9166f1953",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "repo": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T23:03:39Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main",+ "allow_squash_merge": true,+ "allow_merge_commit": true,+ "allow_rebase_merge": true,+ "delete_branch_on_merge": false+ }+ },+ "_links": {+ "self": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1" },+ "html": { "href": "https://github.com/test_user/webhooks_playground/pull/1" },+ "issue": { "href": "https://api.github.com/repos/test_user/webhooks_playground/issues/1" },+ "comments": { "href": "https://api.github.com/repos/test_user/webhooks_playground/issues/1/comments" },+ "review_comments": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/comments" },+ "review_comment": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/comments{/number}" },+ "commits": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/commits" },+ "statuses": {+ "href": "https://api.github.com/repos/test_user/webhooks_playground/statuses/07a21e0bc6f0dbf2fadbf51146e62a7ec96ec7ae"+ }+ },+ "author_association": "OWNER",+ "auto_merge": null,+ "active_lock_reason": null,+ "merged": false,+ "mergeable": true,+ "rebaseable": true,+ "mergeable_state": "draft",+ "merged_by": null,+ "comments": 22,+ "review_comments": 33,+ "maintainer_can_modify": false,+ "commits": 2,+ "additions": 123,+ "deletions": 321,+ "changed_files": 12+ },+ "repository": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T23:03:39Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main"+ },+ "sender": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ }+ }+}diff --git a/modules/github_integration/spec/fixtures/github_webhooks/pull_request/edited_body.json b/modules/github_integration/spec/fixtures/github_webhooks/pull_request/edited_body.jsonnew file mode 100644index 00000000000..e651da90583--- /dev/null+++ b/modules/github_integration/spec/fixtures/github_webhooks/pull_request/edited_body.json@@ -0,0 +1,925 @@+{+ "action": "handle_hook",+ "number": 1,+ "pull_request": {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2",+ "id": 606520854,+ "node_id": "MDExOlB1bGxSZXF1ZXN0NjA2NTIwODU0",+ "html_url": "https://github.com/test_user/webhooks_playground/pull/2",+ "diff_url": "https://github.com/test_user/webhooks_playground/pull/2.diff",+ "patch_url": "https://github.com/test_user/webhooks_playground/pull/2.patch",+ "issue_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/2",+ "number": 1,+ "state": "open",+ "locked": false,+ "title": "${title}",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "body": "${body}",+ "created_at": "2021-03-31T23:13:02Z",+ "updated_at": "2021-04-07T14:36:31Z",+ "closed_at": null,+ "merged_at": null,+ "merge_commit_sha": "9e0f3ab2d18b39abe01bd84eeae24e295c2cd3c7",+ "assignee": null,+ "assignees": [],+ "requested_reviewers": [],+ "requested_teams": [],+ "labels": [],+ "milestone": null,+ "draft": false,+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2/commits",+ "review_comments_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2/comments",+ "review_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/comments{/number}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/2/comments",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/d138eeb97b5abfb136c8a5f24d72982851518e40",+ "head": {+ "label": "test_user:test_user-patch-1",+ "ref": "test_user-patch-1",+ "sha": "d138eeb97b5abfb136c8a5f24d72982851518e40",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "repo": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T23:08:14Z",+ "pushed_at": "2021-04-07T14:28:11Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 4,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 2,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 2,+ "watchers": 0,+ "default_branch": "main",+ "allow_squash_merge": true,+ "allow_merge_commit": false,+ "allow_rebase_merge": false,+ "delete_branch_on_merge": true+ }+ },+ "base": {+ "label": "test_user:main",+ "ref": "main",+ "sha": "80afec0510ae5acefa701e6747f96d4f41cc6fb9",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "repo": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T23:08:14Z",+ "pushed_at": "2021-04-07T14:28:11Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 4,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 2,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 2,+ "watchers": 0,+ "default_branch": "main",+ "allow_squash_merge": true,+ "allow_merge_commit": false,+ "allow_rebase_merge": false,+ "delete_branch_on_merge": true+ }+ },+ "_links": {+ "self": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2" },+ "html": { "href": "https://github.com/test_user/webhooks_playground/pull/2" },+ "issue": { "href": "https://api.github.com/repos/test_user/webhooks_playground/issues/2" },+ "comments": { "href": "https://api.github.com/repos/test_user/webhooks_playground/issues/2/comments" },+ "review_comments": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2/comments" },+ "review_comment": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/comments{/number}" },+ "commits": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2/commits" },+ "statuses": {+ "href": "https://api.github.com/repos/test_user/webhooks_playground/statuses/d138eeb97b5abfb136c8a5f24d72982851518e40"+ }+ },+ "author_association": "OWNER",+ "auto_merge": null,+ "active_lock_reason": null,+ "merged": false,+ "mergeable": true,+ "rebaseable": true,+ "mergeable_state": "clean",+ "merged_by": null,+ "comments": 22,+ "review_comments": 33,+ "maintainer_can_modify": false,+ "commits": 1,+ "additions": 123,+ "deletions": 321,+ "changed_files": 12+ },+ "changes": { "body": { "from": "${old_body}" } },+ "repository": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T23:08:14Z",+ "pushed_at": "2021-04-07T14:28:11Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 4,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 2,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 2,+ "watchers": 0,+ "default_branch": "main"+ },+ "sender": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "key": "fc6766384e75423e9149aa9f399354eac46c09cc236baab7707aaab0d8e15114",+ "controller": "webhooks/incoming/hooks",+ "hook_name": "github",+ "payload": {+ "action": "edited",+ "number": 1,+ "pull_request": {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2",+ "id": 606520854,+ "node_id": "MDExOlB1bGxSZXF1ZXN0NjA2NTIwODU0",+ "html_url": "https://github.com/test_user/webhooks_playground/pull/2",+ "diff_url": "https://github.com/test_user/webhooks_playground/pull/2.diff",+ "patch_url": "https://github.com/test_user/webhooks_playground/pull/2.patch",+ "issue_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/2",+ "number": 1,+ "state": "open",+ "locked": false,+ "title": "${title}",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "body": "${body}",+ "created_at": "2021-03-31T23:13:02Z",+ "updated_at": "2021-04-07T14:36:31Z",+ "closed_at": null,+ "merged_at": null,+ "merge_commit_sha": "9e0f3ab2d18b39abe01bd84eeae24e295c2cd3c7",+ "assignee": null,+ "assignees": [],+ "requested_reviewers": [],+ "requested_teams": [],+ "labels": [],+ "milestone": null,+ "draft": false,+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2/commits",+ "review_comments_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2/comments",+ "review_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/comments{/number}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/2/comments",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/d138eeb97b5abfb136c8a5f24d72982851518e40",+ "head": {+ "label": "test_user:test_user-patch-1",+ "ref": "test_user-patch-1",+ "sha": "d138eeb97b5abfb136c8a5f24d72982851518e40",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "repo": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T23:08:14Z",+ "pushed_at": "2021-04-07T14:28:11Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 4,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 2,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 2,+ "watchers": 0,+ "default_branch": "main",+ "allow_squash_merge": true,+ "allow_merge_commit": false,+ "allow_rebase_merge": false,+ "delete_branch_on_merge": true+ }+ },+ "base": {+ "label": "test_user:main",+ "ref": "main",+ "sha": "80afec0510ae5acefa701e6747f96d4f41cc6fb9",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "repo": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T23:08:14Z",+ "pushed_at": "2021-04-07T14:28:11Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 4,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 2,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 2,+ "watchers": 0,+ "default_branch": "main",+ "allow_squash_merge": true,+ "allow_merge_commit": false,+ "allow_rebase_merge": false,+ "delete_branch_on_merge": true+ }+ },+ "_links": {+ "self": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2" },+ "html": { "href": "https://github.com/test_user/webhooks_playground/pull/2" },+ "issue": { "href": "https://api.github.com/repos/test_user/webhooks_playground/issues/2" },+ "comments": { "href": "https://api.github.com/repos/test_user/webhooks_playground/issues/2/comments" },+ "review_comments": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2/comments" },+ "review_comment": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/comments{/number}" },+ "commits": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2/commits" },+ "statuses": {+ "href": "https://api.github.com/repos/test_user/webhooks_playground/statuses/d138eeb97b5abfb136c8a5f24d72982851518e40"+ }+ },+ "author_association": "OWNER",+ "auto_merge": null,+ "active_lock_reason": null,+ "merged": false,+ "mergeable": true,+ "rebaseable": true,+ "mergeable_state": "clean",+ "merged_by": null,+ "comments": 22,+ "review_comments": 33,+ "maintainer_can_modify": false,+ "commits": 1,+ "additions": 123,+ "deletions": 321,+ "changed_files": 12+ },+ "changes": { "body": { "from": "${old_body}" } },+ "repository": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T23:08:14Z",+ "pushed_at": "2021-04-07T14:28:11Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 4,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 2,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 2,+ "watchers": 0,+ "default_branch": "main"+ },+ "sender": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ }+ }+}diff --git a/modules/github_integration/spec/fixtures/github_webhooks/pull_request/edited_title.json b/modules/github_integration/spec/fixtures/github_webhooks/pull_request/edited_title.jsonnew file mode 100644index 00000000000..c5155fff3de--- /dev/null+++ b/modules/github_integration/spec/fixtures/github_webhooks/pull_request/edited_title.json@@ -0,0 +1,925 @@+{+ "action": "handle_hook",+ "number": 1,+ "pull_request": {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1",+ "id": 606508565,+ "node_id": "MDExOlB1bGxSZXF1ZXN0NjA2NTA4NTY1",+ "html_url": "https://github.com/test_user/webhooks_playground/pull/1",+ "diff_url": "https://github.com/test_user/webhooks_playground/pull/1.diff",+ "patch_url": "https://github.com/test_user/webhooks_playground/pull/1.patch",+ "issue_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1",+ "number": 1,+ "state": "open",+ "locked": false,+ "title": "${title}",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "body": "${body}",+ "created_at": "2021-03-31T23:02:40Z",+ "updated_at": "2021-04-06T15:24:09Z",+ "closed_at": null,+ "merged_at": null,+ "merge_commit_sha": "80afec0510ae5acefa701e6747f96d4f41cc6fb9",+ "assignee": null,+ "assignees": [],+ "requested_reviewers": [],+ "requested_teams": [],+ "labels": [],+ "milestone": null,+ "draft": false,+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/commits",+ "review_comments_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/comments",+ "review_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/comments{/number}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1/comments",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/183eada9a2c17ed1465d91e73bc315fe13338274",+ "head": {+ "label": "test_user:add_correct_platform_for_ci",+ "ref": "add_correct_platform_for_ci",+ "sha": "183eada9a2c17ed1465d91e73bc315fe13338274",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "repo": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T23:08:14Z",+ "pushed_at": "2021-03-31T23:13:18Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 4,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main",+ "allow_squash_merge": true,+ "allow_merge_commit": false,+ "allow_rebase_merge": false,+ "delete_branch_on_merge": true+ }+ },+ "base": {+ "label": "test_user:main",+ "ref": "main",+ "sha": "e651d567c82bc263d197a706cc3358a9166f1953",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "repo": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T23:08:14Z",+ "pushed_at": "2021-03-31T23:13:18Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 4,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main",+ "allow_squash_merge": true,+ "allow_merge_commit": false,+ "allow_rebase_merge": false,+ "delete_branch_on_merge": true+ }+ },+ "_links": {+ "self": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1" },+ "html": { "href": "https://github.com/test_user/webhooks_playground/pull/1" },+ "issue": { "href": "https://api.github.com/repos/test_user/webhooks_playground/issues/1" },+ "comments": { "href": "https://api.github.com/repos/test_user/webhooks_playground/issues/1/comments" },+ "review_comments": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/comments" },+ "review_comment": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/comments{/number}" },+ "commits": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/commits" },+ "statuses": {+ "href": "https://api.github.com/repos/test_user/webhooks_playground/statuses/183eada9a2c17ed1465d91e73bc315fe13338274"+ }+ },+ "author_association": "OWNER",+ "auto_merge": null,+ "active_lock_reason": null,+ "merged": false,+ "mergeable": null,+ "rebaseable": null,+ "mergeable_state": "unknown",+ "merged_by": null,+ "comments": 22,+ "review_comments": 33,+ "maintainer_can_modify": false,+ "commits": 3,+ "additions": 123,+ "deletions": 321,+ "changed_files": 12+ },+ "changes": { "title": { "from": "${old_title}" } },+ "repository": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T23:08:14Z",+ "pushed_at": "2021-03-31T23:13:18Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 4,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main"+ },+ "sender": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "key": "fc6766384e75423e9149aa9f399354eac46c09cc236baab7707aaab0d8e15114",+ "controller": "webhooks/incoming/hooks",+ "hook_name": "github",+ "payload": {+ "action": "edited",+ "number": 1,+ "pull_request": {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1",+ "id": 606508565,+ "node_id": "MDExOlB1bGxSZXF1ZXN0NjA2NTA4NTY1",+ "html_url": "https://github.com/test_user/webhooks_playground/pull/1",+ "diff_url": "https://github.com/test_user/webhooks_playground/pull/1.diff",+ "patch_url": "https://github.com/test_user/webhooks_playground/pull/1.patch",+ "issue_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1",+ "number": 1,+ "state": "open",+ "locked": false,+ "title": "${title}",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "body": "${body}",+ "created_at": "2021-03-31T23:02:40Z",+ "updated_at": "2021-04-06T15:24:09Z",+ "closed_at": null,+ "merged_at": null,+ "merge_commit_sha": "80afec0510ae5acefa701e6747f96d4f41cc6fb9",+ "assignee": null,+ "assignees": [],+ "requested_reviewers": [],+ "requested_teams": [],+ "labels": [],+ "milestone": null,+ "draft": false,+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/commits",+ "review_comments_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/comments",+ "review_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/comments{/number}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1/comments",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/183eada9a2c17ed1465d91e73bc315fe13338274",+ "head": {+ "label": "test_user:add_correct_platform_for_ci",+ "ref": "add_correct_platform_for_ci",+ "sha": "183eada9a2c17ed1465d91e73bc315fe13338274",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "repo": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T23:08:14Z",+ "pushed_at": "2021-03-31T23:13:18Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 4,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main",+ "allow_squash_merge": true,+ "allow_merge_commit": false,+ "allow_rebase_merge": false,+ "delete_branch_on_merge": true+ }+ },+ "base": {+ "label": "test_user:main",+ "ref": "main",+ "sha": "e651d567c82bc263d197a706cc3358a9166f1953",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "repo": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T23:08:14Z",+ "pushed_at": "2021-03-31T23:13:18Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 4,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main",+ "allow_squash_merge": true,+ "allow_merge_commit": false,+ "allow_rebase_merge": false,+ "delete_branch_on_merge": true+ }+ },+ "_links": {+ "self": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1" },+ "html": { "href": "https://github.com/test_user/webhooks_playground/pull/1" },+ "issue": { "href": "https://api.github.com/repos/test_user/webhooks_playground/issues/1" },+ "comments": { "href": "https://api.github.com/repos/test_user/webhooks_playground/issues/1/comments" },+ "review_comments": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/comments" },+ "review_comment": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/comments{/number}" },+ "commits": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/commits" },+ "statuses": {+ "href": "https://api.github.com/repos/test_user/webhooks_playground/statuses/183eada9a2c17ed1465d91e73bc315fe13338274"+ }+ },+ "author_association": "OWNER",+ "auto_merge": null,+ "active_lock_reason": null,+ "merged": false,+ "mergeable": null,+ "rebaseable": null,+ "mergeable_state": "unknown",+ "merged_by": null,+ "comments": 22,+ "review_comments": 33,+ "maintainer_can_modify": false,+ "commits": 3,+ "additions": 123,+ "deletions": 321,+ "changed_files": 12+ },+ "changes": { "title": { "from": "${old_title}" } },+ "repository": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T23:08:14Z",+ "pushed_at": "2021-03-31T23:13:18Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 4,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main"+ },+ "sender": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ }+ }+}diff --git a/modules/github_integration/spec/fixtures/github_webhooks/pull_request/labeled.json b/modules/github_integration/spec/fixtures/github_webhooks/pull_request/labeled.jsonnew file mode 100644index 00000000000..f896a96bb37--- /dev/null+++ b/modules/github_integration/spec/fixtures/github_webhooks/pull_request/labeled.json@@ -0,0 +1,979 @@+{+ "action": "handle_hook",+ "number": 1,+ "pull_request": {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1",+ "id": 606508565,+ "node_id": "MDExOlB1bGxSZXF1ZXN0NjA2NTA4NTY1",+ "html_url": "https://github.com/test_user/webhooks_playground/pull/1",+ "diff_url": "https://github.com/test_user/webhooks_playground/pull/1.diff",+ "patch_url": "https://github.com/test_user/webhooks_playground/pull/1.patch",+ "issue_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1",+ "number": 1,+ "state": "open",+ "locked": false,+ "title": "${title}",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "body": "${body}",+ "created_at": "2021-03-31T23:02:40Z",+ "updated_at": "2021-03-31T23:03:59Z",+ "closed_at": null,+ "merged_at": null,+ "merge_commit_sha": "3e118e22d5eb5eaf8da0e1193c501a2e4df0d9d5",+ "assignee": null,+ "assignees": [],+ "requested_reviewers": [],+ "requested_teams": [],+ "labels": [+ {+ "id": 2874042113,+ "node_id": "MDU6TGFiZWwyODc0MDQyMTEz",+ "url": "https://api.github.com/repos/test_user/webhooks_playground/labels/bug",+ "name": "bug",+ "color": "d73a4a",+ "default": true,+ "description": "Something isn't working"+ },+ {+ "id": 2874042116,+ "node_id": "MDU6TGFiZWwyODc0MDQyMTE2",+ "url": "https://api.github.com/repos/test_user/webhooks_playground/labels/enhancement",+ "name": "enhancement",+ "color": "a2eeef",+ "default": true,+ "description": "New feature or request"+ }+ ],+ "milestone": null,+ "draft": false,+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/commits",+ "review_comments_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/comments",+ "review_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/comments{/number}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1/comments",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/07a21e0bc6f0dbf2fadbf51146e62a7ec96ec7ae",+ "head": {+ "label": "test_user:add_correct_platform_for_ci",+ "ref": "add_correct_platform_for_ci",+ "sha": "07a21e0bc6f0dbf2fadbf51146e62a7ec96ec7ae",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "repo": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T23:03:39Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main",+ "allow_squash_merge": true,+ "allow_merge_commit": true,+ "allow_rebase_merge": true,+ "delete_branch_on_merge": false+ }+ },+ "base": {+ "label": "test_user:main",+ "ref": "main",+ "sha": "e651d567c82bc263d197a706cc3358a9166f1953",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "repo": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T23:03:39Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main",+ "allow_squash_merge": true,+ "allow_merge_commit": true,+ "allow_rebase_merge": true,+ "delete_branch_on_merge": false+ }+ },+ "_links": {+ "self": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1" },+ "html": { "href": "https://github.com/test_user/webhooks_playground/pull/1" },+ "issue": { "href": "https://api.github.com/repos/test_user/webhooks_playground/issues/1" },+ "comments": { "href": "https://api.github.com/repos/test_user/webhooks_playground/issues/1/comments" },+ "review_comments": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/comments" },+ "review_comment": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/comments{/number}" },+ "commits": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/commits" },+ "statuses": {+ "href": "https://api.github.com/repos/test_user/webhooks_playground/statuses/07a21e0bc6f0dbf2fadbf51146e62a7ec96ec7ae"+ }+ },+ "author_association": "OWNER",+ "auto_merge": null,+ "active_lock_reason": null,+ "merged": false,+ "mergeable": true,+ "rebaseable": true,+ "mergeable_state": "unstable",+ "merged_by": null,+ "comments": 22,+ "review_comments": 33,+ "maintainer_can_modify": false,+ "commits": 2,+ "additions": 123,+ "deletions": 321,+ "changed_files": 12+ },+ "label": {+ "id": 2874042113,+ "node_id": "MDU6TGFiZWwyODc0MDQyMTEz",+ "url": "https://api.github.com/repos/test_user/webhooks_playground/labels/bug",+ "name": "bug",+ "color": "d73a4a",+ "default": true,+ "description": "Something isn't working"+ },+ "repository": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T23:03:39Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main"+ },+ "sender": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "key": "12a17eb237b75e3625f4642ce7ecefa8cfd91a619d8bf12dc738415a7bed860a",+ "controller": "webhooks/incoming/hooks",+ "hook_name": "github",+ "payload": {+ "action": "labeled",+ "number": 1,+ "pull_request": {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1",+ "id": 606508565,+ "node_id": "MDExOlB1bGxSZXF1ZXN0NjA2NTA4NTY1",+ "html_url": "https://github.com/test_user/webhooks_playground/pull/1",+ "diff_url": "https://github.com/test_user/webhooks_playground/pull/1.diff",+ "patch_url": "https://github.com/test_user/webhooks_playground/pull/1.patch",+ "issue_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1",+ "number": 1,+ "state": "open",+ "locked": false,+ "title": "${title}",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "body": "${body}",+ "created_at": "2021-03-31T23:02:40Z",+ "updated_at": "2021-03-31T23:03:59Z",+ "closed_at": null,+ "merged_at": null,+ "merge_commit_sha": "3e118e22d5eb5eaf8da0e1193c501a2e4df0d9d5",+ "assignee": null,+ "assignees": [],+ "requested_reviewers": [],+ "requested_teams": [],+ "labels": [+ {+ "id": 2874042113,+ "node_id": "MDU6TGFiZWwyODc0MDQyMTEz",+ "url": "https://api.github.com/repos/test_user/webhooks_playground/labels/bug",+ "name": "bug",+ "color": "d73a4a",+ "default": true,+ "description": "Something isn't working"+ },+ {+ "id": 2874042116,+ "node_id": "MDU6TGFiZWwyODc0MDQyMTE2",+ "url": "https://api.github.com/repos/test_user/webhooks_playground/labels/enhancement",+ "name": "enhancement",+ "color": "a2eeef",+ "default": true,+ "description": "New feature or request"+ }+ ],+ "milestone": null,+ "draft": false,+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/commits",+ "review_comments_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/comments",+ "review_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/comments{/number}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1/comments",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/07a21e0bc6f0dbf2fadbf51146e62a7ec96ec7ae",+ "head": {+ "label": "test_user:add_correct_platform_for_ci",+ "ref": "add_correct_platform_for_ci",+ "sha": "07a21e0bc6f0dbf2fadbf51146e62a7ec96ec7ae",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "repo": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T23:03:39Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main",+ "allow_squash_merge": true,+ "allow_merge_commit": true,+ "allow_rebase_merge": true,+ "delete_branch_on_merge": false+ }+ },+ "base": {+ "label": "test_user:main",+ "ref": "main",+ "sha": "e651d567c82bc263d197a706cc3358a9166f1953",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "repo": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T23:03:39Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main",+ "allow_squash_merge": true,+ "allow_merge_commit": true,+ "allow_rebase_merge": true,+ "delete_branch_on_merge": false+ }+ },+ "_links": {+ "self": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1" },+ "html": { "href": "https://github.com/test_user/webhooks_playground/pull/1" },+ "issue": { "href": "https://api.github.com/repos/test_user/webhooks_playground/issues/1" },+ "comments": { "href": "https://api.github.com/repos/test_user/webhooks_playground/issues/1/comments" },+ "review_comments": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/comments" },+ "review_comment": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/comments{/number}" },+ "commits": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/commits" },+ "statuses": {+ "href": "https://api.github.com/repos/test_user/webhooks_playground/statuses/07a21e0bc6f0dbf2fadbf51146e62a7ec96ec7ae"+ }+ },+ "author_association": "OWNER",+ "auto_merge": null,+ "active_lock_reason": null,+ "merged": false,+ "mergeable": true,+ "rebaseable": true,+ "mergeable_state": "unstable",+ "merged_by": null,+ "comments": 22,+ "review_comments": 33,+ "maintainer_can_modify": false,+ "commits": 2,+ "additions": 123,+ "deletions": 321,+ "changed_files": 12+ },+ "label": {+ "id": 2874042113,+ "node_id": "MDU6TGFiZWwyODc0MDQyMTEz",+ "url": "https://api.github.com/repos/test_user/webhooks_playground/labels/bug",+ "name": "bug",+ "color": "d73a4a",+ "default": true,+ "description": "Something isn't working"+ },+ "repository": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T23:03:39Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main"+ },+ "sender": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ }+ }+}diff --git a/modules/github_integration/spec/fixtures/github_webhooks/pull_request/opened.json b/modules/github_integration/spec/fixtures/github_webhooks/pull_request/opened.jsonnew file mode 100644index 00000000000..c942d392ccc--- /dev/null+++ b/modules/github_integration/spec/fixtures/github_webhooks/pull_request/opened.json@@ -0,0 +1,923 @@+{+ "action": "handle_hook",+ "number": 1,+ "pull_request": {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1",+ "id": 606508565,+ "node_id": "MDExOlB1bGxSZXF1ZXN0NjA2NTA4NTY1",+ "html_url": "https://github.com/test_user/webhooks_playground/pull/1",+ "diff_url": "https://github.com/test_user/webhooks_playground/pull/1.diff",+ "patch_url": "https://github.com/test_user/webhooks_playground/pull/1.patch",+ "issue_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1",+ "number": 1,+ "state": "open",+ "locked": false,+ "title": "${title}",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "body": "${body} ",+ "created_at": "2021-03-31T23:02:40Z",+ "updated_at": "2021-03-31T23:02:40Z",+ "closed_at": null,+ "merged_at": null,+ "merge_commit_sha": null,+ "assignee": null,+ "assignees": [],+ "requested_reviewers": [],+ "requested_teams": [],+ "labels": [],+ "milestone": null,+ "draft": false,+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/commits",+ "review_comments_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/comments",+ "review_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/comments{/number}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1/comments",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/be5bc00c5c99607db592d62b4358db3c82356497",+ "head": {+ "label": "test_user:add_correct_platform_for_ci",+ "ref": "add_correct_platform_for_ci",+ "sha": "be5bc00c5c99607db592d62b4358db3c82356497",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "repo": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T23:02:40Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main",+ "allow_squash_merge": true,+ "allow_merge_commit": true,+ "allow_rebase_merge": true,+ "delete_branch_on_merge": false+ }+ },+ "base": {+ "label": "test_user:main",+ "ref": "main",+ "sha": "e651d567c82bc263d197a706cc3358a9166f1953",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "repo": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T23:02:40Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main",+ "allow_squash_merge": true,+ "allow_merge_commit": true,+ "allow_rebase_merge": true,+ "delete_branch_on_merge": false+ }+ },+ "_links": {+ "self": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1" },+ "html": { "href": "https://github.com/test_user/webhooks_playground/pull/1" },+ "issue": { "href": "https://api.github.com/repos/test_user/webhooks_playground/issues/1" },+ "comments": { "href": "https://api.github.com/repos/test_user/webhooks_playground/issues/1/comments" },+ "review_comments": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/comments" },+ "review_comment": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/comments{/number}" },+ "commits": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/commits" },+ "statuses": {+ "href": "https://api.github.com/repos/test_user/webhooks_playground/statuses/be5bc00c5c99607db592d62b4358db3c82356497"+ }+ },+ "author_association": "OWNER",+ "auto_merge": null,+ "active_lock_reason": null,+ "merged": false,+ "mergeable": null,+ "rebaseable": null,+ "mergeable_state": "unknown",+ "merged_by": null,+ "comments": 22,+ "review_comments": 33,+ "maintainer_can_modify": false,+ "commits": 1,+ "additions": 123,+ "deletions": 321,+ "changed_files": 12+ },+ "repository": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T23:02:40Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main"+ },+ "sender": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "key": "12a17eb237b75e3625f4642ce7ecefa8cfd91a619d8bf12dc738415a7bed860a",+ "controller": "webhooks/incoming/hooks",+ "hook_name": "github",+ "payload": {+ "action": "opened",+ "number": 1,+ "pull_request": {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1",+ "id": 606508565,+ "node_id": "MDExOlB1bGxSZXF1ZXN0NjA2NTA4NTY1",+ "html_url": "https://github.com/test_user/webhooks_playground/pull/1",+ "diff_url": "https://github.com/test_user/webhooks_playground/pull/1.diff",+ "patch_url": "https://github.com/test_user/webhooks_playground/pull/1.patch",+ "issue_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1",+ "number": 1,+ "state": "open",+ "locked": false,+ "title": "${title}",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "body": "${body}",+ "created_at": "2021-03-31T23:02:40Z",+ "updated_at": "2021-03-31T23:02:40Z",+ "closed_at": null,+ "merged_at": null,+ "merge_commit_sha": null,+ "assignee": null,+ "assignees": [],+ "requested_reviewers": [],+ "requested_teams": [],+ "labels": [],+ "milestone": null,+ "draft": false,+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/commits",+ "review_comments_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/comments",+ "review_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/comments{/number}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1/comments",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/be5bc00c5c99607db592d62b4358db3c82356497",+ "head": {+ "label": "test_user:add_correct_platform_for_ci",+ "ref": "add_correct_platform_for_ci",+ "sha": "be5bc00c5c99607db592d62b4358db3c82356497",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "repo": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T23:02:40Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main",+ "allow_squash_merge": true,+ "allow_merge_commit": true,+ "allow_rebase_merge": true,+ "delete_branch_on_merge": false+ }+ },+ "base": {+ "label": "test_user:main",+ "ref": "main",+ "sha": "e651d567c82bc263d197a706cc3358a9166f1953",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "repo": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T23:02:40Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main",+ "allow_squash_merge": true,+ "allow_merge_commit": true,+ "allow_rebase_merge": true,+ "delete_branch_on_merge": false+ }+ },+ "_links": {+ "self": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1" },+ "html": { "href": "https://github.com/test_user/webhooks_playground/pull/1" },+ "issue": { "href": "https://api.github.com/repos/test_user/webhooks_playground/issues/1" },+ "comments": { "href": "https://api.github.com/repos/test_user/webhooks_playground/issues/1/comments" },+ "review_comments": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/comments" },+ "review_comment": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/comments{/number}" },+ "commits": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/commits" },+ "statuses": {+ "href": "https://api.github.com/repos/test_user/webhooks_playground/statuses/be5bc00c5c99607db592d62b4358db3c82356497"+ }+ },+ "author_association": "OWNER",+ "auto_merge": null,+ "active_lock_reason": null,+ "merged": false,+ "mergeable": null,+ "rebaseable": null,+ "mergeable_state": "unknown",+ "merged_by": null,+ "comments": 22,+ "review_comments": 33,+ "maintainer_can_modify": false,+ "commits": 1,+ "additions": 123,+ "deletions": 321,+ "changed_files": 12+ },+ "repository": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T23:02:40Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main"+ },+ "sender": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ }+ }+}diff --git a/modules/github_integration/spec/fixtures/github_webhooks/pull_request/opened_draft.json b/modules/github_integration/spec/fixtures/github_webhooks/pull_request/opened_draft.jsonnew file mode 100644index 00000000000..6e6048e59fe--- /dev/null+++ b/modules/github_integration/spec/fixtures/github_webhooks/pull_request/opened_draft.json@@ -0,0 +1,923 @@+{+ "action": "handle_hook",+ "number": 1,+ "pull_request": {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2",+ "id": 606520854,+ "node_id": "MDExOlB1bGxSZXF1ZXN0NjA2NTIwODU0",+ "html_url": "https://github.com/test_user/webhooks_playground/pull/2",+ "diff_url": "https://github.com/test_user/webhooks_playground/pull/2.diff",+ "patch_url": "https://github.com/test_user/webhooks_playground/pull/2.patch",+ "issue_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/2",+ "number": 1,+ "state": "open",+ "locked": false,+ "title": "${title}",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "body": "${body}",+ "created_at": "2021-03-31T23:13:02Z",+ "updated_at": "2021-03-31T23:13:02Z",+ "closed_at": null,+ "merged_at": null,+ "merge_commit_sha": null,+ "assignee": null,+ "assignees": [],+ "requested_reviewers": [],+ "requested_teams": [],+ "labels": [],+ "milestone": null,+ "draft": true,+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2/commits",+ "review_comments_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2/comments",+ "review_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/comments{/number}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/2/comments",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/d138eeb97b5abfb136c8a5f24d72982851518e40",+ "head": {+ "label": "test_user:test_user-patch-1",+ "ref": "test_user-patch-1",+ "sha": "d138eeb97b5abfb136c8a5f24d72982851518e40",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "repo": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T23:08:14Z",+ "pushed_at": "2021-03-31T23:12:57Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main",+ "allow_squash_merge": true,+ "allow_merge_commit": false,+ "allow_rebase_merge": false,+ "delete_branch_on_merge": true+ }+ },+ "base": {+ "label": "test_user:main",+ "ref": "main",+ "sha": "80afec0510ae5acefa701e6747f96d4f41cc6fb9",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "repo": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T23:08:14Z",+ "pushed_at": "2021-03-31T23:12:57Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main",+ "allow_squash_merge": true,+ "allow_merge_commit": false,+ "allow_rebase_merge": false,+ "delete_branch_on_merge": true+ }+ },+ "_links": {+ "self": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2" },+ "html": { "href": "https://github.com/test_user/webhooks_playground/pull/2" },+ "issue": { "href": "https://api.github.com/repos/test_user/webhooks_playground/issues/2" },+ "comments": { "href": "https://api.github.com/repos/test_user/webhooks_playground/issues/2/comments" },+ "review_comments": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2/comments" },+ "review_comment": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/comments{/number}" },+ "commits": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2/commits" },+ "statuses": {+ "href": "https://api.github.com/repos/test_user/webhooks_playground/statuses/d138eeb97b5abfb136c8a5f24d72982851518e40"+ }+ },+ "author_association": "OWNER",+ "auto_merge": null,+ "active_lock_reason": null,+ "merged": false,+ "mergeable": null,+ "rebaseable": null,+ "mergeable_state": "draft",+ "merged_by": null,+ "comments": 22,+ "review_comments": 33,+ "maintainer_can_modify": false,+ "commits": 1,+ "additions": 123,+ "deletions": 321,+ "changed_files": 12+ },+ "repository": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T23:08:14Z",+ "pushed_at": "2021-03-31T23:12:57Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main"+ },+ "sender": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "key": "12a17eb237b75e3625f4642ce7ecefa8cfd91a619d8bf12dc738415a7bed860a",+ "controller": "webhooks/incoming/hooks",+ "hook_name": "github",+ "payload": {+ "action": "opened",+ "number": 1,+ "pull_request": {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2",+ "id": 606520854,+ "node_id": "MDExOlB1bGxSZXF1ZXN0NjA2NTIwODU0",+ "html_url": "https://github.com/test_user/webhooks_playground/pull/2",+ "diff_url": "https://github.com/test_user/webhooks_playground/pull/2.diff",+ "patch_url": "https://github.com/test_user/webhooks_playground/pull/2.patch",+ "issue_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/2",+ "number": 1,+ "state": "open",+ "locked": false,+ "title": "${title}",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "body": "${body}",+ "created_at": "2021-03-31T23:13:02Z",+ "updated_at": "2021-03-31T23:13:02Z",+ "closed_at": null,+ "merged_at": null,+ "merge_commit_sha": null,+ "assignee": null,+ "assignees": [],+ "requested_reviewers": [],+ "requested_teams": [],+ "labels": [],+ "milestone": null,+ "draft": true,+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2/commits",+ "review_comments_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2/comments",+ "review_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/comments{/number}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/2/comments",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/d138eeb97b5abfb136c8a5f24d72982851518e40",+ "head": {+ "label": "test_user:test_user-patch-1",+ "ref": "test_user-patch-1",+ "sha": "d138eeb97b5abfb136c8a5f24d72982851518e40",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "repo": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T23:08:14Z",+ "pushed_at": "2021-03-31T23:12:57Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main",+ "allow_squash_merge": true,+ "allow_merge_commit": false,+ "allow_rebase_merge": false,+ "delete_branch_on_merge": true+ }+ },+ "base": {+ "label": "test_user:main",+ "ref": "main",+ "sha": "80afec0510ae5acefa701e6747f96d4f41cc6fb9",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "repo": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T23:08:14Z",+ "pushed_at": "2021-03-31T23:12:57Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main",+ "allow_squash_merge": true,+ "allow_merge_commit": false,+ "allow_rebase_merge": false,+ "delete_branch_on_merge": true+ }+ },+ "_links": {+ "self": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2" },+ "html": { "href": "https://github.com/test_user/webhooks_playground/pull/2" },+ "issue": { "href": "https://api.github.com/repos/test_user/webhooks_playground/issues/2" },+ "comments": { "href": "https://api.github.com/repos/test_user/webhooks_playground/issues/2/comments" },+ "review_comments": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2/comments" },+ "review_comment": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/comments{/number}" },+ "commits": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2/commits" },+ "statuses": {+ "href": "https://api.github.com/repos/test_user/webhooks_playground/statuses/d138eeb97b5abfb136c8a5f24d72982851518e40"+ }+ },+ "author_association": "OWNER",+ "auto_merge": null,+ "active_lock_reason": null,+ "merged": false,+ "mergeable": null,+ "rebaseable": null,+ "mergeable_state": "draft",+ "merged_by": null,+ "comments": 22,+ "review_comments": 33,+ "maintainer_can_modify": false,+ "commits": 1,+ "additions": 123,+ "deletions": 321,+ "changed_files": 12+ },+ "repository": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T23:08:14Z",+ "pushed_at": "2021-03-31T23:12:57Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main"+ },+ "sender": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ }+ }+}diff --git a/modules/github_integration/spec/fixtures/github_webhooks/pull_request/ready_for_review.json b/modules/github_integration/spec/fixtures/github_webhooks/pull_request/ready_for_review.jsonnew file mode 100644index 00000000000..bc2f138ed54--- /dev/null+++ b/modules/github_integration/spec/fixtures/github_webhooks/pull_request/ready_for_review.json@@ -0,0 +1,923 @@+{+ "action": "handle_hook",+ "number": 1,+ "pull_request": {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1",+ "id": 606508565,+ "node_id": "MDExOlB1bGxSZXF1ZXN0NjA2NTA4NTY1",+ "html_url": "https://github.com/test_user/webhooks_playground/pull/1",+ "diff_url": "https://github.com/test_user/webhooks_playground/pull/1.diff",+ "patch_url": "https://github.com/test_user/webhooks_playground/pull/1.patch",+ "issue_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1",+ "number": 1,+ "state": "open",+ "locked": false,+ "title": "${title}",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "body": "${body}",+ "created_at": "2021-03-31T23:02:40Z",+ "updated_at": "2021-03-31T23:05:36Z",+ "closed_at": null,+ "merged_at": null,+ "merge_commit_sha": "ea7fb347a5772c1a22da204de0a3a38532faf7e9",+ "assignee": null,+ "assignees": [],+ "requested_reviewers": [],+ "requested_teams": [],+ "labels": [],+ "milestone": null,+ "draft": false,+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/commits",+ "review_comments_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/comments",+ "review_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/comments{/number}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1/comments",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/183eada9a2c17ed1465d91e73bc315fe13338274",+ "head": {+ "label": "test_user:add_correct_platform_for_ci",+ "ref": "add_correct_platform_for_ci",+ "sha": "183eada9a2c17ed1465d91e73bc315fe13338274",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "repo": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T23:05:11Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main",+ "allow_squash_merge": true,+ "allow_merge_commit": true,+ "allow_rebase_merge": true,+ "delete_branch_on_merge": false+ }+ },+ "base": {+ "label": "test_user:main",+ "ref": "main",+ "sha": "e651d567c82bc263d197a706cc3358a9166f1953",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "repo": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T23:05:11Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main",+ "allow_squash_merge": true,+ "allow_merge_commit": true,+ "allow_rebase_merge": true,+ "delete_branch_on_merge": false+ }+ },+ "_links": {+ "self": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1" },+ "html": { "href": "https://github.com/test_user/webhooks_playground/pull/1" },+ "issue": { "href": "https://api.github.com/repos/test_user/webhooks_playground/issues/1" },+ "comments": { "href": "https://api.github.com/repos/test_user/webhooks_playground/issues/1/comments" },+ "review_comments": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/comments" },+ "review_comment": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/comments{/number}" },+ "commits": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/commits" },+ "statuses": {+ "href": "https://api.github.com/repos/test_user/webhooks_playground/statuses/183eada9a2c17ed1465d91e73bc315fe13338274"+ }+ },+ "author_association": "OWNER",+ "auto_merge": null,+ "active_lock_reason": null,+ "merged": false,+ "mergeable": true,+ "rebaseable": true,+ "mergeable_state": "clean",+ "merged_by": null,+ "comments": 22,+ "review_comments": 33,+ "maintainer_can_modify": false,+ "commits": 3,+ "additions": 123,+ "deletions": 321,+ "changed_files": 12+ },+ "repository": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T23:05:11Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main"+ },+ "sender": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "key": "12a17eb237b75e3625f4642ce7ecefa8cfd91a619d8bf12dc738415a7bed860a",+ "controller": "webhooks/incoming/hooks",+ "hook_name": "github",+ "payload": {+ "action": "ready_for_review",+ "number": 1,+ "pull_request": {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1",+ "id": 606508565,+ "node_id": "MDExOlB1bGxSZXF1ZXN0NjA2NTA4NTY1",+ "html_url": "https://github.com/test_user/webhooks_playground/pull/1",+ "diff_url": "https://github.com/test_user/webhooks_playground/pull/1.diff",+ "patch_url": "https://github.com/test_user/webhooks_playground/pull/1.patch",+ "issue_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1",+ "number": 1,+ "state": "open",+ "locked": false,+ "title": "${title}",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "body": "${body}",+ "created_at": "2021-03-31T23:02:40Z",+ "updated_at": "2021-03-31T23:05:36Z",+ "closed_at": null,+ "merged_at": null,+ "merge_commit_sha": "ea7fb347a5772c1a22da204de0a3a38532faf7e9",+ "assignee": null,+ "assignees": [],+ "requested_reviewers": [],+ "requested_teams": [],+ "labels": [],+ "milestone": null,+ "draft": false,+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/commits",+ "review_comments_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/comments",+ "review_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/comments{/number}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1/comments",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/183eada9a2c17ed1465d91e73bc315fe13338274",+ "head": {+ "label": "test_user:add_correct_platform_for_ci",+ "ref": "add_correct_platform_for_ci",+ "sha": "183eada9a2c17ed1465d91e73bc315fe13338274",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "repo": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T23:05:11Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main",+ "allow_squash_merge": true,+ "allow_merge_commit": true,+ "allow_rebase_merge": true,+ "delete_branch_on_merge": false+ }+ },+ "base": {+ "label": "test_user:main",+ "ref": "main",+ "sha": "e651d567c82bc263d197a706cc3358a9166f1953",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "repo": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T23:05:11Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main",+ "allow_squash_merge": true,+ "allow_merge_commit": true,+ "allow_rebase_merge": true,+ "delete_branch_on_merge": false+ }+ },+ "_links": {+ "self": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1" },+ "html": { "href": "https://github.com/test_user/webhooks_playground/pull/1" },+ "issue": { "href": "https://api.github.com/repos/test_user/webhooks_playground/issues/1" },+ "comments": { "href": "https://api.github.com/repos/test_user/webhooks_playground/issues/1/comments" },+ "review_comments": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/comments" },+ "review_comment": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/comments{/number}" },+ "commits": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/commits" },+ "statuses": {+ "href": "https://api.github.com/repos/test_user/webhooks_playground/statuses/183eada9a2c17ed1465d91e73bc315fe13338274"+ }+ },+ "author_association": "OWNER",+ "auto_merge": null,+ "active_lock_reason": null,+ "merged": false,+ "mergeable": true,+ "rebaseable": true,+ "mergeable_state": "clean",+ "merged_by": null,+ "comments": 22,+ "review_comments": 33,+ "maintainer_can_modify": false,+ "commits": 3,+ "additions": 123,+ "deletions": 321,+ "changed_files": 12+ },+ "repository": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T23:05:11Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main"+ },+ "sender": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ }+ }+}diff --git a/modules/github_integration/spec/fixtures/github_webhooks/pull_request/reopened.json b/modules/github_integration/spec/fixtures/github_webhooks/pull_request/reopened.jsonnew file mode 100644index 00000000000..83ab23e2b79--- /dev/null+++ b/modules/github_integration/spec/fixtures/github_webhooks/pull_request/reopened.json@@ -0,0 +1,923 @@+{+ "action": "handle_hook",+ "number": 1,+ "pull_request": {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2",+ "id": 606520854,+ "node_id": "MDExOlB1bGxSZXF1ZXN0NjA2NTIwODU0",+ "html_url": "https://github.com/test_user/webhooks_playground/pull/2",+ "diff_url": "https://github.com/test_user/webhooks_playground/pull/2.diff",+ "patch_url": "https://github.com/test_user/webhooks_playground/pull/2.patch",+ "issue_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/2",+ "number": 1,+ "state": "open",+ "locked": false,+ "title": "${title}",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "body": "${body}",+ "created_at": "2021-03-31T23:13:02Z",+ "updated_at": "2021-04-07T14:28:15Z",+ "closed_at": null,+ "merged_at": null,+ "merge_commit_sha": "e964ea33ef996d56a93a5633b3e05adc55ab88ff",+ "assignee": null,+ "assignees": [],+ "requested_reviewers": [],+ "requested_teams": [],+ "labels": [],+ "milestone": null,+ "draft": false,+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2/commits",+ "review_comments_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2/comments",+ "review_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/comments{/number}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/2/comments",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/d138eeb97b5abfb136c8a5f24d72982851518e40",+ "head": {+ "label": "test_user:test_user-patch-1",+ "ref": "test_user-patch-1",+ "sha": "d138eeb97b5abfb136c8a5f24d72982851518e40",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "repo": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T23:08:14Z",+ "pushed_at": "2021-04-07T14:28:11Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 4,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 2,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 2,+ "watchers": 0,+ "default_branch": "main",+ "allow_squash_merge": true,+ "allow_merge_commit": false,+ "allow_rebase_merge": false,+ "delete_branch_on_merge": true+ }+ },+ "base": {+ "label": "test_user:main",+ "ref": "main",+ "sha": "80afec0510ae5acefa701e6747f96d4f41cc6fb9",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "repo": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T23:08:14Z",+ "pushed_at": "2021-04-07T14:28:11Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 4,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 2,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 2,+ "watchers": 0,+ "default_branch": "main",+ "allow_squash_merge": true,+ "allow_merge_commit": false,+ "allow_rebase_merge": false,+ "delete_branch_on_merge": true+ }+ },+ "_links": {+ "self": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2" },+ "html": { "href": "https://github.com/test_user/webhooks_playground/pull/2" },+ "issue": { "href": "https://api.github.com/repos/test_user/webhooks_playground/issues/2" },+ "comments": { "href": "https://api.github.com/repos/test_user/webhooks_playground/issues/2/comments" },+ "review_comments": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2/comments" },+ "review_comment": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/comments{/number}" },+ "commits": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2/commits" },+ "statuses": {+ "href": "https://api.github.com/repos/test_user/webhooks_playground/statuses/d138eeb97b5abfb136c8a5f24d72982851518e40"+ }+ },+ "author_association": "OWNER",+ "auto_merge": null,+ "active_lock_reason": null,+ "merged": false,+ "mergeable": null,+ "rebaseable": null,+ "mergeable_state": "unknown",+ "merged_by": null,+ "comments": 22,+ "review_comments": 33,+ "maintainer_can_modify": false,+ "commits": 1,+ "additions": 123,+ "deletions": 321,+ "changed_files": 12+ },+ "repository": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T23:08:14Z",+ "pushed_at": "2021-04-07T14:28:11Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 4,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 2,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 2,+ "watchers": 0,+ "default_branch": "main"+ },+ "sender": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "key": "fc6766384e75423e9149aa9f399354eac46c09cc236baab7707aaab0d8e15114",+ "controller": "webhooks/incoming/hooks",+ "hook_name": "github",+ "payload": {+ "action": "reopened",+ "number": 1,+ "pull_request": {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2",+ "id": 606520854,+ "node_id": "MDExOlB1bGxSZXF1ZXN0NjA2NTIwODU0",+ "html_url": "https://github.com/test_user/webhooks_playground/pull/2",+ "diff_url": "https://github.com/test_user/webhooks_playground/pull/2.diff",+ "patch_url": "https://github.com/test_user/webhooks_playground/pull/2.patch",+ "issue_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/2",+ "number": 1,+ "state": "open",+ "locked": false,+ "title": "${title}",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "body": "${body}",+ "created_at": "2021-03-31T23:13:02Z",+ "updated_at": "2021-04-07T14:28:15Z",+ "closed_at": null,+ "merged_at": null,+ "merge_commit_sha": "e964ea33ef996d56a93a5633b3e05adc55ab88ff",+ "assignee": null,+ "assignees": [],+ "requested_reviewers": [],+ "requested_teams": [],+ "labels": [],+ "milestone": null,+ "draft": false,+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2/commits",+ "review_comments_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2/comments",+ "review_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/comments{/number}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/2/comments",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/d138eeb97b5abfb136c8a5f24d72982851518e40",+ "head": {+ "label": "test_user:test_user-patch-1",+ "ref": "test_user-patch-1",+ "sha": "d138eeb97b5abfb136c8a5f24d72982851518e40",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "repo": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T23:08:14Z",+ "pushed_at": "2021-04-07T14:28:11Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 4,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 2,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 2,+ "watchers": 0,+ "default_branch": "main",+ "allow_squash_merge": true,+ "allow_merge_commit": false,+ "allow_rebase_merge": false,+ "delete_branch_on_merge": true+ }+ },+ "base": {+ "label": "test_user:main",+ "ref": "main",+ "sha": "80afec0510ae5acefa701e6747f96d4f41cc6fb9",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "repo": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T23:08:14Z",+ "pushed_at": "2021-04-07T14:28:11Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 4,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 2,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 2,+ "watchers": 0,+ "default_branch": "main",+ "allow_squash_merge": true,+ "allow_merge_commit": false,+ "allow_rebase_merge": false,+ "delete_branch_on_merge": true+ }+ },+ "_links": {+ "self": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2" },+ "html": { "href": "https://github.com/test_user/webhooks_playground/pull/2" },+ "issue": { "href": "https://api.github.com/repos/test_user/webhooks_playground/issues/2" },+ "comments": { "href": "https://api.github.com/repos/test_user/webhooks_playground/issues/2/comments" },+ "review_comments": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2/comments" },+ "review_comment": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/comments{/number}" },+ "commits": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/2/commits" },+ "statuses": {+ "href": "https://api.github.com/repos/test_user/webhooks_playground/statuses/d138eeb97b5abfb136c8a5f24d72982851518e40"+ }+ },+ "author_association": "OWNER",+ "auto_merge": null,+ "active_lock_reason": null,+ "merged": false,+ "mergeable": null,+ "rebaseable": null,+ "mergeable_state": "unknown",+ "merged_by": null,+ "comments": 22,+ "review_comments": 33,+ "maintainer_can_modify": false,+ "commits": 1,+ "additions": 123,+ "deletions": 321,+ "changed_files": 12+ },+ "repository": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T23:08:14Z",+ "pushed_at": "2021-04-07T14:28:11Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 4,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 2,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 2,+ "watchers": 0,+ "default_branch": "main"+ },+ "sender": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ }+ }+}diff --git a/modules/github_integration/spec/fixtures/github_webhooks/pull_request/synchronize.json b/modules/github_integration/spec/fixtures/github_webhooks/pull_request/synchronize.jsonnew file mode 100644index 00000000000..5ce8720f3b4--- /dev/null+++ b/modules/github_integration/spec/fixtures/github_webhooks/pull_request/synchronize.json@@ -0,0 +1,927 @@+{+ "action": "handle_hook",+ "number": 1,+ "pull_request": {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1",+ "id": 606508565,+ "node_id": "MDExOlB1bGxSZXF1ZXN0NjA2NTA4NTY1",+ "html_url": "https://github.com/test_user/webhooks_playground/pull/1",+ "diff_url": "https://github.com/test_user/webhooks_playground/pull/1.diff",+ "patch_url": "https://github.com/test_user/webhooks_playground/pull/1.patch",+ "issue_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1",+ "number": 1,+ "state": "open",+ "locked": false,+ "title": "${title}",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "body": "${body}",+ "created_at": "2021-03-31T23:02:40Z",+ "updated_at": "2021-03-31T23:03:39Z",+ "closed_at": null,+ "merged_at": null,+ "merge_commit_sha": "f9472a1da4d9e80fb0e3a0137044c48f4c38a3ca",+ "assignee": null,+ "assignees": [],+ "requested_reviewers": [],+ "requested_teams": [],+ "labels": [],+ "milestone": null,+ "draft": false,+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/commits",+ "review_comments_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/comments",+ "review_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/comments{/number}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1/comments",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/07a21e0bc6f0dbf2fadbf51146e62a7ec96ec7ae",+ "head": {+ "label": "test_user:add_correct_platform_for_ci",+ "ref": "add_correct_platform_for_ci",+ "sha": "07a21e0bc6f0dbf2fadbf51146e62a7ec96ec7ae",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "repo": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T23:03:38Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main",+ "allow_squash_merge": true,+ "allow_merge_commit": true,+ "allow_rebase_merge": true,+ "delete_branch_on_merge": false+ }+ },+ "base": {+ "label": "test_user:main",+ "ref": "main",+ "sha": "e651d567c82bc263d197a706cc3358a9166f1953",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "repo": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T23:03:38Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main",+ "allow_squash_merge": true,+ "allow_merge_commit": true,+ "allow_rebase_merge": true,+ "delete_branch_on_merge": false+ }+ },+ "_links": {+ "self": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1" },+ "html": { "href": "https://github.com/test_user/webhooks_playground/pull/1" },+ "issue": { "href": "https://api.github.com/repos/test_user/webhooks_playground/issues/1" },+ "comments": { "href": "https://api.github.com/repos/test_user/webhooks_playground/issues/1/comments" },+ "review_comments": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/comments" },+ "review_comment": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/comments{/number}" },+ "commits": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/commits" },+ "statuses": {+ "href": "https://api.github.com/repos/test_user/webhooks_playground/statuses/07a21e0bc6f0dbf2fadbf51146e62a7ec96ec7ae"+ }+ },+ "author_association": "OWNER",+ "auto_merge": null,+ "active_lock_reason": null,+ "merged": false,+ "mergeable": null,+ "rebaseable": null,+ "mergeable_state": "unknown",+ "merged_by": null,+ "comments": 22,+ "review_comments": 33,+ "maintainer_can_modify": false,+ "commits": 2,+ "additions": 123,+ "deletions": 321,+ "changed_files": 12+ },+ "before": "be5bc00c5c99607db592d62b4358db3c82356497",+ "after": "07a21e0bc6f0dbf2fadbf51146e62a7ec96ec7ae",+ "repository": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T23:03:38Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main"+ },+ "sender": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "key": "12a17eb237b75e3625f4642ce7ecefa8cfd91a619d8bf12dc738415a7bed860a",+ "controller": "webhooks/incoming/hooks",+ "hook_name": "github",+ "payload": {+ "action": "synchronize",+ "number": 1,+ "pull_request": {+ "url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1",+ "id": 606508565,+ "node_id": "MDExOlB1bGxSZXF1ZXN0NjA2NTA4NTY1",+ "html_url": "https://github.com/test_user/webhooks_playground/pull/1",+ "diff_url": "https://github.com/test_user/webhooks_playground/pull/1.diff",+ "patch_url": "https://github.com/test_user/webhooks_playground/pull/1.patch",+ "issue_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1",+ "number": 1,+ "state": "open",+ "locked": false,+ "title": "${title}",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "body": "${body}",+ "created_at": "2021-03-31T23:02:40Z",+ "updated_at": "2021-03-31T23:03:39Z",+ "closed_at": null,+ "merged_at": null,+ "merge_commit_sha": "f9472a1da4d9e80fb0e3a0137044c48f4c38a3ca",+ "assignee": null,+ "assignees": [],+ "requested_reviewers": [],+ "requested_teams": [],+ "labels": [],+ "milestone": null,+ "draft": false,+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/commits",+ "review_comments_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/comments",+ "review_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls/comments{/number}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/1/comments",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/07a21e0bc6f0dbf2fadbf51146e62a7ec96ec7ae",+ "head": {+ "label": "test_user:add_correct_platform_for_ci",+ "ref": "add_correct_platform_for_ci",+ "sha": "07a21e0bc6f0dbf2fadbf51146e62a7ec96ec7ae",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "repo": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T23:03:38Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main",+ "allow_squash_merge": true,+ "allow_merge_commit": true,+ "allow_rebase_merge": true,+ "delete_branch_on_merge": false+ }+ },+ "base": {+ "label": "test_user:main",+ "ref": "main",+ "sha": "e651d567c82bc263d197a706cc3358a9166f1953",+ "user": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "repo": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T23:03:38Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main",+ "allow_squash_merge": true,+ "allow_merge_commit": true,+ "allow_rebase_merge": true,+ "delete_branch_on_merge": false+ }+ },+ "_links": {+ "self": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1" },+ "html": { "href": "https://github.com/test_user/webhooks_playground/pull/1" },+ "issue": { "href": "https://api.github.com/repos/test_user/webhooks_playground/issues/1" },+ "comments": { "href": "https://api.github.com/repos/test_user/webhooks_playground/issues/1/comments" },+ "review_comments": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/comments" },+ "review_comment": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/comments{/number}" },+ "commits": { "href": "https://api.github.com/repos/test_user/webhooks_playground/pulls/1/commits" },+ "statuses": {+ "href": "https://api.github.com/repos/test_user/webhooks_playground/statuses/07a21e0bc6f0dbf2fadbf51146e62a7ec96ec7ae"+ }+ },+ "author_association": "OWNER",+ "auto_merge": null,+ "active_lock_reason": null,+ "merged": false,+ "mergeable": null,+ "rebaseable": null,+ "mergeable_state": "unknown",+ "merged_by": null,+ "comments": 22,+ "review_comments": 33,+ "maintainer_can_modify": false,+ "commits": 2,+ "additions": 123,+ "deletions": 321,+ "changed_files": 12+ },+ "before": "be5bc00c5c99607db592d62b4358db3c82356497",+ "after": "07a21e0bc6f0dbf2fadbf51146e62a7ec96ec7ae",+ "repository": {+ "id": 353509696,+ "node_id": "MDEwOlJlcG9zaXRvcnkzNTM1MDk2OTY=",+ "name": "webhooks_playground",+ "full_name": "test_user/webhooks_playground",+ "private": false,+ "owner": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ },+ "html_url": "https://github.com/test_user/webhooks_playground",+ "description": "a toy repo to play with GH webhooks",+ "fork": false,+ "url": "https://api.github.com/repos/test_user/webhooks_playground",+ "forks_url": "https://api.github.com/repos/test_user/webhooks_playground/forks",+ "keys_url": "https://api.github.com/repos/test_user/webhooks_playground/keys{/key_id}",+ "collaborators_url": "https://api.github.com/repos/test_user/webhooks_playground/collaborators{/collaborator}",+ "teams_url": "https://api.github.com/repos/test_user/webhooks_playground/teams",+ "hooks_url": "https://api.github.com/repos/test_user/webhooks_playground/hooks",+ "issue_events_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/events{/number}",+ "events_url": "https://api.github.com/repos/test_user/webhooks_playground/events",+ "assignees_url": "https://api.github.com/repos/test_user/webhooks_playground/assignees{/user}",+ "branches_url": "https://api.github.com/repos/test_user/webhooks_playground/branches{/branch}",+ "tags_url": "https://api.github.com/repos/test_user/webhooks_playground/tags",+ "blobs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/blobs{/sha}",+ "git_tags_url": "https://api.github.com/repos/test_user/webhooks_playground/git/tags{/sha}",+ "git_refs_url": "https://api.github.com/repos/test_user/webhooks_playground/git/refs{/sha}",+ "trees_url": "https://api.github.com/repos/test_user/webhooks_playground/git/trees{/sha}",+ "statuses_url": "https://api.github.com/repos/test_user/webhooks_playground/statuses/{sha}",+ "languages_url": "https://api.github.com/repos/test_user/webhooks_playground/languages",+ "stargazers_url": "https://api.github.com/repos/test_user/webhooks_playground/stargazers",+ "contributors_url": "https://api.github.com/repos/test_user/webhooks_playground/contributors",+ "subscribers_url": "https://api.github.com/repos/test_user/webhooks_playground/subscribers",+ "subscription_url": "https://api.github.com/repos/test_user/webhooks_playground/subscription",+ "commits_url": "https://api.github.com/repos/test_user/webhooks_playground/commits{/sha}",+ "git_commits_url": "https://api.github.com/repos/test_user/webhooks_playground/git/commits{/sha}",+ "comments_url": "https://api.github.com/repos/test_user/webhooks_playground/comments{/number}",+ "issue_comment_url": "https://api.github.com/repos/test_user/webhooks_playground/issues/comments{/number}",+ "contents_url": "https://api.github.com/repos/test_user/webhooks_playground/contents/{+path}",+ "compare_url": "https://api.github.com/repos/test_user/webhooks_playground/compare/{base}...{head}",+ "merges_url": "https://api.github.com/repos/test_user/webhooks_playground/merges",+ "archive_url": "https://api.github.com/repos/test_user/webhooks_playground/{archive_format}{/ref}",+ "downloads_url": "https://api.github.com/repos/test_user/webhooks_playground/downloads",+ "issues_url": "https://api.github.com/repos/test_user/webhooks_playground/issues{/number}",+ "pulls_url": "https://api.github.com/repos/test_user/webhooks_playground/pulls{/number}",+ "milestones_url": "https://api.github.com/repos/test_user/webhooks_playground/milestones{/number}",+ "notifications_url": "https://api.github.com/repos/test_user/webhooks_playground/notifications{?since,all,participating}",+ "labels_url": "https://api.github.com/repos/test_user/webhooks_playground/labels{/name}",+ "releases_url": "https://api.github.com/repos/test_user/webhooks_playground/releases{/id}",+ "deployments_url": "https://api.github.com/repos/test_user/webhooks_playground/deployments",+ "created_at": "2021-03-31T22:46:08Z",+ "updated_at": "2021-03-31T22:59:47Z",+ "pushed_at": "2021-03-31T23:03:38Z",+ "git_url": "git://github.com/test_user/webhooks_playground.git",+ "ssh_url": "[email protected]:test_user/webhooks_playground.git",+ "clone_url": "https://github.com/test_user/webhooks_playground.git",+ "svn_url": "https://github.com/test_user/webhooks_playground",+ "homepage": null,+ "size": 0,+ "stargazers_count": 0,+ "watchers_count": 0,+ "language": "Ruby",+ "has_issues": true,+ "has_projects": true,+ "has_downloads": true,+ "has_wiki": true,+ "has_pages": false,+ "forks_count": 0,+ "mirror_url": null,+ "archived": false,+ "disabled": false,+ "open_issues_count": 1,+ "license": {+ "key": "mit",+ "name": "MIT License",+ "spdx_id": "MIT",+ "url": "https://api.github.com/licenses/mit",+ "node_id": "MDc6TGljZW5zZTEz"+ },+ "forks": 0,+ "open_issues": 1,+ "watchers": 0,+ "default_branch": "main"+ },+ "sender": {+ "login": "test_user",+ "id": 206108,+ "node_id": "MDQ6VXNlcjIwNjEwOA==",+ "avatar_url": "https://avatars.githubusercontent.com/u/206108?v=4",+ "gravatar_id": "",+ "url": "https://api.github.com/users/test_user",+ "html_url": "https://github.com/test_user",+ "followers_url": "https://api.github.com/users/test_user/followers",+ "following_url": "https://api.github.com/users/test_user/following{/other_user}",+ "gists_url": "https://api.github.com/users/test_user/gists{/gist_id}",+ "starred_url": "https://api.github.com/users/test_user/starred{/owner}{/repo}",+ "subscriptions_url": "https://api.github.com/users/test_user/subscriptions",+ "organizations_url": "https://api.github.com/users/test_user/orgs",+ "repos_url": "https://api.github.com/users/test_user/repos",+ "events_url": "https://api.github.com/users/test_user/events{/privacy}",+ "received_events_url": "https://api.github.com/users/test_user/received_events",+ "type": "User",+ "site_admin": false+ }+ }+}diff --git a/modules/github_integration/spec/lib/api/v3/github_pull_requests/github_check_run_representer_spec.rb b/modules/github_integration/spec/lib/api/v3/github_pull_requests/github_check_run_representer_spec.rbnew file mode 100644index 00000000000..9567bbc85a7--- /dev/null+++ b/modules/github_integration/spec/lib/api/v3/github_pull_requests/github_check_run_representer_spec.rb@@ -0,0 +1,131 @@+#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2021 the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See docs/COPYRIGHT.rdoc for more details.+#++++require 'spec_helper'++describe ::API::V3::GithubPullRequests::GithubCheckRunRepresenter do+ include ::API::V3::Utilities::PathHelper++ subject(:generated) { representer.to_json }++ let(:check_run) { FactoryBot.build_stubbed(:github_check_run) }+ let(:representer) { described_class.create(check_run, current_user: user) }+ let(:user) { FactoryBot.build_stubbed(:admin) }++ it { is_expected.to include_json('GithubCheckRun'.to_json).at_path('_type') }++ describe 'properties' do+ it_behaves_like 'property', :_type do+ let(:value) { 'GithubCheckRun' }+ end++ it_behaves_like 'property', :htmlUrl do+ let(:value) { check_run.github_html_url }+ end++ it_behaves_like 'property', :appOwnerAvatarUrl do+ let(:value) { check_run.github_app_owner_avatar_url }+ end++ it_behaves_like 'property', :name do+ let(:value) { check_run.name }+ end++ it_behaves_like 'property', :status do+ let(:value) { check_run.status }+ end++ it_behaves_like 'property', :conclusion do+ let(:value) { check_run.conclusion }+ end++ it_behaves_like 'property', :outputTitle do+ let(:value) { check_run.output_title }+ end++ it_behaves_like 'property', :outputSummary do+ let(:value) { check_run.output_summary }+ end++ it_behaves_like 'property', :detailsUrl do+ let(:value) { check_run.details_url }+ end++ it_behaves_like 'has UTC ISO 8601 date and time' do+ let(:date) { check_run.started_at }+ let(:json_path) { 'startedAt' }+ end++ it_behaves_like 'has UTC ISO 8601 date and time' do+ let(:date) { check_run.completed_at }+ let(:json_path) { 'completedAt' }+ end+ end++ describe '_links' do+ it { is_expected.to have_json_type(Object).at_path('_links') }+ it { is_expected.to have_json_path('_links/self/href') }+ end++ describe 'caching' do+ before do+ allow(OpenProject::Cache).to receive(:fetch).and_call_original+ end++ it "is based on the representer's cache_key" do+ representer.to_json++ expect(OpenProject::Cache)+ .to have_received(:fetch)+ .with(representer.json_cache_key)+ end++ describe '#json_cache_key' do+ let!(:former_cache_key) { representer.json_cache_key }++ it 'includes the name of the representer class' do+ expect(representer.json_cache_key)+ .to include('API', 'V3', 'GithubPullRequests', 'GithubCheckRunRepresenter')+ end++ it 'changes when the locale changes' do+ I18n.with_locale(:fr) do+ expect(representer.json_cache_key)+ .not_to eql former_cache_key+ end+ end++ it 'changes when the check run is updated' do+ check_run.updated_at = Time.zone.now + 20.seconds++ expect(representer.json_cache_key)+ .not_to eql former_cache_key+ end+ end+ end+enddiff --git a/modules/github_integration/spec/lib/api/v3/github_pull_requests/github_pull_request_representer_spec.rb b/modules/github_integration/spec/lib/api/v3/github_pull_requests/github_pull_request_representer_spec.rbnew file mode 100644index 00000000000..8d3347748c5--- /dev/null+++ b/modules/github_integration/spec/lib/api/v3/github_pull_requests/github_pull_request_representer_spec.rb@@ -0,0 +1,224 @@+#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2021 the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See docs/COPYRIGHT.rdoc for more details.+#++++require 'spec_helper'++describe ::API::V3::GithubPullRequests::GithubPullRequestRepresenter do+ include ::API::V3::Utilities::PathHelper++ subject(:generated) { representer.to_json }++ let(:github_pull_request) do+ FactoryBot.build_stubbed(:github_pull_request,+ state: 'open',+ labels: labels,+ github_user: github_user,+ merged_by: merged_by).tap do |pr|+ allow(pr)+ .to receive(:latest_check_runs)+ .and_return(latest_check_runs)+ end+ end+ let(:labels) do+ [+ {+ 'name' => 'grey',+ 'color' => '#666'+ }+ ]+ end+ let(:github_user) { FactoryBot.build_stubbed(:github_user) }+ let(:merged_by) { FactoryBot.build_stubbed(:github_user) }+ let(:latest_check_runs) { [check_run] }+ let(:check_run) { FactoryBot.build_stubbed(:github_check_run) }+ let(:representer) { described_class.create(github_pull_request, current_user: user) }++ let(:user) { FactoryBot.build_stubbed(:admin) }++ it { is_expected.to include_json('GithubPullRequest'.to_json).at_path('_type') }++ describe 'properties' do+ it_behaves_like 'property', :_type do+ let(:value) { 'GithubPullRequest' }+ end++ it_behaves_like 'property', :id do+ let(:value) { github_pull_request.id }+ end++ it_behaves_like 'property', :number do+ let(:value) { github_pull_request.number }+ end++ it_behaves_like 'property', :htmlUrl do+ let(:value) { github_pull_request.github_html_url }+ end++ it_behaves_like 'property', :state do+ let(:value) { github_pull_request.state }+ end++ it_behaves_like 'property', :repository do+ let(:value) { github_pull_request.repository }+ end++ it_behaves_like 'property', :title do+ let(:value) { github_pull_request.title }+ end++ it_behaves_like 'formattable property', :body do+ let(:value) { github_pull_request.body }+ end++ it_behaves_like 'property', :draft do+ let(:value) { github_pull_request.draft }+ end++ it_behaves_like 'property', :merged do+ let(:value) { github_pull_request.merged }+ end++ it_behaves_like 'property', :commentsCount do+ let(:value) { github_pull_request.comments_count }+ end++ it_behaves_like 'property', :reviewCommentsCount do+ let(:value) { github_pull_request.review_comments_count }+ end++ it_behaves_like 'property', :additionsCount do+ let(:value) { github_pull_request.additions_count }+ end++ it_behaves_like 'property', :deletionsCount do+ let(:value) { github_pull_request.deletions_count }+ end++ it_behaves_like 'property', :changedFilesCount do+ let(:value) { github_pull_request.changed_files_count }+ end++ it_behaves_like 'property', :labels do+ let(:value) { github_pull_request.labels }+ end++ it_behaves_like 'has UTC ISO 8601 date and time' do+ let(:date) { github_pull_request.github_updated_at }+ let(:json_path) { 'githubUpdatedAt' }+ end++ it_behaves_like 'has UTC ISO 8601 date and time' do+ let(:date) { github_pull_request.created_at }+ let(:json_path) { 'createdAt' }+ end++ it_behaves_like 'has UTC ISO 8601 date and time' do+ let(:date) { github_pull_request.updated_at }+ let(:json_path) { 'updatedAt' }+ end+ end++ describe '_links' do+ it { is_expected.to have_json_type(Object).at_path('_links') }++ it_behaves_like 'has a titled link' do+ let(:link) { 'githubUser' }+ let(:href) { api_v3_paths.github_user(github_user.id) }+ let(:title) { github_user.github_login }+ end++ it_behaves_like 'has a titled link' do+ let(:link) { 'mergedBy' }+ let(:href) { api_v3_paths.github_user(merged_by.id) }+ let(:title) { merged_by.github_login }+ end++ it_behaves_like 'has a link collection' do+ let(:link) { 'checkRuns' }+ let(:hrefs) do+ [+ {+ 'href' => api_v3_paths.github_check_run(check_run.id),+ 'title' => check_run.name+ }+ ]+ end+ end+ end++ describe 'caching' do+ before do+ allow(OpenProject::Cache).to receive(:fetch).and_call_original+ end++ it "is based on the representer's cache_key" do+ representer.to_json++ expect(OpenProject::Cache)+ .to have_received(:fetch)+ .with(representer.json_cache_key)+ end++ describe '#json_cache_key' do+ let!(:former_cache_key) { representer.json_cache_key }++ it 'includes the name of the representer class' do+ expect(representer.json_cache_key)+ .to include('API', 'V3', 'GithubPullRequests', 'GithubPullRequestRepresenter')+ end++ it 'changes when the locale changes' do+ I18n.with_locale(:fr) do+ expect(representer.json_cache_key)+ .not_to eql former_cache_key+ end+ end++ it 'changes when the github_pull_request is updated' do+ github_pull_request.updated_at = Time.zone.now + 20.seconds++ expect(representer.json_cache_key)+ .not_to eql former_cache_key+ end++ it 'changes when the github_user is updated' do+ github_pull_request.github_user.updated_at = Time.zone.now + 20.seconds++ expect(representer.json_cache_key)+ .not_to eql former_cache_key+ end++ it 'changes when the merged_by user is updated' do+ github_pull_request.merged_by.updated_at = Time.zone.now + 20.seconds++ expect(representer.json_cache_key)+ .not_to eql former_cache_key+ end+ end+ end+enddiff --git a/modules/github_integration/spec/lib/api/v3/github_pull_requests/github_user_representer_spec.rb b/modules/github_integration/spec/lib/api/v3/github_pull_requests/github_user_representer_spec.rbnew file mode 100644index 00000000000..c7963682d13--- /dev/null+++ b/modules/github_integration/spec/lib/api/v3/github_pull_requests/github_user_representer_spec.rb@@ -0,0 +1,102 @@+#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2021 the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See docs/COPYRIGHT.rdoc for more details.+#++++require 'spec_helper'++describe ::API::V3::GithubPullRequests::GithubUserRepresenter do+ include ::API::V3::Utilities::PathHelper++ subject(:generated) { representer.to_json }++ let(:github_user) { FactoryBot.build_stubbed(:github_user) }+ let(:representer) { described_class.create(github_user, current_user: user) }++ let(:user) { FactoryBot.build_stubbed(:admin) }++ it { is_expected.to include_json('GithubUser'.to_json).at_path('_type') }++ describe 'properties' do+ it_behaves_like 'property', :_type do+ let(:value) { 'GithubUser' }+ end++ it_behaves_like 'property', :login do+ let(:value) { github_user.github_login }+ end++ it_behaves_like 'property', :htmlUrl do+ let(:value) { github_user.github_html_url }+ end++ it_behaves_like 'property', :avatarUrl do+ let(:value) { github_user.github_avatar_url }+ end+ end++ describe '_links' do+ it { is_expected.to have_json_type(Object).at_path('_links') }+ it { is_expected.to have_json_path('_links/self/href') }+ end++ describe 'caching' do+ before do+ allow(OpenProject::Cache).to receive(:fetch).and_call_original+ end++ it "is based on the representer's cache_key" do+ representer.to_json++ expect(OpenProject::Cache)+ .to have_received(:fetch)+ .with(representer.json_cache_key)+ end++ describe '#json_cache_key' do+ let!(:former_cache_key) { representer.json_cache_key }++ it 'includes the name of the representer class' do+ expect(representer.json_cache_key)+ .to include('API', 'V3', 'GithubPullRequests', 'GithubUserRepresenter')+ end++ it 'changes when the locale changes' do+ I18n.with_locale(:fr) do+ expect(representer.json_cache_key)+ .not_to eql former_cache_key+ end+ end++ it 'changes when the github_user is updated' do+ github_user.updated_at = Time.zone.now + 20.seconds++ expect(representer.json_cache_key)+ .not_to eql former_cache_key+ end+ end+ end+enddiff --git a/modules/github_integration/spec/lib/open_project/github_integration/hook_handler_example_webhooks_spec.rb b/modules/github_integration/spec/lib/open_project/github_integration/hook_handler_example_webhooks_spec.rbdeleted file mode 100644index c4e2b8cd887..00000000000--- a/modules/github_integration/spec/lib/open_project/github_integration/hook_handler_example_webhooks_spec.rb+++ /dev/null@@ -1,250 +0,0 @@-#-- copyright-# OpenProject is an open source project management software.-# Copyright (C) 2012-2021 the OpenProject GmbH-#-# This program is free software; you can redistribute it and/or-# modify it under the terms of the GNU General Public License version 3.-#-# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:-# Copyright (C) 2006-2013 Jean-Philippe Lang-# Copyright (C) 2010-2013 the ChiliProject Team-#-# This program is free software; you can redistribute it and/or-# modify it under the terms of the GNU General Public License-# as published by the Free Software Foundation; either version 2-# of the License, or (at your option) any later version.-#-# This program is distributed in the hope that it will be useful,-# but WITHOUT ANY WARRANTY; without even the implied warranty of-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the-# GNU General Public License for more details.-#-# You should have received a copy of the GNU General Public License-# along with this program; if not, write to the Free Software-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.-#-# See docs/COPYRIGHT.rdoc for more details.-#++--# rubocop:disable RSpec/ExampleLength-require File.expand_path('../../../spec_helper', __dir__)--describe OpenProject::GithubIntegration::HookHandler do- before do- allow(Setting).to receive(:host_name).and_return('example.net')- end-- let(:user) { FactoryBot.create(:user) }- let(:role) do- FactoryBot.create(:role,- permissions: %i[view_work_packages add_work_package_notes])- end- let(:statuses) { (1..5).map { |_i| FactoryBot.create(:status) } }- let(:priority) { FactoryBot.create :priority, is_default: true }- let(:status) { statuses[0] }- let(:project) do- FactoryBot.create(:project).tap do |p|- p.add_member(user, role).save- end- end- let(:project_without_permission) { FactoryBot.create(:project) }- let(:wp1) do- FactoryBot.create :work_package, project: project- end- let(:wp2) do- FactoryBot.create :work_package, project: project- end- let(:wp3) do- FactoryBot.create :work_package,- project: project_without_permission- end- let(:wp4) do- FactoryBot.create :work_package,- project: project_without_permission- end- let(:wps) { [wp1, wp2, wp3, wp4] }-- context 'when receiving a pull request webhook' do- let(:environment) do- {- 'HTTP_X_GITHUB_EVENT' => 'pull_request',- 'HTTP_X_GITHUB_DELIVERY' => 'test delivery'- }- end-- it "handles the pull_request creation payload" do- params = ActionController::Parameters.new(- payload: {- 'action' => 'opened',- 'number' => '5',- 'pull_request' => {- 'title' => 'Bugfixes',- 'body' => "Fixes http://example.net/wp/#{wp1.id} and " +- "https://example.net/work_packages/#{wp2.id} and " +- "http://example.net/subdir/wp/#{wp3.id} and " +- "https://example.net/subdir/work_packages/#{wp4.id}.",- 'html_url' => 'http://pull.request',- 'base' => {- 'repo' => {- 'full_name' => 'full/name',- 'html_url' => 'http://pull.request'- }- }- },- 'sender' => {- 'login' => 'github_login',- 'html_url' => 'http://user.name'- },- 'repository' => {}- }- )-- journal_count = wps.map { |wp| wp.journals.count }- described_class.new.process('github', OpenStruct.new(env: environment), params, user)-- [wp1, wp2, wp3, wp4].map(&:reload)-- expect(wp1.journals.count).to equal(journal_count[0] + 1)- expect(wp2.journals.count).to equal(journal_count[1] + 1)- expect(wp3.journals.count).to equal(journal_count[2] + 0)- expect(wp4.journals.count).to equal(journal_count[3] + 0)-- expect(wp1.journals.last.notes).to include('PR Opened')- end-- it "handles the pull_request close payload" do- params = ActionController::Parameters.new(- payload: {- 'action' => 'closed',- 'number' => '5',- 'pull_request' => {- 'title' => 'Bugfixes',- 'body' => "Fixes http://example.net/wp/#{wp1.id} and " +- "https://example.net/work_packages/#{wp2.id} and " +- "http://example.net/subdir/wp/#{wp3.id} and " +- "https://example.net/subdir/work_packages/#{wp4.id}.",- 'html_url' => 'http://pull.request',- 'base' => {- 'repo' => {- 'full_name' => 'full/name',- 'html_url' => 'http://pull.request'- }- }- },- 'sender' => {- 'login' => 'github_login',- 'html_url' => 'http://user.name'- },- 'repository' => {}- }- )-- journal_count = wps.map { |wp| wp.journals.count }- described_class.new.process('github', OpenStruct.new(env: environment), params, user)-- [wp1, wp2, wp3, wp4].map(&:reload)-- expect(wp1.journals.count).to eq(journal_count[0] + 1)- expect(wp2.journals.count).to eq(journal_count[1] + 1)- expect(wp3.journals.count).to eq(journal_count[2] + 0)- expect(wp4.journals.count).to eq(journal_count[3] + 0)-- expect(wp1.journals.last.notes).to include('PR Closed')- end-- it "handles the pull_request merged payload" do- params = ActionController::Parameters.new(- payload: {- 'action' => 'closed',- 'number' => '5',- 'pull_request' => {- 'title' => 'Bugfixes',- 'body' => "Fixes http://example.net/wp/#{wp1.id} and " +- "https://example.net/work_packages/#{wp2.id} and " +- "http://example.net/subdir/wp/#{wp3.id} and " +- "https://example.net/subdir/work_packages/#{wp4.id}.",- 'html_url' => 'http://pull.request',- 'base' => {- 'repo' => {- 'full_name' => 'full/name',- 'html_url' => 'http://pull.request'- }- },- 'merged' => true- },- 'sender' => {- 'login' => 'github_login',- 'html_url' => 'http://user.name'- },- 'repository' => {}- }- )-- journal_count = wps.map { |wp| wp.journals.count }- described_class.new.process('github', OpenStruct.new(env: environment), params, user)-- [wp1, wp2, wp3, wp4].map(&:reload)-- expect(wp1.journals.count).to equal(journal_count[0] + 1)- expect(wp2.journals.count).to equal(journal_count[1] + 1)- expect(wp3.journals.count).to equal(journal_count[2] + 0)- expect(wp4.journals.count).to equal(journal_count[3] + 0)-- expect(wp1.journals.last.notes).to include('PR Merged')- end- end-- context 'when receiving an issue_comment webhook' do- let(:environment) do- {- 'HTTP_X_GITHUB_EVENT' => 'issue_comment',- 'HTTP_X_GITHUB_DELIVERY' => 'test delivery'- }- end-- it "handles the pull_request comment creation payload" do- params = ActionController::Parameters.new(- payload: {- 'action' => 'created',- 'issue' => {- 'title' => 'Bugfixes',- 'number' => '5',- 'pull_request' => {- 'html_url' => 'http://pull.request'- }- },- 'comment' => {- 'body' => "Fixes http://example.net/wp/#{wp1.id} and " +- "https://example.net/work_packages/#{wp2.id} and " +- "http://example.net/subdir/wp/#{wp3.id} and " +- "https://example.net/subdir/work_packages/#{wp4.id}.",- 'html_url' => 'http://comment.url',- 'user' => {- 'login' => 'github_login',- 'html_url' => 'http://user.name'- }- },- 'sender' => {- },- 'repository' => {- 'full_name' => 'full/name',- 'html_url' => 'http://pull.request'- }- }- )-- journal_count = wps.map { |wp| wp.journals.count }- described_class.new.process('github', OpenStruct.new(env: environment), params, user)-- [wp1, wp2, wp3, wp4].map(&:reload)-- expect(wp1.journals.count).to equal(journal_count[0] + 1)- expect(wp2.journals.count).to equal(journal_count[1] + 1)- expect(wp3.journals.count).to equal(journal_count[2] + 0)- expect(wp4.journals.count).to equal(journal_count[3] + 0)-- expect(wp1.journals.last.notes).to include('Referenced')- end- end-end-# rubocop:enable RSpec/ExampleLengthdiff --git a/modules/github_integration/spec/lib/open_project/github_integration/hook_handler_integration_spec.rb b/modules/github_integration/spec/lib/open_project/github_integration/hook_handler_integration_spec.rbnew file mode 100644index 00000000000..8daf3c7c9a4--- /dev/null+++ b/modules/github_integration/spec/lib/open_project/github_integration/hook_handler_integration_spec.rb@@ -0,0 +1,674 @@+#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2021 the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See docs/COPYRIGHT.rdoc for more details.+#++++require File.expand_path('../../../spec_helper', __dir__)++describe OpenProject::GithubIntegration::HookHandler do+ subject(:process_webhook) do+ described_class.new+ .tap { journal_counts_before }+ .process('github', OpenStruct.new(env: environment), params, user)+ .tap { [work_packages[0], work_packages[1], work_packages[2], work_packages[3]].map(&:reload) }+ end++ before do+ allow(Setting).to receive(:host_name).and_return(host_name)+ end++ let(:environment) do+ {+ 'HTTP_X_GITHUB_EVENT' => event,+ 'HTTP_X_GITHUB_DELIVERY' => 'test delivery'+ }+ end+ let(:host_name) { 'example.net' }+ let(:user) { FactoryBot.create(:user) }+ let(:role) do+ FactoryBot.create(:role,+ permissions: %i[view_work_packages add_work_package_notes])+ end+ let(:project) do+ FactoryBot.create(:project).tap do |p|+ p.add_member(user, role).save+ end+ end++ let(:work_packages) { FactoryBot.create_list :work_package, 4, project: project }+ let(:journal_counts_before) { work_packages.map { |wp| wp.journals.count } }+ let(:journal_counts_after) { work_packages.map { |wp| wp.journals.count } }++ let(:pr_merged) { false }+ let(:pr_draft) { false }+ let(:pr_state) { 'open' }+ let(:pr_labels) { [] }++ shared_examples_for 'it does not comment on any work package' do+ let(:created_journals) { journal_counts_after.sum - journal_counts_before.sum }++ it 'consumes the webhook without commenting on any work package' do+ process_webhook++ expect(created_journals).to be 0+ end+ end++ shared_examples_for 'it comments on the first work_package' do+ it 'comments only on the first work package' do+ process_webhook++ expect(work_packages[0].journals.count).to be(journal_counts_before[0] + 1)+ expect(work_packages[0].journals.last.notes).to include(journal_entry)++ expect(work_packages[1].journals.count).to be(journal_counts_before[1])+ expect(work_packages[2].journals.count).to be(journal_counts_before[2])+ expect(work_packages[3].journals.count).to be(journal_counts_before[3])+ end+ end++ shared_examples_for 'it does not create a pull request' do+ it 'creates no GithubPullRequest or GithubUser' do+ expect { process_webhook }.to(+ change(GithubPullRequest, :count).by(0).and(+ change(GithubUser, :count).by(0)+ )+ )+ end+ end++ shared_examples_for 'it creates a pull request and github user' do+ it 'creates a GithubPullRequest and a GithubUser' do+ expect { process_webhook }.to(change(GithubPullRequest, :count).by(1).and(change(GithubUser, :count).by(1)))++ pull_request = GithubPullRequest.last+ expect(pull_request).to have_attributes(+ title: 'A PR title',+ body: "A PR body mentioning OP##{work_packages[0].id}",+ merged: pr_merged,+ draft: pr_draft,+ state: pr_state,+ labels: pr_labels,+ number: 1,+ additions_count: 123,+ deletions_count: 321,+ comments_count: 22,+ review_comments_count: 33,+ changed_files_count: 12,+ repository: 'test_user/webhooks_playground'+ )+ expect(pull_request.work_packages).to eq [work_packages[0]]++ github_user = GithubUser.last+ expect(github_user).to have_attributes(+ github_login: 'test_user',+ github_html_url: 'https://github.com/test_user',+ github_avatar_url: 'https://avatars.githubusercontent.com/u/206108?v=4'+ )+ end+ end++ shared_examples_for 'it creates a partial pull request' do+ it 'creates a partial GithubPullRequest' do+ expect { process_webhook }.to(+ change(GithubPullRequest, :count).by(1).and(+ change(GithubUser, :count).by(0)+ )+ )++ pull_request = GithubPullRequest.last+ expect(pull_request).to have_attributes(+ number: 1,+ state: 'partial',+ title: nil,+ body: nil,+ merged: nil,+ draft: nil,+ labels: nil,+ additions_count: nil,+ deletions_count: nil,+ comments_count: nil,+ review_comments_count: nil,+ changed_files_count: nil+ )+ expect(pull_request.work_packages).to eq [work_packages[0]]+ end+ end++ context 'when receiving a webhook for a pull_request event' do+ let(:event) { 'pull_request' }++ context 'when opened without mentioning any work package' do+ let(:params) do+ ActionController::Parameters.new(+ webhook_payload(+ 'pull_request',+ 'opened',+ title: 'A PR title',+ body: 'A PR body'+ )+ )+ end++ it_behaves_like 'it does not comment on any work package'+ it_behaves_like 'it does not create a pull request'+ end++ context 'when opened and mentioning a work package in the PR title' do+ let(:params) do+ ActionController::Parameters.new(+ webhook_payload(+ 'pull_request',+ 'opened',+ title: "A PR title mentioning OP##{work_packages[0].id}",+ body: 'A PR body'+ )+ )+ end+ let(:created_journals) { journal_counts_after.sum - journal_counts_before.sum }++ it_behaves_like 'it does not comment on any work package'+ it_behaves_like 'it does not create a pull request'+ end++ context 'when opened and mentioning a work package using its code in the PR body' do+ let(:params) do+ ActionController::Parameters.new(+ webhook_payload(+ 'pull_request',+ 'opened',+ title: 'A PR title',+ body: "A PR body mentioning OP##{work_packages[0].id}"+ )+ )+ end+ let(:journal_entry) { 'PR Opened' }++ it_behaves_like 'it comments on the first work_package'+ it_behaves_like 'it creates a pull request and github user'+ end++ context 'when opened and mentioning many work packages using URLs in the PR body' do+ let(:params) do+ ActionController::Parameters.new(+ webhook_payload(+ 'pull_request',+ 'opened',+ title: 'A PR title',+ body: "A PR body mentioning+ * http://#{host_name}/wp/#{work_packages[0].id}+ * http://#{host_name}/wp/#{work_packages[0].id} (second mention should not create a second comment)+ * https://#{host_name}/work_packages/#{work_packages[1].id}+ * http://#{host_name}/subdir/wp/#{work_packages[2].id}+ * https://#{host_name}/subdir/work_packages/#{work_packages[3].id}+ "+ )+ )+ end++ it 'comments on all mentioned work packages once' do+ process_webhook++ work_packages.each_with_index do |work_package, index|+ expect(work_package.journals.count).to be(journal_counts_before[index] + 1)+ expect(work_package.journals.last.notes).to include('PR Opened')+ end+ end++ it 'creates a GithubPullRequest and a GithubUser' do+ expect { process_webhook }.to(+ change(GithubPullRequest, :count).by(1).and(+ change(GithubUser, :count).by(1)+ )+ )++ pull_request = GithubPullRequest.last+ expect(pull_request).to have_attributes(+ title: 'A PR title',+ merged: false,+ draft: false,+ state: 'open',+ number: 1+ )+ expect(pull_request.work_packages).to eq work_packages++ github_user = GithubUser.last+ expect(github_user).to have_attributes(+ github_login: 'test_user',+ github_html_url: 'https://github.com/test_user',+ github_avatar_url: 'https://avatars.githubusercontent.com/u/206108?v=4'+ )+ end+ end++ context 'when opened mentioning all work_packages with a user having access only to some' do+ let(:project_without_permission) { FactoryBot.create(:project) }+ let(:work_packages) do+ [+ FactoryBot.create(:work_package, project: project),+ FactoryBot.create(:work_package, project: project_without_permission),+ FactoryBot.create(:work_package, project: project_without_permission),+ FactoryBot.create(:work_package, project: project)+ ]+ end++ let(:params) do+ ActionController::Parameters.new(+ webhook_payload(+ 'pull_request',+ 'opened',+ title: 'A PR title',+ body: "A PR body mentioning+ * OP##{work_packages[0].id}+ * OP##{work_packages[1].id}+ * OP##{work_packages[2].id}+ * OP##{work_packages[3].id}+ "+ )+ )+ end++ it 'comments only on work packages with access' do+ process_webhook++ expect(work_packages[0].journals.count).to be(journal_counts_before[0] + 1)+ expect(work_packages[1].journals.count).to be(journal_counts_before[1]) # no permission for this work package+ expect(work_packages[2].journals.count).to be(journal_counts_before[2]) # no permission for this work package+ expect(work_packages[3].journals.count).to be(journal_counts_before[3] + 1)+ end++ it 'creates a GithubPullRequest and a GithubUser' do+ expect { process_webhook }.to(+ change(GithubPullRequest, :count).by(1).and(+ change(GithubUser, :count).by(1)+ )+ )++ pull_request = GithubPullRequest.last+ expect(pull_request).to have_attributes(+ title: 'A PR title',+ merged: false,+ draft: false,+ state: 'open',+ number: 1+ )+ expect(pull_request.work_packages).to eq [work_packages[0], work_packages[3]]++ github_user = GithubUser.last+ expect(github_user).to have_attributes(+ github_login: 'test_user',+ github_html_url: 'https://github.com/test_user',+ github_avatar_url: 'https://avatars.githubusercontent.com/u/206108?v=4'+ )+ end+ end++ context 'when opened as draft' do+ let(:params) do+ ActionController::Parameters.new(+ webhook_payload(+ 'pull_request',+ 'opened_draft',+ title: 'A PR title',+ body: "A PR body mentioning OP##{work_packages[0].id}"+ )+ )+ end+ let(:journal_entry) { 'PR Opened' }+ let(:pr_draft) { true }++ it_behaves_like 'it comments on the first work_package'+ it_behaves_like 'it creates a pull request and github user'+ end++ context 'when synchronized' do+ let(:params) do+ ActionController::Parameters.new(+ webhook_payload(+ 'pull_request',+ 'synchronize',+ title: 'A PR title',+ body: "A PR body mentioning OP##{work_packages[0].id}"+ )+ )+ end++ it_behaves_like 'it does not comment on any work package'+ it_behaves_like 'it creates a pull request and github user'+ end++ context 'when marked as ready_for_review' do+ let(:params) do+ ActionController::Parameters.new(+ webhook_payload(+ 'pull_request',+ 'ready_for_review',+ title: 'A PR title',+ body: "A PR body mentioning OP##{work_packages[0].id}"+ )+ )+ end+ let(:journal_entry) { 'PR Ready for Review' }++ it_behaves_like 'it comments on the first work_package'+ it_behaves_like 'it creates a pull request and github user'+ end++ context 'when the PR was re-labeled' do+ let(:params) do+ ActionController::Parameters.new(+ webhook_payload(+ 'pull_request',+ 'labeled',+ title: 'A PR title',+ body: "A PR body mentioning OP##{work_packages[0].id}"+ )+ )+ end+ let(:pr_labels) do+ [+ { "color" => "d73a4a", "name" => "bug" },+ { "color" => "a2eeef", "name" => "enhancement" }+ ]+ end++ it_behaves_like 'it does not comment on any work package'+ it_behaves_like 'it creates a pull request and github user'+ end++ context 'when the PR title was edited' do+ let(:params) do+ ActionController::Parameters.new(+ webhook_payload(+ 'pull_request',+ 'edited_title',+ old_title: 'The old PR title',+ title: 'A PR title',+ body: "A PR body mentioning OP##{work_packages[0].id}"+ )+ )+ end+ let(:journal_entry) { 'Referenced in PR' }++ it_behaves_like 'it comments on the first work_package'+ it_behaves_like 'it creates a pull request and github user'+ end++ context 'when the PR body was edited' do+ let(:params) do+ ActionController::Parameters.new(+ webhook_payload(+ 'pull_request',+ 'edited_body',+ title: 'A PR title',+ old_body: 'The old PR body',+ body: "A PR body mentioning OP##{work_packages[0].id}"+ )+ )+ end+ let(:journal_entry) { 'Referenced in PR' }++ it_behaves_like 'it comments on the first work_package'+ it_behaves_like 'it creates a pull request and github user'+ end++ context 'when the PR was converted to draft' do+ let(:params) do+ ActionController::Parameters.new(+ webhook_payload(+ 'pull_request',+ 'converted_to_draft',+ title: 'A PR title',+ body: "A PR body mentioning OP##{work_packages[0].id}"+ )+ )+ end+ let(:pr_draft) { true }++ it_behaves_like 'it does not comment on any work package'+ it_behaves_like 'it creates a pull request and github user'+ end++ context 'when the PR was closed without merging' do+ let(:params) do+ ActionController::Parameters.new(+ webhook_payload(+ 'pull_request',+ 'closed_no_merge',+ title: 'A PR title',+ body: "A PR body mentioning OP##{work_packages[0].id}"+ )+ )+ end+ let(:journal_entry) { 'PR Closed' }+ let(:pr_state) { 'closed' }++ it_behaves_like 'it comments on the first work_package'+ it_behaves_like 'it creates a pull request and github user'+ end++ context 'when the PR was reopened' do+ let(:params) do+ ActionController::Parameters.new(+ webhook_payload(+ 'pull_request',+ 'reopened',+ title: 'A PR title',+ body: "A PR body mentioning OP##{work_packages[0].id}"+ )+ )+ end+ let(:journal_entry) { 'PR Opened' }++ it_behaves_like 'it comments on the first work_package'+ it_behaves_like 'it creates a pull request and github user'+ end++ context 'when the PR was merged' do+ let(:params) do+ ActionController::Parameters.new(+ webhook_payload(+ 'pull_request',+ 'closed_merged',+ title: 'A PR title',+ body: "A PR body mentioning OP##{work_packages[0].id}"+ )+ )+ end+ let(:journal_entry) { 'PR Merged' }+ let(:pr_state) { 'closed' }+ let(:pr_merged) { true }++ it_behaves_like 'it comments on the first work_package'+ it_behaves_like 'it creates a pull request and github user'++ it 'sets the merged_by relation to a GithubUser' do+ process_webhook++ expect(GithubPullRequest.last.merged_by.github_login).to eq 'test_user'+ end+ end+ end++ context 'when receiving a webhook for an issue_comment event' do+ let(:event) { 'issue_comment' }++ context 'when an issue comment was created' do+ let(:params) do+ ActionController::Parameters.new(+ webhook_payload(+ 'issue_comment',+ 'create_not_associated_to_pr',+ body: "A comment in an issue mentioning OP##{work_packages[0].id}"+ )+ )+ end++ it_behaves_like 'it does not comment on any work package'+ it_behaves_like 'it does not create a pull request'+ end++ context 'when a PR comment was created' do+ let(:params) do+ ActionController::Parameters.new(+ webhook_payload(+ 'issue_comment',+ 'create',+ body: "A PR comment mentioning OP##{work_packages[0].id}"+ )+ )+ end+ let(:journal_entry) { 'Referenced' }++ it_behaves_like 'it comments on the first work_package'+ it_behaves_like 'it creates a partial pull request'+ end++ context 'when an issue comment was edited' do+ let(:params) do+ ActionController::Parameters.new(+ webhook_payload(+ 'issue_comment',+ 'edited_not_associated_to_pr',+ body: "A comment in an issue mentioning OP##{work_packages[0].id}"+ )+ )+ end++ it_behaves_like 'it does not comment on any work package'+ it_behaves_like 'it does not create a pull request'+ end++ context 'when an PR comment was edited' do+ let(:params) do+ ActionController::Parameters.new(+ webhook_payload(+ 'issue_comment',+ 'edited',+ body: "A PR comment mentioning OP##{work_packages[0].id}"+ )+ )+ end+ let(:journal_entry) { 'Referenced' }++ it_behaves_like 'it comments on the first work_package'+ it_behaves_like 'it creates a partial pull request'+ end+ end++ context 'when receiving a webhook for a ping event' do+ let(:event) { 'ping' }+ let(:params) { ActionController::Parameters.new(webhook_payload('ping', 'ping')) }++ it_behaves_like 'it does not comment on any work package'+ it_behaves_like 'it does not create a pull request'+ end++ context 'when receiving a webhook for a check_run event' do+ let(:event) { 'check_run' }+ # github_id comes from the fixture files+ let(:github_pull_request) { FactoryBot.create(:github_pull_request, :open, github_id: 606508565) }++ before { github_pull_request }++ context 'when a run was queued but is not associated to a PR' do+ let(:params) do+ ActionController::Parameters.new(webhook_payload('check_run', 'queued_no_associated_pr'))+ end++ it_behaves_like 'it does not comment on any work package'+ it_behaves_like 'it does not create a pull request'++ it 'does not create a check run' do+ expect { process_webhook }.to(change(GithubCheckRun, :count).by(0))+ end+ end++ context 'when a run was queued' do+ let(:params) do+ ActionController::Parameters.new(webhook_payload('check_run', 'queued'))+ end++ it_behaves_like 'it does not comment on any work package'+ it_behaves_like 'it does not create a pull request'++ it 'creates a check run' do+ expect { process_webhook }.to(change(GithubCheckRun, :count).by(1))+ check_run = GithubCheckRun.last+ expect(check_run).to have_attributes(+ github_pull_request: github_pull_request,+ github_app_owner_avatar_url: 'https://avatars.githubusercontent.com/u/9919?v=4',+ status: 'queued',+ details_url: 'https://github.com/test_user/webhooks_playground/runs/2241417510',+ conclusion: nil+ )+ end+ end++ context 'when a run was completed successfully' do+ let(:params) do+ ActionController::Parameters.new(webhook_payload('check_run', 'completed_success'))+ end++ it_behaves_like 'it does not comment on any work package'+ it_behaves_like 'it does not create a pull request'++ it 'creates a check run' do+ expect { process_webhook }.to(change(GithubCheckRun, :count).by(1))+ check_run = GithubCheckRun.last+ expect(check_run).to have_attributes(+ github_pull_request: github_pull_request,+ github_app_owner_avatar_url: 'https://avatars.githubusercontent.com/u/9919?v=4',+ status: 'completed',+ details_url: 'https://github.com/test_user/webhooks_playground/runs/2241431836',+ conclusion: 'success'+ )+ end+ end++ context 'when a run was completed with a failure' do+ let(:params) do+ ActionController::Parameters.new(webhook_payload('check_run', 'completed_failure'))+ end++ it_behaves_like 'it does not comment on any work package'+ it_behaves_like 'it does not create a pull request'++ it 'creates a check run' do+ expect { process_webhook }.to(change(GithubCheckRun, :count).by(1))+ check_run = GithubCheckRun.last+ expect(check_run).to have_attributes(+ github_pull_request: github_pull_request,+ github_app_owner_avatar_url: 'https://avatars.githubusercontent.com/u/9919?v=4',+ name: 'test',+ status: 'completed',+ details_url: 'https://github.com/test_user/webhooks_playground/runs/2241416592',+ conclusion: 'failure'+ )+ end+ end+ end+enddiff --git a/modules/github_integration/spec/lib/open_project/github_integration/notification_handler/check_run_spec.rb b/modules/github_integration/spec/lib/open_project/github_integration/notification_handler/check_run_spec.rbnew file mode 100644index 00000000000..3564763d0e9--- /dev/null+++ b/modules/github_integration/spec/lib/open_project/github_integration/notification_handler/check_run_spec.rb@@ -0,0 +1,92 @@+#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2021 the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See docs/COPYRIGHT.rdoc for more details.+#++++require File.expand_path('../../../../spec_helper', __dir__)++describe OpenProject::GithubIntegration::NotificationHandler::CheckRun do+ subject(:process) { described_class.new.process(payload) }++ let(:upsert_check_run_service) do+ instance_double(OpenProject::GithubIntegration::Services::UpsertCheckRun)+ end+ let(:payload) do+ {+ 'check_run' => {+ 'pull_requests' => pull_requests_payload+ }+ }+ end+ let(:pull_requests_payload) { [] }++ before do+ allow(OpenProject::GithubIntegration::Services::UpsertCheckRun).to receive(:new)+ .and_return(upsert_check_run_service)+ allow(upsert_check_run_service).to receive(:call).and_return(nil)+ end++ it 'does not call the UpsertCheckRun service when the check_run is not associated to a PR' do+ process+ expect(upsert_check_run_service).not_to have_received(:call)+ end++ context 'when the check_run is not associated to a known GithubPullRequest' do+ let(:pull_requests_payload) do+ [+ {+ 'id' => 123+ }+ ]+ end++ it 'does not call the UpsertCheckRun service' do+ process+ expect(upsert_check_run_service).not_to have_received(:call)+ end+ end++ context 'when the check_run is associated to a known GithubPullRequest' do+ let(:pull_requests_payload) do+ [+ {+ 'id' => 123+ }+ ]+ end+ let(:github_pull_request) { FactoryBot.create :github_pull_request, github_id: 123 }++ before { github_pull_request }++ it 'does not call the UpsertCheckRun service' do+ process+ expect(upsert_check_run_service).to have_received(:call).with(+ payload['check_run'],+ pull_request: github_pull_request+ )+ end+ end+enddiff --git a/modules/github_integration/spec/lib/open_project/github_integration/notification_handlers_spec.rb b/modules/github_integration/spec/lib/open_project/github_integration/notification_handler/helper_spec.rbsimilarity index 60%rename from modules/github_integration/spec/lib/open_project/github_integration/notification_handlers_spec.rbrename to modules/github_integration/spec/lib/open_project/github_integration/notification_handler/helper_spec.rbindex 563e76982bf..d6f55900181 100644--- a/modules/github_integration/spec/lib/open_project/github_integration/notification_handlers_spec.rb+++ b/modules/github_integration/spec/lib/open_project/github_integration/notification_handler/helper_spec.rb@@ -26,73 +26,53 @@# See docs/COPYRIGHT.rdoc for more details.#++-require File.expand_path('../../../spec_helper', __dir__)+require File.expand_path('../../../../spec_helper', __dir__)++describe OpenProject::GithubIntegration::NotificationHandler::Helper do+ subject(:handler) { Class.new.include(described_class).new }-describe OpenProject::GithubIntegration::NotificationHandlers dobefore doallow(Setting).to receive(:host_name).and_return('example.net')end- describe '.extract_work_package_ids' do+ describe '#extract_work_package_ids' doit 'returns an empty array for an empty source' do- result = described_class.send(- :extract_work_package_ids, ''- )- expect(result).to eql([])+ expect(handler.extract_work_package_ids('')).to eq([])endit 'finds a work package by code' dosource = "Blabla\nOP#1234\n"- result = described_class.send(- :extract_work_package_ids, source- )- expect(result).to eql([1234])+ expect(handler.extract_work_package_ids(source)).to eq([1234])endit 'finds a plain work package url' dosource = 'Blabla\nhttps://example.net/work_packages/234\n'- result = described_class.send(- :extract_work_package_ids, source- )- expect(result).to eql([234])+ expect(handler.extract_work_package_ids(source)).to eq([234])endit 'finds a work package url in markdown link syntax' dosource = 'Blabla\n[WP 234](https://example.net/work_packages/234)\n'- result = described_class.send(- :extract_work_package_ids, source- )- expect(result).to eql([234])+ expect(handler.extract_work_package_ids(source)).to eq([234])endit 'finds multiple work package urls' dosource = "I reference https://example.net/work_packages/434\n and Blabla\n[WP 234](https://example.net/wp/234)\n"- result = described_class.send(- :extract_work_package_ids, source- )- expect(result).to eql([434, 234])+ expect(handler.extract_work_package_ids(source)).to eq([434, 234])endit 'finds multiple occurences of a work package only once' dosource = "I reference https://example.net/work_packages/434\n and Blabla\n[WP 234](https://example.net/work_packages/434)\n"- result = described_class.send(- :extract_work_package_ids, source- )- expect(result).to eql([434])+ expect(handler.extract_work_package_ids(source)).to eq([434])endend- describe '.find_visible_work_packages' do+ describe '#find_visible_work_packages' dolet(:user) { instance_double(User) }let(:visible_wp) { instance_double(WorkPackage, project: :project_with_permissions) }let(:invisible_wp) { instance_double(WorkPackage, project: :project_without_permissions) }- shared_examples_for 'GithubIntegration.find_visible_work_packages' do- subject(:find_visible_work_packages) do- described_class.send(- :find_visible_work_packages, ids, user- )- end+ shared_examples_for 'it finds visible work packages' do+ subject(:find_visible_work_packages) { handler.find_visible_work_packages(ids, user) }before doallow(WorkPackage).to receive(:includes).and_return(WorkPackage)@@ -102,7 +82,7 @@ describe OpenProject::GithubIntegration::NotificationHandlers do}end- it 'processes the notification' do+ it 'finds work packages visible to the user' doexpect(find_visible_work_packages).to eql(expected)expect(user).to have_received(:allowed_to?).exactly(ids.length).timesend@@ -113,7 +93,7 @@ describe OpenProject::GithubIntegration::NotificationHandlers dolet(:ids) { [0] }let(:expected) { work_packages }- it_behaves_like 'GithubIntegration.find_visible_work_packages'+ it_behaves_like 'it finds visible work packages'enddescribe 'should not find a non-existing work package' do@@ -121,7 +101,7 @@ describe OpenProject::GithubIntegration::NotificationHandlers dolet(:ids) { [0] }let(:expected) { [] }- it_behaves_like 'GithubIntegration.find_visible_work_packages'+ it_behaves_like 'it finds visible work packages'enddescribe 'should find multiple existing work packages' do@@ -129,7 +109,7 @@ describe OpenProject::GithubIntegration::NotificationHandlers dolet(:ids) { [0, 1] }let(:expected) { work_packages }- it_behaves_like 'GithubIntegration.find_visible_work_packages'+ it_behaves_like 'it finds visible work packages'enddescribe 'should not find work package which the user shall not see' do@@ -137,40 +117,17 @@ describe OpenProject::GithubIntegration::NotificationHandlers dolet(:ids) { [0, 1, 2, 3] }let(:expected) { [visible_wp, visible_wp] }- it_behaves_like 'GithubIntegration.find_visible_work_packages'+ it_behaves_like 'it finds visible work packages'endend- describe '.issue_comment' do- context 'when an issue request is not a pull request' do- let(:payload) do- { 'action' => 'created',- 'issue' => { 'pull_request' => { 'html_url' => nil } } }- end-- before do- allow(WorkPackages::UpdateService).to receive(:new)- end+ describe '#without_already_referenced' do+ let(:work_packages) { FactoryBot.create_list(:work_package, 2) }+ let(:referenced_work_packages) { [work_packages[0]] }+ let(:github_pull_request) { FactoryBot.create(:github_pull_request, work_packages: referenced_work_packages) }- it 'does not add comments to work packages' do- described_class.issue_comment(payload)- expect(WorkPackages::UpdateService).not_to have_received(:new)- end- end- end-- describe '.pull_request' do- context 'with a synchronize action' do- let(:payload) { { 'action' => 'synchronize' } }-- before do- allow(WorkPackages::UpdateService).to receive(:new)- end-- it 'does not add comments to work packages' do- described_class.pull_request(payload)- expect(WorkPackages::UpdateService).not_to have_received(:new)- end+ it 'returns only the not already referenced work packages' do+ expect(handler.without_already_referenced(work_packages, github_pull_request)).to match_array([work_packages[1]])endendenddiff --git a/modules/github_integration/spec/lib/open_project/github_integration/notification_handler/issue_comment_spec.rb b/modules/github_integration/spec/lib/open_project/github_integration/notification_handler/issue_comment_spec.rbnew file mode 100644index 00000000000..e972a33d509--- /dev/null+++ b/modules/github_integration/spec/lib/open_project/github_integration/notification_handler/issue_comment_spec.rb@@ -0,0 +1,225 @@+#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2021 the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See docs/COPYRIGHT.rdoc for more details.+#++++require File.expand_path('../../../../spec_helper', __dir__)++describe OpenProject::GithubIntegration::NotificationHandler::IssueComment do+ subject(:process) { handler_instance.process(payload) }++ let(:handler_instance) { described_class.new }+ let(:upsert_partial_pull_request_service) do+ instance_double(OpenProject::GithubIntegration::Services::UpsertPartialPullRequest)+ end+ let(:payload) do+ {+ 'action' => action,+ 'comment' => {+ 'body' => comment_body,+ 'html_url' => 'https://comment.url',+ 'user' => {+ 'login' => 'test_user',+ 'html_url' => 'https://github.com/test_user'+ }+ },+ 'issue' => {+ 'number' => pr_number,+ 'title' => 'PR or issue title',+ 'pull_request' => pr_payload+ },+ 'repository' => {+ 'full_name' => repo_full_name,+ 'html_url' => 'https://github.com/test_user/repo'+ },+ 'open_project_user_id' => github_system_user.id+ }+ end+ let(:comment_body) { "a comment about OP##{work_package.id}" }+ let(:pr_payload) { { 'html_url' => pr_html_url } }+ let(:pr_html_url) { 'https://github.com/test_user/repo/pull/123' }+ let(:pr_number) { 123 }+ let(:repo_full_name) { 'test_user/repo' }+ let(:github_system_user) { FactoryBot.create :admin }+ let(:work_package) { FactoryBot.create :work_package }++ before do+ allow(handler_instance).to receive(:comment_on_referenced_work_packages).and_return(nil)+ allow(OpenProject::GithubIntegration::Services::UpsertPartialPullRequest).to receive(:new)+ .and_return(upsert_partial_pull_request_service)+ allow(upsert_partial_pull_request_service).to receive(:call).and_return(nil)+ end++ shared_examples_for 'upserting a GithubPullRequest' do+ it 'calls the UpsertPartialPullRequest service' do+ process+ expect(upsert_partial_pull_request_service).to have_received(:call).with(+ github_html_url: pr_html_url,+ number: pr_number,+ repository: repo_full_name,+ work_packages: [work_package]+ )+ end+ end++ shared_examples_for 'not upserting a GithubPullRequest' do+ it 'does not call the UpsertPartialPullRequest service' do+ process+ expect(upsert_partial_pull_request_service).not_to have_received(:call)+ end+ end++ shared_examples_for 'creating a comment on the work package' do+ it 'adds a comment to work packages' do+ process+ expect(handler_instance).to have_received(:comment_on_referenced_work_packages).with([work_package], github_system_user,+ comment)+ end+ end++ shared_examples_for 'not creating comments on work packages' do+ it 'does not add comments to work packages' do+ process+ expect(handler_instance).not_to have_received(:comment_on_referenced_work_packages)+ end+ end++ context 'when a comment was created' do+ let(:action) { 'created' }++ context 'when commented on an issue' do+ let(:pr_payload) { nil }++ it_behaves_like 'not creating comments on work packages'+ it_behaves_like 'not upserting a GithubPullRequest'+ end++ context 'when commented on a PR' do+ let(:comment) do+ "**Referenced in PR:** [test_user](https://github.com/test_user) referenced this work package" \+ " in Pull request 123 [PR or issue title](https://comment.url) on [test_user/repo](https://github.com/test_user/repo).\n"+ end++ it_behaves_like 'creating a comment on the work package'+ it_behaves_like 'upserting a GithubPullRequest'+ end++ context 'when we already have a GithubPullRequest for the commented PR' do+ let(:github_pull_request) { FactoryBot.create(:github_pull_request, github_html_url: pr_html_url) }+ let(:comment) do+ "**Referenced in PR:** [test_user](https://github.com/test_user) referenced this work package" \+ " in Pull request 123 [PR or issue title](https://comment.url) on [test_user/repo](https://github.com/test_user/repo).\n"+ end++ before do+ github_pull_request+ end++ it_behaves_like 'creating a comment on the work package'+ it_behaves_like 'upserting a GithubPullRequest'+ end++ context 'when we already have a GithubPullRequest with that work_package' do+ let(:github_pull_request) do+ FactoryBot.create(:github_pull_request, github_html_url: pr_html_url, work_packages: [work_package])+ end++ before do+ github_pull_request+ end++ it_behaves_like 'not creating comments on work packages'++ it 'calls the UpsertPartialPullRequest service without adding already known work_packages' do+ process+ expect(upsert_partial_pull_request_service).to have_received(:call).with(+ github_html_url: pr_html_url,+ number: pr_number,+ repository: repo_full_name,+ work_packages: []+ )+ end+ end+ end++ context 'when a comment was edited' do+ let(:action) { 'edited' }++ context 'when editing an issue comment' do+ let(:pr_payload) { nil }++ it_behaves_like 'not creating comments on work packages'+ it_behaves_like 'not upserting a GithubPullRequest'+ end++ context 'when editing a PR comment with a new work package reference' do+ let(:comment) do+ "**Referenced in PR:** [test_user](https://github.com/test_user) referenced this work package" \+ " in Pull request 123 [PR or issue title](https://comment.url) on [test_user/repo](https://github.com/test_user/repo).\n"+ end++ it_behaves_like 'creating a comment on the work package'+ it_behaves_like 'upserting a GithubPullRequest'+ end++ context 'when we already have a GithubPullRequest for the commented PR' do+ let(:github_pull_request) { FactoryBot.create(:github_pull_request, github_html_url: pr_html_url) }+ let(:comment) do+ "**Referenced in PR:** [test_user](https://github.com/test_user) referenced this work package" \+ " in Pull request 123 [PR or issue title](https://comment.url) on [test_user/repo](https://github.com/test_user/repo).\n"+ end++ before do+ github_pull_request+ end++ it_behaves_like 'creating a comment on the work package'+ it_behaves_like 'upserting a GithubPullRequest'+ end++ context 'when we already have a GithubPullRequest with that work_package' do+ let(:github_pull_request) do+ FactoryBot.create(:github_pull_request, github_html_url: pr_html_url, work_packages: [work_package])+ end++ before do+ github_pull_request+ end++ it_behaves_like 'not creating comments on work packages'++ it 'calls the UpsertPartialPullRequest service without adding already known work_packages' do+ process+ expect(upsert_partial_pull_request_service).to have_received(:call).with(+ github_html_url: pr_html_url,+ number: pr_number,+ repository: repo_full_name,+ work_packages: []+ )+ end+ end+ end+enddiff --git a/modules/github_integration/spec/lib/open_project/github_integration/notification_handler/pull_request_spec.rb b/modules/github_integration/spec/lib/open_project/github_integration/notification_handler/pull_request_spec.rbnew file mode 100644index 00000000000..dc9449a72c9--- /dev/null+++ b/modules/github_integration/spec/lib/open_project/github_integration/notification_handler/pull_request_spec.rb@@ -0,0 +1,292 @@+#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2021 the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See docs/COPYRIGHT.rdoc for more details.+#++++require File.expand_path('../../../../spec_helper', __dir__)++describe OpenProject::GithubIntegration::NotificationHandler::PullRequest do+ subject(:process) { handler_instance.process(payload) }++ let(:handler_instance) { described_class.new }+ let(:github_system_user) { FactoryBot.create(:admin) }+ let(:upsert_service) { instance_double(OpenProject::GithubIntegration::Services::UpsertPullRequest) }++ let(:payload) do+ {+ 'action' => action,+ 'open_project_user_id' => github_system_user.id,+ 'pull_request' => {+ 'id' => 123,+ 'number' => 1,+ 'body' => pr_body,+ 'title' => 'A PR title',+ 'html_url' => 'http://pr.url',+ 'updated_at' => Time.current.iso8601,+ 'state' => 'open',+ 'draft' => pr_draft,+ 'merged' => pr_merged,+ 'merged_by' => nil,+ 'merged_at' => nil,+ 'comments' => 1,+ 'review_comments' => 2,+ 'additions' => 3,+ 'deletions' => 4,+ 'changed_files' => 5,+ 'labels' => [],+ 'user' => {+ 'id' => 345,+ 'login' => 'test_user',+ 'html_url' => 'https://github.com/test_user',+ 'avatar_url' => 'https://github.com/test_user.jpg'+ },+ 'base' => {+ 'repo' => {+ 'full_name' => 'test_user/repo',+ 'html_url' => 'github.com/test_user/repo'+ }+ }+ },+ 'sender' => {+ 'login' => 'test_user',+ 'html_url' => 'github.com/test_user'+ }+ }+ end+ let(:work_package) { FactoryBot.create(:work_package) }+ let(:pr_body) { "Mentioning OP##{work_package.id}" }+ let(:pr_merged) { false }+ let(:pr_draft) { false }++ before do+ allow(handler_instance).to receive(:comment_on_referenced_work_packages).and_return(nil)+ allow(OpenProject::GithubIntegration::Services::UpsertPullRequest).to receive(:new).and_return(upsert_service)+ allow(upsert_service).to receive(:call).and_return(nil)+ end++ shared_examples_for 'not adding a comment' do+ it 'does not add comments to work packages' do+ process+ expect(handler_instance).to have_received(:comment_on_referenced_work_packages).with(+ [],+ github_system_user,+ anything+ )+ end+ end++ shared_examples_for 'adding a comment' do+ it 'adds a comment to the work packages' do+ process+ expect(handler_instance).to have_received(:comment_on_referenced_work_packages).with(+ [work_package],+ github_system_user,+ comment+ )+ end+ end++ shared_examples_for 'calls the pull request upsert service' do+ it 'calls the pull request upsert service' do+ process+ expect(upsert_service).to have_received(:call).with(payload['pull_request'], work_packages: [work_package])+ end++ context 'when no work_package was mentioned' do+ let(:pr_body) { 'some text that does not mention any work package' }++ it 'does not call the pull request upsert service' do+ process+ expect(upsert_service).not_to have_received(:call)+ end+ end+ end++ context 'with a closed action' do+ let(:action) { 'closed' }+ let(:comment) do+ "**PR Closed:** Pull request 1 [A PR title](http://pr.url) for [test_user/repo](github.com/test_user/repo)" \+ " has been closed by [test_user](github.com/test_user).\n"+ end++ it_behaves_like 'adding a comment'+ it_behaves_like 'calls the pull request upsert service'+ end++ context 'with a closed action when the PR was merged' do+ let(:action) { 'closed' }+ let(:pr_merged) { true }+ let(:comment) do+ "**PR Merged:** Pull request 1 [A PR title](http://pr.url) for [test_user/repo](github.com/test_user/repo)" \+ " has been merged by [test_user](github.com/test_user).\n"+ end++ it_behaves_like 'adding a comment'+ it_behaves_like 'calls the pull request upsert service'++ context 'when the work package is already known to the GithubPullRequest' do+ let(:github_pull_request) { FactoryBot.create(:github_pull_request, github_id: 123, work_packages: [work_package]) }++ before { github_pull_request }++ it_behaves_like 'adding a comment'++ it 'calls the pull request upsert service' do+ process+ expect(upsert_service).to have_received(:call).with(payload['pull_request'], work_packages: [work_package])+ end+ end+ end++ context 'with a converted_to_draft action' do+ let(:action) { 'converted_to_draft' }++ it_behaves_like 'not adding a comment'+ it_behaves_like 'calls the pull request upsert service'+ end++ context 'with an edited action' do+ let(:action) { 'edited' }+ let(:comment) do+ "**Referenced in PR:** [test_user](github.com/test_user) referenced this work package" \+ " in Pull request 1 [A PR title](http://pr.url) on [test_user/repo](github.com/test_user/repo).\n"+ end++ it_behaves_like 'adding a comment'+ it_behaves_like 'calls the pull request upsert service'++ context 'when a GithubPullRequest exists that is not linked to the mentioned work package yet' do+ let(:github_pull_request) { FactoryBot.create(:github_pull_request, github_id: 123) }++ before { github_pull_request }++ it_behaves_like 'adding a comment'++ it 'calls the pull request upsert service' do+ process+ expect(upsert_service).to have_received(:call).with(payload['pull_request'], work_packages: [work_package])+ end+ end++ context 'when the work package is already known to the GithubPullRequest' do+ let(:github_pull_request) { FactoryBot.create(:github_pull_request, github_id: 123, work_packages: [work_package]) }++ before { github_pull_request }++ it_behaves_like 'not adding a comment'++ it 'calls the pull request upsert service' do+ process+ expect(upsert_service).to have_received(:call).with(payload['pull_request'], work_packages: [work_package])+ end+ end++ context 'when the a work package is already known to the GithubPullRequest but another work package is new' do+ let(:github_pull_request) { FactoryBot.create(:github_pull_request, github_id: 123, work_packages: [work_package]) }+ let(:other_work_package) { FactoryBot.create(:work_package) }+ let(:pr_body) { "Mentioning OP##{work_package.id} and OP##{other_work_package.id}" }++ before do+ github_pull_request+ other_work_package+ end++ it 'adds a comment only for the other_work_package' do+ process+ expect(handler_instance).to have_received(:comment_on_referenced_work_packages).with(+ [other_work_package],+ github_system_user,+ comment+ )+ end++ it 'calls the pull request upsert service with all work_packages' do+ process+ expect(upsert_service).to have_received(:call).with(payload['pull_request'],+ work_packages: [work_package, other_work_package])+ end+ end+ end++ context 'with a labeled action' do+ let(:action) { 'labeled' }++ it_behaves_like 'not adding a comment'+ it_behaves_like 'calls the pull request upsert service'+ end++ context 'with an opened action' do+ let(:action) { 'opened' }+ let(:comment) do+ "**PR Opened:** Pull request 1 [A PR title](http://pr.url) for [test_user/repo](github.com/test_user/repo)" \+ " has been opened by [test_user](github.com/test_user).\n"+ end++ it_behaves_like 'adding a comment'+ it_behaves_like 'calls the pull request upsert service'+ end++ context 'with an opened action when the PR is a draft' do+ let(:action) { 'opened' }+ let(:pr_draft) { true }+ let(:comment) do+ "**PR Opened:** Pull request 1 [A PR title](http://pr.url) for [test_user/repo](github.com/test_user/repo)" \+ " has been opened by [test_user](github.com/test_user).\n"+ end++ it_behaves_like 'adding a comment'+ it_behaves_like 'calls the pull request upsert service'+ end++ context 'with a ready_for_review action' do+ let(:action) { 'ready_for_review' }+ let(:comment) do+ "**PR Ready for Review:** Pull request 1 [A PR title](http://pr.url)" \+ " for [test_user/repo](github.com/test_user/repo) was marked as ready for review by [test_user](github.com/test_user).\n"+ end++ it_behaves_like 'adding a comment'+ it_behaves_like 'calls the pull request upsert service'+ end++ context 'with a reopened action' do+ let(:action) { 'reopened' }+ let(:comment) do+ "**PR Opened:** Pull request 1 [A PR title](http://pr.url) for [test_user/repo](github.com/test_user/repo)" \+ " has been opened by [test_user](github.com/test_user).\n"+ end++ it_behaves_like 'adding a comment'+ it_behaves_like 'calls the pull request upsert service'+ end++ context 'with a synchronize action' do+ let(:action) { 'synchronize' }++ it_behaves_like 'not adding a comment'+ it_behaves_like 'calls the pull request upsert service'+ end+enddiff --git a/modules/github_integration/spec/lib/open_project/github_integration/notification_handler_spec.rb b/modules/github_integration/spec/lib/open_project/github_integration/notification_handler_spec.rbnew file mode 100644index 00000000000..1a3b549a6ee--- /dev/null+++ b/modules/github_integration/spec/lib/open_project/github_integration/notification_handler_spec.rb@@ -0,0 +1,83 @@+#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2021 the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See docs/COPYRIGHT.rdoc for more details.+#++++require File.expand_path('../../../spec_helper', __dir__)++describe OpenProject::GithubIntegration::NotificationHandler do+ let(:payload) { {} }++ shared_examples_for 'a notification handler' do+ let(:handler) { instance_double(handler_class) }++ before do+ allow(handler_class).to receive(:new).and_return(handler)+ allow(handler).to receive(:process).and_return(nil)+ end++ it 'forwards the payload to a new handler instance' do+ process+ expect(handler).to have_received(:process).with(payload)+ end++ context 'when the handler throws an error' do+ before do+ allow(handler).to receive(:process).and_raise("oops")+ allow(Rails.logger).to receive(:error)+ end++ it 'logs the error message' do+ expect { process }.to raise_error("oops")+ expect(Rails.logger).to have_received(:error)+ end+ end+ end++ describe '.check_run' do+ subject(:process) { described_class.check_run(payload) }++ let(:handler_class) { described_class::CheckRun }++ it_behaves_like 'a notification handler'+ end++ describe '.issue_comment' do+ subject(:process) { described_class.issue_comment(payload) }++ let(:handler_class) { described_class::IssueComment }++ it_behaves_like 'a notification handler'+ end++ describe '.pull_request' do+ subject(:process) { described_class.pull_request(payload) }++ let(:handler_class) { described_class::PullRequest }++ it_behaves_like 'a notification handler'+ end+enddiff --git a/modules/github_integration/spec/lib/open_project/github_integration/services/upsert_check_run_spec.rb b/modules/github_integration/spec/lib/open_project/github_integration/services/upsert_check_run_spec.rbnew file mode 100644index 00000000000..add232d577d--- /dev/null+++ b/modules/github_integration/spec/lib/open_project/github_integration/services/upsert_check_run_spec.rb@@ -0,0 +1,83 @@+#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2021 the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See docs/COPYRIGHT.rdoc for more details.+#++++require File.expand_path('../../../../spec_helper', __dir__)++describe OpenProject::GithubIntegration::Services::UpsertCheckRun do+ subject(:upsert) { described_class.new.call(params, pull_request: github_pull_request) }++ let(:github_pull_request) { FactoryBot.create :github_pull_request }+ let(:params) do+ {+ 'id' => 123,+ 'html_url' => 'https://github.com/check_runs/123',+ 'name' => 'test',+ 'status' => 'completed',+ 'conclusion' => 'success',+ 'details_url' => 'https://github.com/details',+ 'started_at' => 1.hour.ago.iso8601,+ 'completed_at' => 1.minute.ago.iso8601,+ 'output' => {+ 'title' => 'a title',+ 'summary' => 'a summary'+ },+ 'app' => {+ 'id' => 456,+ 'owner' => {+ 'avatar_url' => 'https:://github.com/apps/456/avatar.png'+ }+ }+ }+ end++ it 'creates a new check run for the given pull request' do+ expect { upsert }.to change(GithubCheckRun, :count).by(1)++ expect(GithubCheckRun.last).to have_attributes(+ github_id: 123,+ github_html_url: 'https://github.com/check_runs/123',+ app_id: 456,+ github_app_owner_avatar_url: 'https:://github.com/apps/456/avatar.png',+ name: 'test',+ status: 'completed',+ conclusion: 'success',+ output_title: 'a title',+ output_summary: 'a summary',+ details_url: 'https://github.com/details',+ github_pull_request: github_pull_request+ )+ end++ context 'when a check run with that id already exists' do+ let(:check_run) { FactoryBot.create(:github_check_run, github_id: 123, status: 'queued') }++ it 'updates the check run' do+ expect { upsert }.to change { check_run.reload.status }.from('queued').to('completed')+ end+ end+enddiff --git a/modules/github_integration/spec/lib/open_project/github_integration/services/upsert_github_user_spec.rb b/modules/github_integration/spec/lib/open_project/github_integration/services/upsert_github_user_spec.rbnew file mode 100644index 00000000000..2bd43be9410--- /dev/null+++ b/modules/github_integration/spec/lib/open_project/github_integration/services/upsert_github_user_spec.rb@@ -0,0 +1,63 @@+#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2021 the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See docs/COPYRIGHT.rdoc for more details.+#++++require File.expand_path('../../../../spec_helper', __dir__)++describe OpenProject::GithubIntegration::Services::UpsertGithubUser do+ subject(:upsert) { described_class.new.call(params) }++ let(:params) do+ {+ 'id' => 123,+ 'login' => 'test_user',+ 'html_url' => 'https://github.com/test_user',+ 'avatar_url' => 'https://github.com/test_user/avatar.jpg'+ }+ end++ it 'creates a new github user' do+ expect { upsert }.to change(GithubUser, :count).by(1)++ expect(GithubUser.last).to have_attributes(+ github_id: 123,+ github_login: 'test_user',+ github_html_url: 'https://github.com/test_user',+ github_avatar_url: 'https://github.com/test_user/avatar.jpg'+ )+ end++ context 'when a github user with that id already exists' do+ let(:github_user) do+ FactoryBot.create(:github_user, github_id: 123, github_avatar_url: 'https://github.com/test_user/old_avatar.jpg')+ end++ it 'updates the github user' do+ expect { upsert }.to change { github_user.reload.github_avatar_url }.from('https://github.com/test_user/old_avatar.jpg').to('https://github.com/test_user/avatar.jpg')+ end+ end+enddiff --git a/modules/github_integration/spec/lib/open_project/github_integration/services/upsert_partial_pull_request_spec.rb b/modules/github_integration/spec/lib/open_project/github_integration/services/upsert_partial_pull_request_spec.rbnew file mode 100644index 00000000000..34fc1b467de--- /dev/null+++ b/modules/github_integration/spec/lib/open_project/github_integration/services/upsert_partial_pull_request_spec.rb@@ -0,0 +1,118 @@+#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2021 the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See docs/COPYRIGHT.rdoc for more details.+#++++require File.expand_path('../../../../spec_helper', __dir__)++describe OpenProject::GithubIntegration::Services::UpsertPartialPullRequest do+ subject(:upsert) { described_class.new.call(**params) }++ let(:params) do+ {+ github_html_url: 'https://github.com/pulls/1',+ number: 23,+ repository: 'test_user/repo',+ work_packages: work_packages+ }+ end+ let(:work_packages) { FactoryBot.create_list(:work_package, 1) }++ it 'creates a new github pull request' do+ expect { upsert }.to change(GithubPullRequest, :count).by(1)++ expect(GithubPullRequest.last).to have_attributes(+ github_id: nil,+ state: 'partial',+ number: 23,+ github_html_url: 'https://github.com/pulls/1',+ repository: 'test_user/repo',+ work_packages: work_packages+ )+ end++ context 'when a github pull request with that html_url already exists' do+ let(:github_pull_request) do+ FactoryBot.create(:github_pull_request,+ state: 'partial',+ github_html_url: 'https://github.com/pulls/1')+ end++ it 'updates the github pull request' do+ expect { upsert }.to change { github_pull_request.reload.work_packages }.from([]).to(work_packages)+ end+ end++ context 'when a github pull request with that html_url and work_package exists' do+ let(:github_pull_request) do+ FactoryBot.create(:github_pull_request,+ state: 'partial',+ github_html_url: 'https://github.com/pulls/1',+ work_packages: work_packages)+ end++ it 'does not change the associated work packages' do+ expect { upsert }.not_to(change { github_pull_request.reload.work_packages.to_a })+ end+ end++ context 'when a github pull request with that html_url and work_package exists and a new work_package is referenced' do+ let(:github_pull_request) do+ FactoryBot.create(:github_pull_request,+ state: 'partial',+ github_html_url: 'https://github.com/pulls/1',+ work_packages: already_known_work_packages)+ end+ let(:work_packages) { FactoryBot.create_list(:work_package, 2) }+ let(:already_known_work_packages) { [work_packages[0]] }++ it 'adds the new work package' do+ expect { upsert }.to change { github_pull_request.reload.work_packages }.from(already_known_work_packages).to(work_packages)+ end+ end++ context 'when an open github pull request with that html_url and work_package exists and a new work_package is referenced' do+ let(:github_pull_request) do+ FactoryBot.create(:github_pull_request,+ state: 'open',+ github_html_url: 'https://github.com/pulls/1',+ repository: 'some_user/a_repository',+ work_packages: already_known_work_packages)+ end+ let(:work_packages) { FactoryBot.create_list(:work_package, 2) }+ let(:already_known_work_packages) { [work_packages[0]] }++ it 'only adds the new work package and leaves the state untouched' do+ expect { upsert }.to change { github_pull_request.reload.work_packages }.from(already_known_work_packages).to(work_packages)++ expect(github_pull_request).to have_attributes(+ state: 'open',+ github_html_url: 'https://github.com/pulls/1',+ repository: 'some_user/a_repository'+ )+ end+ end+enddiff --git a/modules/github_integration/spec/lib/open_project/github_integration/services/upsert_pull_request_spec.rb b/modules/github_integration/spec/lib/open_project/github_integration/services/upsert_pull_request_spec.rbnew file mode 100644index 00000000000..5c1802b96a3--- /dev/null+++ b/modules/github_integration/spec/lib/open_project/github_integration/services/upsert_pull_request_spec.rb@@ -0,0 +1,218 @@+#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2021 the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See docs/COPYRIGHT.rdoc for more details.+#++++require File.expand_path('../../../../spec_helper', __dir__)++describe OpenProject::GithubIntegration::Services::UpsertPullRequest do+ subject(:upsert) { described_class.new.call(params, work_packages: work_packages) }++ let(:params) do+ {+ 'id' => 123,+ 'number' => 5,+ 'html_url' => 'https://github.com/test_user/repo',+ 'updated_at' => '20210409T12:13:14Z',+ 'state' => pr_state,+ 'title' => 'The PR title',+ 'body' => 'The PR body',+ 'draft' => false,+ 'comments' => 12,+ 'review_comments' => 13,+ 'additions' => 14,+ 'deletions' => 15,+ 'changed_files' => 16,+ 'labels' => labels_payload,+ 'base' => {+ 'repo' => {+ 'full_name' => 'test_user/repo'+ }+ },+ 'user' => user_payload,+ **merged_payload+ }+ end+ let(:labels_payload) { [] }+ let(:pr_state) { 'open' }+ let(:merged_payload) do+ {+ 'merged' => false,+ 'merged_by' => nil,+ 'merged_at' => nil+ }+ end+ let(:user_payload) do+ {+ 'id' => 456,+ 'login' => 'test_user',+ 'html_url' => 'https://github.com/test_user',+ 'avatar_url' => 'https://github.com/test_user/avatar.jpg'+ }+ end+ let(:work_packages) { FactoryBot.create_list(:work_package, 1) }+ let(:github_user) { FactoryBot.create(:github_user) }+ let(:upsert_github_user_service) { instance_double(OpenProject::GithubIntegration::Services::UpsertGithubUser) }++ before do+ allow(OpenProject::GithubIntegration::Services::UpsertGithubUser).to receive(:new).and_return(upsert_github_user_service)+ allow(upsert_github_user_service).to receive(:call).and_return(github_user)+ end++ it 'creates a new github pull request and calls the upsert github user service' do+ expect { upsert }.to change(GithubPullRequest, :count).by(1)++ expect(upsert_github_user_service).to have_received(:call).with(user_payload)++ expect(GithubPullRequest.last).to have_attributes(+ github_id: 123,+ number: 5,+ github_html_url: 'https://github.com/test_user/repo',+ github_updated_at: Time.zone.parse('20210409T12:13:14Z'),+ state: 'open',+ title: 'The PR title',+ body: 'The PR body',+ draft: false,+ merged: false,+ merged_by: nil,+ merged_at: nil,+ comments_count: 12,+ review_comments_count: 13,+ additions_count: 14,+ deletions_count: 15,+ changed_files_count: 16,+ labels: [],+ repository: 'test_user/repo',+ github_user: github_user,+ work_packages: work_packages+ )+ end++ context 'when a github pull request with that id already exists' do+ let(:github_pull_request) do+ FactoryBot.create(:github_pull_request, github_id: 123, title: 'old title')+ end++ it 'updates the github pull request' do+ expect { upsert }.to change { github_pull_request.reload.title }.from('old title').to('The PR title')+ end+ end++ context 'when a partial github pull request with that html_url already exists' do+ let(:github_pull_request) do+ FactoryBot.create(:github_pull_request, github_html_url: 'https://github.com/test_user/repo', state: 'partial')+ end++ it 'updates the github pull request' do+ expect { upsert }.to change { github_pull_request.reload.state }.from('partial').to('open')+ end+ end++ context 'when a github pull request with that id and work_package exists' do+ let(:github_pull_request) do+ FactoryBot.create(:github_pull_request, github_id: 123, work_packages: work_packages)+ end++ it 'does not change the associated work packages' do+ expect { upsert }.not_to(change { github_pull_request.reload.work_packages.to_a })+ end+ end++ context 'when a github pull request with that id and work_package exists and a new work_package is referenced' do+ let(:github_pull_request) do+ FactoryBot.create(:github_pull_request, github_id: 123,+ work_packages: already_known_work_packages)+ end+ let(:work_packages) { FactoryBot.create_list(:work_package, 2) }+ let(:already_known_work_packages) { [work_packages[0]] }++ it 'adds the new work package' do+ expect { upsert }.to change { github_pull_request.reload.work_packages }.from(already_known_work_packages).to(work_packages)+ end+ end++ context 'when the pr is merged' do+ let(:pr_state) { 'open' }+ let(:merged_payload) do+ {+ 'merged' => true,+ 'merged_by' => user_payload,+ 'merged_at' => '20210410T09:45:03Z'+ }+ end++ it 'sets the merge attributes' do+ expect { upsert }.to change(GithubPullRequest, :count).by(1)++ expect(upsert_github_user_service).to have_received(:call).with(user_payload).twice++ expect(GithubPullRequest.last).to have_attributes(+ github_id: 123,+ github_user: github_user,+ merged: true,+ merged_by: github_user,+ merged_at: Time.zone.parse('20210410T09:45:03Z')+ )+ end+ end++ context 'when the pull request payload contains label data' do+ let(:labels_payload) do+ [+ {+ 'id' => 123456789,+ 'name' => 'grey',+ 'color' => '#666',+ 'description' => "An evil'ish gray tone"+ },+ {+ 'id' => 987654321,+ 'name' => 'white',+ 'color' => '#fff',+ 'description' => "A haven'ish white tone"+ }+ ]+ end++ it 'stores the label attributes' do+ expect { upsert }.to change(GithubPullRequest, :count).by(1)++ expect(GithubPullRequest.last).to have_attributes(+ github_id: 123,+ labels: [+ {+ 'name' => 'grey',+ 'color' => '#666'+ },+ {+ 'name' => 'white',+ 'color' => '#fff'+ }+ ]+ )+ end+ end+enddiff --git a/modules/github_integration/spec/models/github_check_run_spec.rb b/modules/github_integration/spec/models/github_check_run_spec.rbnew file mode 100644index 00000000000..3c705df2267--- /dev/null+++ b/modules/github_integration/spec/models/github_check_run_spec.rb@@ -0,0 +1,37 @@+#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2021 the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See docs/COPYRIGHT.rdoc for more details.+#+++require "#{File.dirname(__FILE__)}/../spec_helper"++describe GithubCheckRun do+ describe "validations" do+ it { is_expected.to validate_presence_of :github_app_owner_avatar_url }+ it { is_expected.to validate_presence_of :github_html_url }+ it { is_expected.to validate_presence_of :github_id }+ it { is_expected.to validate_presence_of :status }+ end+enddiff --git a/modules/github_integration/spec/models/github_pull_request_spec.rb b/modules/github_integration/spec/models/github_pull_request_spec.rbnew file mode 100644index 00000000000..fe9bde044e5--- /dev/null+++ b/modules/github_integration/spec/models/github_pull_request_spec.rb@@ -0,0 +1,182 @@+#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2021 the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See docs/COPYRIGHT.rdoc for more details.+#+++require "#{File.dirname(__FILE__)}/../spec_helper"++describe GithubPullRequest do+ describe "validations" do+ it { is_expected.to validate_presence_of :github_html_url }+ it { is_expected.to validate_presence_of :number }+ it { is_expected.to validate_presence_of :repository }+ it { is_expected.to validate_presence_of :state }++ context 'when it is not a partial pull request' do+ subject { described_class.new(state: 'open') }++ it { is_expected.to validate_presence_of :github_updated_at }+ it { is_expected.to validate_presence_of :title }+ it { is_expected.to validate_presence_of :body }+ it { is_expected.to validate_presence_of :comments_count }+ it { is_expected.to validate_presence_of :review_comments_count }+ it { is_expected.to validate_presence_of :additions_count }+ it { is_expected.to validate_presence_of :deletions_count }+ it { is_expected.to validate_presence_of :changed_files_count }+ end++ describe 'labels' do+ it { is_expected.to allow_value(nil).for(:labels) }+ it { is_expected.to allow_value([]).for(:labels) }+ it { is_expected.to allow_value([{ 'color' => '#666', 'name' => 'grey' }]).for(:labels) }+ it { is_expected.not_to allow_value([{ 'name' => 'grey' }]).for(:labels) }+ it { is_expected.not_to allow_value([{}]).for(:labels) }+ end+ end++ describe '.complete' do+ subject { described_class.complete }++ let(:open) { FactoryBot.create(:github_pull_request, :open) }+ let(:merged) { FactoryBot.create(:github_pull_request, :closed_merged) }+ let(:closed) { FactoryBot.create(:github_pull_request, :closed_unmerged) }+ let(:partial) { FactoryBot.create(:github_pull_request, :partial) }+ let(:all_pull_requests) { [open, merged, closed, partial] }++ before { all_pull_requests }++ it { is_expected.to match_array [open, merged, closed] }+ end++ describe '.without_work_package' do+ subject { described_class.without_work_package }++ let(:pull_request) { FactoryBot.create(:github_pull_request, work_packages: work_packages) }+ let(:work_packages) { [] }++ before { pull_request }++ it { is_expected.to match_array([pull_request]) }++ context 'when the pr is linked to a work_package' do+ let(:work_packages) { FactoryBot.create_list(:work_package, 1) }++ it { is_expected.to be_empty }+ end+ end++ describe '#partial?' do+ context 'when the state is partial' do+ subject { described_class.new(state: 'partial').partial? }++ it { is_expected.to be true }+ end++ context 'when the state is open' do+ subject { described_class.new(state: 'open').partial? }++ it { is_expected.to be false }+ end++ context 'when the state is closed' do+ subject { described_class.new(state: 'closed').partial? }++ it { is_expected.to be false }+ end+ end++ describe '#latest_check_runs' do+ subject { pull_request.reload.latest_check_runs }++ let(:pull_request) { FactoryBot.create(:github_pull_request) }++ it { is_expected.to be_empty }++ context 'when multiple check_runs from different apps with different names exist' do+ let(:latest_check_runs) do+ [+ FactoryBot.create(+ :github_check_run,+ app_id: 123,+ name: 'test',+ started_at: 1.minute.ago,+ github_pull_request: pull_request+ ),+ FactoryBot.create(+ :github_check_run,+ app_id: 123,+ name: 'lint',+ started_at: 1.minute.ago,+ github_pull_request: pull_request+ ),+ FactoryBot.create(+ :github_check_run,+ app_id: 456,+ name: 'test',+ started_at: 1.minute.ago,+ github_pull_request: pull_request+ ),+ FactoryBot.create(+ :github_check_run,+ app_id: 789,+ name: 'test',+ started_at: 1.minute.ago,+ github_pull_request: pull_request+ )+ ]+ end+ let(:outdated_check_runs) do+ [+ FactoryBot.create(+ :github_check_run,+ app_id: 123,+ name: 'test',+ started_at: 2.minutes.ago,+ github_pull_request: pull_request+ ),+ FactoryBot.create(+ :github_check_run,+ app_id: 123,+ name: 'test',+ started_at: 3.minutes.ago,+ github_pull_request: pull_request+ ),+ FactoryBot.create(+ :github_check_run,+ app_id: 123,+ name: 'lint',+ started_at: 5.minutes.ago,+ github_pull_request: pull_request+ )+ ]+ end+ let(:check_runs) { latest_check_runs + outdated_check_runs }++ before { check_runs }++ it { is_expected.to match_array(latest_check_runs) }+ end+ end+enddiff --git a/modules/github_integration/spec/models/github_user_spec.rb b/modules/github_integration/spec/models/github_user_spec.rbnew file mode 100644index 00000000000..38217871193--- /dev/null+++ b/modules/github_integration/spec/models/github_user_spec.rb@@ -0,0 +1,37 @@+#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2021 the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See docs/COPYRIGHT.rdoc for more details.+#+++require "#{File.dirname(__FILE__)}/../spec_helper"++describe GithubUser do+ describe "validations" do+ it { is_expected.to validate_presence_of :github_id }+ it { is_expected.to validate_presence_of :github_login }+ it { is_expected.to validate_presence_of :github_html_url }+ it { is_expected.to validate_presence_of :github_avatar_url }+ end+enddiff --git a/modules/github_integration/spec/spec_helper.rb b/modules/github_integration/spec/spec_helper.rbindex 24c1ceca128..389df270a75 100644--- a/modules/github_integration/spec/spec_helper.rb+++ b/modules/github_integration/spec/spec_helper.rb@@ -27,3 +27,5 @@#++require 'spec_helper'++Dir[File.join(File.dirname(__FILE__), 'support/**/*.rb')].sort.each { |f| require f }diff --git a/modules/github_integration/spec/support/webhook_fixture_helpers.rb b/modules/github_integration/spec/support/webhook_fixture_helpers.rbnew file mode 100644index 00000000000..e13a6706a9c--- /dev/null+++ b/modules/github_integration/spec/support/webhook_fixture_helpers.rb@@ -0,0 +1,53 @@+#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2021 the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See docs/COPYRIGHT.rdoc for more details.+#++++require 'json'++module WebhookFixtureHelpers+ FIXTURES_PATH = File.join(File.dirname(__FILE__), '../fixtures/github_webhooks')++ # Params:+ # * replacements: A `Hash` containing replacement values for placeholders in the fixture files,+ # usually:+ # ```+ # {+ # title: "A PR title",+ # body: "A PR body",+ # }+ # ```+ def webhook_payload(event, name, replacements = {})+ replacements = replacements.map { |key, value| ["${#{key}}", value.gsub("\n", '\n')] }.to_h+ content = File.read(File.join(FIXTURES_PATH, "#{event}/#{name}.json"))+ content.gsub!(/\$\{[^{]+?\}/, replacements)+ JSON.parse(content)+ end+end++RSpec.configure do |config|+ config.include WebhookFixtureHelpers+enddiff --git a/modules/github_integration/spec/workers/cron/clear_old_pull_requests_job_spec.rb b/modules/github_integration/spec/workers/cron/clear_old_pull_requests_job_spec.rbnew file mode 100644index 00000000000..16f38b7ecfd--- /dev/null+++ b/modules/github_integration/spec/workers/cron/clear_old_pull_requests_job_spec.rb@@ -0,0 +1,55 @@+#-- encoding: UTF-8++#-- copyright+# OpenProject is an open source project management software.+# Copyright (C) 2012-2021 the OpenProject GmbH+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License version 3.+#+# OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:+# Copyright (C) 2006-2013 Jean-Philippe Lang+# Copyright (C) 2010-2013 the ChiliProject Team+#+# This program is free software; you can redistribute it and/or+# modify it under the terms of the GNU General Public License+# as published by the Free Software Foundation; either version 2+# of the License, or (at your option) any later version.+#+# This program is distributed in the hope that it will be useful,+# but WITHOUT ANY WARRANTY; without even the implied warranty of+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the+# GNU General Public License for more details.+#+# You should have received a copy of the GNU General Public License+# along with this program; if not, write to the Free Software+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.+#+# See docs/COPYRIGHT.rdoc for more details.+#++++require 'spec_helper'++describe Cron::ClearOldPullRequestsJob, type: :job do+ let(:pull_request_without_work_package) do+ FactoryBot.create(:github_pull_request, work_packages: [])+ end+ let(:pull_request_with_work_package) { FactoryBot.create(:github_pull_request, work_packages: [work_package]) }+ let(:work_package) { FactoryBot.create(:work_package) }+ let(:check_run) { FactoryBot.create(:github_check_run, github_pull_request: pull_request_without_work_package) }++ let(:job) { described_class.new }++ before do+ pull_request_without_work_package+ check_run+ pull_request_with_work_package+ end++ it 'removes pull request without work packages attached' do+ expect { job.perform }.to change(GithubPullRequest, :count).by(-1).and(change(GithubCheckRun, :count).by(-1))++ expect(GithubPullRequest.all)+ .to match_array([pull_request_with_work_package])+ end+enddiff --git a/modules/meeting/spec/factories/meeting_journal_factory.rb b/modules/meeting/spec/factories/meeting_journal_factory.rbindex 705cb313ee6..5038a718359 100644--- a/modules/meeting/spec/factories/meeting_journal_factory.rb+++ b/modules/meeting/spec/factories/meeting_journal_factory.rb@@ -29,7 +29,7 @@FactoryBot.define dofactory :meeting_journal docreated_at { Time.now }- sequence(:version) { |n| n }+ sequence(:version)factory :meeting_content_journal, class: Journal dojournable_type { 'MeetingContent' }diff --git a/spec/factories/journal_factory.rb b/spec/factories/journal_factory.rbindex 237c9611c31..d6c87fbc565 100644--- a/spec/factories/journal_factory.rb+++ b/spec/factories/journal_factory.rb@@ -30,7 +30,7 @@ FactoryBot.define dofactory :journal douser factory: :usercreated_at { Time.now }- sequence(:version) { |n| n + 1 }+ sequence(:version, 1)callback(:after_create) do |journal, evaluator|data = evaluator.datadiff --git a/spec/factories/type_factory.rb b/spec/factories/type_factory.rbindex 901f92bb028..d17fba6990d 100644--- a/spec/factories/type_factory.rb+++ b/spec/factories/type_factory.rb@@ -28,7 +28,7 @@FactoryBot.define dofactory :type do- sequence(:position) { |p| p }+ sequence(:position)name { |a| "Type No. #{a.position}" }description { nil }created_at { Time.now }