Skip to content

Support for comments - #32

Open
maury91 wants to merge 4 commits into
swisscom:masterfrom
maury91:master
Open

Support for comments#32
maury91 wants to merge 4 commits into
swisscom:masterfrom
maury91:master

Conversation

@maury91

@maury91 maury91 commented Jul 31, 2019

Copy link
Copy Markdown

This change introduces the support for comments on Merge Requests.

The plugin will search the Merge Requests that are trying to merge the branch on where the plugin is run. Usually, it's only one merge request (it's improbable to open multiple merge requests for the same branch).

Once it gathers the merge requests, the plugin will post the comment specified in the config.

The plugin supports the use of single/multiple files.

Example:

jobs:
- name: test-merge-request
  plan:
  - get: repo
    resource: repo-mr
    trigger: true
  - put: repo-mr
    params:
      repository: repo
      status: running
  - task: run-tests
    file: repo/ci/tasks/run-tests.yml
  on_failure:
    put: repo-mr
    params:
      repository: repo
      status: failed
  on_success:
    put: repo-mr
    params:
      repository: repo
      status: success
      comment:
        files: 
          original: in/comment.txt
          updated: out/comment.txt
        text: |
          Original comment:
          $original
          
          new comment:
          $updated

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

Successfully merging this pull request may close these issues.

2 participants