Codefresh Steps: Reusable Code for Common Operations
This page provides code you can use to perform common operations in the Codefresh CI/CD platform.
111.7K

kostis-codefresh/github-pr-comment kostis-codefresh/github-pr-comment

This pipeline plugin adds comments to GitHub pull requests

arguments

  • CF_PULL_REQUEST_NUMBER - Github pull request number (Automatically set in PR trigger events)
  • GIT_PROVIDER_NAME - Name of git provider to use from Codefresh integrations screen
  • PR_COMMENT_TEXT - Text body of the comment to be created
    version: '1.0'
steps:
  add_commenton_current_pr_from_trigger:
    title: Adding comment on this PR
    type: kostis-codefresh/github-pr-comment
    fail_fast: false
    arguments:
      PR_COMMENT_TEXT: >-
        Your staging environment is ready at
        http://example.com/${{CF_BRANCH_TAG_NORMALIZED}}/preview
      GIT_PROVIDER_NAME: github

  
    version: '1.0'
steps:
  add_pr_comment_directly:
    title: Adding comment on another PR
    type: kostis-codefresh/github-pr-comment
    fail_fast: false
    arguments:
      PR_COMMENT_TEXT: Example comment on PR 45
      GIT_PROVIDER_NAME: github
      CF_PULL_REQUEST_NUMBER: 45

  
github.com
Kostis Kapelonis
Apr 24, 2020