summaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorHiFiPhile <[email protected]>2024-04-06 19:02:14 +0200
committerHiFiPhile <[email protected]>2024-04-06 19:02:14 +0200
commit5fd6241d2840b325cb8131a8d41b49bd9b534387 (patch)
treec93377ae50da7629fd123f0f7410be79ef4d8258 /.github/workflows
parent2e4d4e4a017202e4aef2a8f3027a29da0f47cd32 (diff)
parente4ceb0a865f30240e5cc3f43abdde56f91eabf6e (diff)
Merge branch 'iso_alloc' of github.com:HiFiPhile/tinyusb into iso_alloc
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/labeler.yml38
1 files changed, 20 insertions, 18 deletions
diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml
index 4733c6f06..947b08ca2 100644
--- a/.github/workflows/labeler.yml
+++ b/.github/workflows/labeler.yml
@@ -28,29 +28,31 @@ jobs:
issueOrPrNumber = context.payload.pull_request.number;
}
- // Check for Adafruit membership
- const adafruitResponse = await github.rest.orgs.checkMembershipForUser({
- org: 'adafruit',
- username: username
- });
-
- if (adafruitResponse.status === 204) {
- console.log('Adafruit Member');
- label = 'Prio Urgent';
- } else {
- // Check if the user is a contributor
- const collaboratorResponse = await github.rest.repos.checkCollaborator({
- owner: context.repo.owner,
- repo: context.repo.repo,
+ try {
+ // Check for Adafruit membership
+ const adafruitResponse = await github.rest.orgs.checkMembershipForUser({
+ org: 'adafruit',
username: username
});
- if (collaboratorResponse.status === 204) {
- console.log('Contributor');
- label = 'Prio Higher';
+ if (adafruitResponse.status === 204) {
+ console.log('Adafruit Member');
+ label = 'Prio Urgent';
} else {
- console.log('Not a contributor or Adafruit member');
+ // If not a Adafruit member, check if the user is a contributor
+ const collaboratorResponse = await github.rest.repos.checkCollaborator({
+ owner: context.repo.owner,
+ repo: context.repo.repo,
+ username: username
+ });
+
+ if (collaboratorResponse.status === 204) {
+ console.log('Contributor');
+ label = 'Prio Higher';
+ }
}
+ } catch (error) {
+ console.log(`Error processing user ${username}: ${error.message}`);
}
if (label !== '') {