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

Support for comments #32

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Support for comments #32

wants to merge 4 commits into from

Conversation

maury91
Copy link

@maury91 maury91 commented Jul 31, 2019

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