Skip to content

Shared & Report Retry Consumer Workflow #10

Shared & Report Retry Consumer Workflow

Shared & Report Retry Consumer Workflow #10

name: Auto Comment on PR
on:
pull_request:
paths:
- 'Shared/*'
jobs:
auto-comment:
runs-on: ubuntu-latest
steps:
- name: Check PR Changes
id: pr-changes
run: echo "::set-output name=changes::${{ toJson(github.event.pull_request.changed_files) }}"
- name: Create Comment
if: steps.pr-changes.outputs.changes != '[]'
run: |
# Use GitHub API to create a comment on the PR
PR_NUMBER=${{ github.event.pull_request.number }}
COMMENT="****THERE IS A NEW APPROACH TO VERSIONING OF THE SHARED PROJECT*****\nPlease refer here for guidance: https://lantana.atlassian.net/wiki/spaces/LSD/pages/493322243/Shared+NuGet+Project+Versioning+and+Releases"
GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}
COMMENT_URL="https://api.github.com/repos/${{ github.repository }}/issues/${PR_NUMBER}/comments"
curl -s -H "Authorization: token ${GITHUB_TOKEN}" -X POST $COMMENT_URL -d "{\"body\":\"$COMMENT\"}"