-
Notifications
You must be signed in to change notification settings - Fork 229
26 lines (24 loc) · 1.13 KB
/
ClosePullRequest.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
name: Closed Pull Request
on:
# pull_request_target runs the fork code in our context. Do not use it elsewhere!
# Here, it is OK because we're merging external PR and we're 100% sure about its content.
pull_request_target:
types: ["closed"]
jobs:
CreateNote_job:
name: Create release notes card
runs-on: ubuntu-latest
permissions:
# Limit available permissions to a required minimum, because we run under pull_request_target
repository-projects: write
# Single quotes must be used here https://docs.github.com/en/free-pro-team@latest/actions/reference/context-and-expression-syntax-for-github-actions#literals
if: |
github.event.pull_request.head.repo.full_name != github.repository
&& github.event.pull_request.user.type != 'Bot'
&& github.event.pull_request.merged
steps:
- uses: sonarsource/gh-action-lt-backlog/CreateNote@v1
with:
github-token: ${{secrets.GITHUB_TOKEN}}
column-id: 4971951
note: ${{ format('Release notes{0} {1} implemented {2}{3}', ':', github.event.pull_request.user.login, '#', github.event.pull_request.number) }}