Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documentation is totally wrong for webhook-go #644

Open
yakatz opened this issue Feb 15, 2024 · 0 comments
Open

Documentation is totally wrong for webhook-go #644

yakatz opened this issue Feb 15, 2024 · 0 comments

Comments

@yakatz
Copy link

yakatz commented Feb 15, 2024

It appears that the webhook section in README.md has not been updated for webhook-go. Notably, a lot of the values that seem like they should be optional are actually required by the different types.

I will try to submit a pull request at some point, but for reference, here is my working config:

  class { 'r10k::webhook':
    server => {
      protected => true,
      user      => 'secret_username',
      password  => 'secret_password',
      port      => 8088,
      tls       => {
        enabled     => true,
        certificate => "/etc/puppetlabs/puppet/ssl/certs/${facts['networking']['fqdn']}.pem",
        key         => "/etc/puppetlabs/puppet/ssl/private_keys/${facts['networking']['fqdn']}.pem",
      },
    },
    chatops => {
      enabled    => true,
      service    => 'slack',
      channel    => '#puppet',
      user       => 'r10k',
      auth_token => 'xoxb-not-a-valid-auth-token',
    }
  }

Slack Webhooks are deprecated and the new chatops works with Slack apps. You can get an API token quickly here: https://api.slack.com/tutorials/tracks/getting-a-token

The xoxb token can be found on the Install App page of the settings (https://api.slack.com/apps/_YOUR_APP_ID_/install-on-team)
image

The only permissions you should actually need are chat:write, chat:write.customize and possibly chat:write.public

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant