-
Notifications
You must be signed in to change notification settings - Fork 354
42 lines (40 loc) · 1.28 KB
/
milestone-pr.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
name: Milestone & Project PR Automation
on:
pull_request:
branches: [main]
workflow_dispatch:
permissions: read-all
jobs:
milestone:
name: Add milestone to GitHub PR
if: github.actor == 'renovate[bot]'
runs-on: ubuntu-24.04
permissions:
issues: write
pull-requests: write
steps:
- name: Find current milestone and add it to GitHub PR
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
with:
script: |
const { data: [milestone] } = await github.rest.issues.listMilestones({
owner: context.repo.owner,
repo: context.repo.repo,
});
await github.rest.issues.update({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
milestone: milestone.number,
});
project:
name: Add project to GitHub PR
if: github.actor == 'renovate[bot]'
runs-on: ubuntu-24.04
steps:
- name: Add Project
uses: actions/add-to-project@244f685bbc3b7adfa8466e08b698b5577571133e # v.1.0.2
with:
project-url: https://github.com/orgs/nginxinc/projects/17/views/1
github-token: ${{ secrets.ADD_TO_PROJECT_TOKEN }}