-
Notifications
You must be signed in to change notification settings - Fork 60
28 lines (26 loc) · 1.08 KB
/
cross-repo-issue.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
27
28
name: Cross-repo Issue Creation
on:
pull_request:
types: [closed]
branches:
- "master"
jobs:
cross-repo:
runs-on: ubuntu-latest
steps:
- name: Generate token
id: generate_token
uses: tibdex/github-app-token@v1.8.0
with:
app_id: ${{ secrets.XREPO_APP_ID }}
private_key: ${{ secrets.XREPO_PEM }}
- name: create issue in other repo
if: "!contains(github.event.pull_request.labels.*.name, 'do not port') && github.event.pull_request.merged"
env:
GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }}
run: |
echo -e "A PR was merged over on PBC-Go\n\n- [https://github.com/prebid/prebid-cache/pull/${{github.event.number}}](https://github.com/prebid/prebid-cache/pull/${{github.event.number}})\n- timestamp: ${{ github.event.pull_request.merged_at}}" > msg
export msg=$(cat msg)
gh issue create --repo prebid/prebid-cache-java --title "Port PR from PBC-Go: ${{ github.event.pull_request.title }}" \
--body "$msg" \
--label auto