Skip to content

Commit 2d6a2e6

Browse files
committed
ci: add GitHub Actions workflow to update Renovate pull requests
Define GitHub Actions workflow to add automatically labels and assignees on pull requests opened by Renovate bot Assisted-by: GPT-5.2 (GitHub Copilot) Signed-off-by: Pierre-Yves Lapersonne <pierreyves.lapersonne@orange.com>
1 parent 4546101 commit 2d6a2e6

File tree

1 file changed

+55
-0
lines changed

1 file changed

+55
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
#
2+
# Software Name: Orange Unified Design System
3+
# SPDX-FileCopyrightText: Copyright (c) Orange SA
4+
# SPDX-License-Identifier: MIT
5+
#
6+
# This software is distributed under the MIT license,
7+
# the text of which is available at https://opensource.org/license/MIT/
8+
# or see the "LICENSE" file for more details.
9+
#
10+
# Authors: See CONTRIBUTORS.txt
11+
# Software description: A SwiftUI components library with code examples for Orange Unified Design System
12+
#
13+
14+
# About runners: https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners
15+
# Runners details: https://github.com/actions/runner-images/tree/main/images/macos
16+
17+
name: "Update Renovate pull requests"
18+
19+
on:
20+
pull_request_target:
21+
types: [opened]
22+
23+
jobs:
24+
label_and_assign:
25+
runs-on: ubuntu-latest
26+
27+
permissions:
28+
contents: read
29+
30+
if: >-
31+
github.event.pull_request.user.login == 'renovate[bot]' &&
32+
startsWith(github.event.pull_request.title, 'chore(deps)')
33+
34+
steps:
35+
- name: Add labels and assignee
36+
uses: actions/github-script@v7
37+
with:
38+
github-token: ${{ secrets.RENOVATE_LABELER_TOKEN }}
39+
script: |
40+
const { owner, repo } = context.repo;
41+
const issue_number = context.payload.pull_request.number;
42+
43+
await github.rest.issues.addLabels({
44+
owner,
45+
repo,
46+
issue_number,
47+
labels: ['🛠️ technical', 'dependencies'],
48+
});
49+
50+
await github.rest.issues.addAssignees({
51+
owner,
52+
repo,
53+
issue_number,
54+
assignees: ['pylapp'],
55+
});

0 commit comments

Comments
 (0)