VirtualBox

source: vbox/trunk/src/VBox/Devices/EFI/FirmwareNew/.github/workflows/issue-assignment.yml@ 108794

Last change on this file since 108794 was 108794, checked in by vboxsync, 2 weeks ago

Devices/EFI/FirmwareNew: Merge edk2-stable202502 from the vendor branch and make it build for the important platforms, bugref:4643

  • Property svn:eol-style set to native
File size: 2.0 KB
Line 
1# Actions that should occur when a GitHub issue is assigned.
2#
3# Currently this will remove the `state:needs-owner` label when the issue is assigned to an owner.
4#
5# Copyright (c) Microsoft Corporation.
6# SPDX-License-Identifier: BSD-2-Clause-Patent
7
8name: React to Issue Assignment
9
10on:
11 issues:
12 types: assigned
13
14jobs:
15 adjust-labels:
16 name: Adjust Issue Labels
17 runs-on: ubuntu-latest
18
19 permissions:
20 contents: read
21 issues: write
22
23 steps:
24 - uses: actions/checkout@v4
25
26 - name: Remove Labels
27 env:
28 GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29 run: |
30 # All labels here will be removed if present in the issue
31 LABELS_TO_REMOVE=("state:needs-owner")
32
33 # Gather issue context information
34 ISSUE_NUMBER=$(jq --raw-output .issue.number "$GITHUB_EVENT_PATH")
35 OWNER=$(jq --raw-output .repository.owner.login "$GITHUB_EVENT_PATH")
36 REPO=$(jq --raw-output .repository.name "$GITHUB_EVENT_PATH")
37 LABELS=$(curl -s \
38 -H "Accept: application/vnd.github+json" \
39 -H "Authorization: Bearer $GITHUB_TOKEN" \
40 -H "X-GitHub-Api-Version: 2022-11-28" \
41 https://api.github.com/repos/$OWNER/$REPO/issues/$ISSUE_NUMBER/labels | jq -r '.[].name')
42
43 # Remove labels
44 for LABEL in "${LABELS_TO_REMOVE[@]}"; do
45 if echo "$LABELS" | grep -q "$LABEL"; then
46 curl -X DELETE \
47 -s \
48 -H "Accept: application/vnd.github+json" \
49 -H "Authorization: Bearer $GITHUB_TOKEN" \
50 -H "X-GitHub-Api-Version: 2022-11-28" \
51 https://api.github.com/repos/$OWNER/$REPO/issues/$ISSUE_NUMBER/labels/"$LABEL" > /dev/null
52 echo "$LABEL removed from issue #$ISSUE_NUMBER"
53 else
54 echo "$LABEL not found on issue #$ISSUE_NUMBER"
55 fi
56 done
Note: See TracBrowser for help on using the repository browser.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette