Skip to content

Instantly share code, notes, and snippets.

@bschonec
Created April 28, 2023 13:32
Show Gist options
  • Save bschonec/1cb1a5c417295fa9b73ab05b75bcadea to your computer and use it in GitHub Desktop.
Save bschonec/1cb1a5c417295fa9b73ab05b75bcadea to your computer and use it in GitHub Desktop.
require 'puppet/parameter/boolean'
require 'puppet_x/gms/type'
module Puppet
Puppet::Type.newtype(:git_integration) do
include PuppetX::GMS::Type
@doc = %q{TODO
}
ensurable do
defaultvalues
defaultto :present
end
newparam(:name, :namevar => true) do
desc 'A unique title for the key that will be provided to the prefered Git management system. Required.'
newvalues(:apple_app_store, :asana, :assembla, :bamboo, :bugzilla, :buildkite, :campfire, :datadog, :'unify-circuit', :pumble, :'webex-teams', :'custom-issue-tracker', :discord, :'drone-ci', :'emails-on-push', :ewm, :confluence, :shimo, :'external-wiki', :github, :'hangouts-chat', :irker, :jira, :'slack-slash-commands', :'mattermost-slash-commands', :packagist, :'pipelines-email', :pivotaltracker, :prometheus, :pushover, :redmine, :slack, :'microsoft-teams', :mattermost, :teamcity, :jenkins, :'jenkins-deprecated', :'mock-ci', :'squash-tm', :youtrack)
end
case :name
when 'hangouts-chat'
newparam(:confidential_issues_events, :boolean => true, :parent => Puppet::Parameter::Boolean) do
desc 'Enable notifications for confidential issue events.'
defaultto false
end
else
raise(Puppet::Error, "'#{name}' is not yet configured.")
end
@bschonec
Copy link
Author

---
git_integrations:
  "hangouts-chat":
    webhook: "https://chat.googleapis.com/v1/spaces"
    notify_only_broken_pipelines: true 
    notify_only_default_branch: true 
    branches_to_be_notified: 'main'
    push_events: true 
    issues_events: true 
    confidential_issues_events: true 
    merge_requests_events: true 
    tag_push_events: true 
    note_events: true 
    confidential_note_events: true 
    pipeline_events: true 
    wiki_page_events: true 
    provider: 'gitlab'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment