Pix4D / cogito

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

Feature Request: Optional target_url #159

Open rfpludwick opened 4 days ago

rfpludwick commented 4 days ago

I would love to be able to optionally set the target_url when setting the GH status. One of the Concourse CI systems I run is entirely private, but it does run pipelines for a public repository on GitHub. I'd like to be able to report build status, but without the URL as that is private information. Could define the optional target URL either in the resource configuration or on the put.

    on_success:
      put: gh-status
      inputs: [the-repo]
      params: {state: success, target_url: false}

---

- name: gh-status
  type: cogito
  check_every: never
  source:
    owner: ((github-owner))
    repo: ((your-repo-name))
    access_token: ((github-PAT))
    target_url: false
marco-m-pix4d commented 3 days ago

Ah, I understand the reasoning. Makes sense. I appreciate that you proposed a possible and backwards compatible configuration for this.

My first reaction is wondering if there is a way to make the intent more explicit. For example: omit_target_url (bool). In any case, this is a nitpick.

rfpludwick commented 3 days ago

@marco-m-pix4d Yeah, something like omit_target_url is probably better! I like that.