Pix4D / cogito

Concourse resource for GitHub Commit Status and Google Chat notifications
MIT License
35 stars 14 forks source link

Pci 2665 independent chat send add sinks to source #109

Closed Esysc closed 1 year ago

Esysc commented 1 year ago

Part of: PCI-2665

The resource Source configuration now parses the sinks parameter.

Example:

Obviously the example below is not realistic, we don't need to specify the default.

resources:
- name: gh-status
  type: cogito
  check_every: never
  source:
    owner: ((github-owner))
    repo: ((your-repo-name))
    access_token: ((github-PAT))
    sinks: ["github", "gchat"]

A more realistic example:

resources:
- name: gchat
  type: cogito
  check_every: never
  source:
    sinks: ["gchat"],
    gchat_webhook: https://my-chat-webhook

Note that when specifying the sink and only chat feature, the GitHub parameter are not mandatory anymore, but the webhook will be.

Best to review commit by commit.

Todos

I didn't touch the documentation yet, I prefer to wait for your feedback.

Esysc commented 1 year ago

Integration tests are failing because of the test repo commit that has reached the max statuses, I'm fixing it.

aliculPix4D commented 1 year ago

@Esysc very minor, but you have a typo in the PR title. indipendent ---> independent

marco-m-pix4d commented 1 year ago

@Esysc be careful that I forced-push your branches; you will have to do the following:

The rebase might generate merge conflicts if you had local changes

Esysc commented 1 year ago

All good, thanks @marco-m-pix4d

Esysc commented 1 year ago

Closed, replaced by https://github.com/Pix4D/cogito/pull/113