Skip to content
Permalink
Browse files

[github] add comment if rights are insufficient to set milestone

  • Loading branch information
3nids committed Jan 10, 2020
1 parent ef75083 commit a704341b4a54e3e8e7fb4fd2b90f34d047538d47
Showing with 13 additions and 0 deletions.
  1. +13 −0 .github/workflows/pr-auto-milestone.yml
@@ -105,3 +105,16 @@ jobs:
milestone: ${{ steps.compute_milestone.outputs.milestone_number }}
owner: ${{ github.event.pull_request.base.repo.owner.login }}
repo: ${{ github.event.pull_request.base.repo.name }}

# if the PR author could not set the milestone due to missing rights, add a comment
- name: leave comment for milestone
if: failure()
uses: octokit/request-action@v2.x
env:
GITHUB_TOKEN: ${{ steps.token.outputs.token }}
with:
route: POST /repos/:owner/:repo/issues/:pull_number/comments
pull_number: ${{ github.event.pull_request.number }}
body: ${{ format("**Calculated milestone for the PR: {0}**", steps.compute_milestone.outputs.milestone_number) }}

Check failure on line 118 in .github/workflows/pr-auto-milestone.yml

GitHub Actions / .github/workflows/pr-auto-milestone.yml

Parse error

You have an error in your yaml syntax on line 118
owner: ${{ github.event.pull_request.base.repo.owner.login }}
repo: ${{ github.event.pull_request.base.repo.name }}

0 comments on commit a704341

Please sign in to comment.
You can’t perform that action at this time.