Skip to content

Commit 599c6d5

Browse files
authored
[update-labels] Remove unnecessary action, move code into workflow (Azure#32455)
1 parent c886877 commit 599c6d5

File tree

4 files changed

+12
-41
lines changed

4 files changed

+12
-41
lines changed

.github/actions/update-labels/action.yaml

Lines changed: 0 additions & 34 deletions
This file was deleted.

.github/actions/update-labels/src/update-labels.js renamed to .github/workflows/src/update-labels.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// @ts-check
22

3-
import { extractInputs } from "../../../src/context.js";
3+
import { extractInputs } from "../../src/context.js";
44

55
/**
66
* @param {import('github-script').AsyncFunctionArguments} AsyncFunctionArguments

.github/actions/update-labels/test/update-labels.test.js renamed to .github/workflows/test/update-labels.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { describe, expect, it, vi } from "vitest";
2-
import { createMockCore } from "../../../test/mocks.js";
2+
import { createMockCore } from "../../test/mocks.js";
33
import updateLabels, { updateLabelsImpl } from "../src/update-labels.js";
44

55
describe("updateLabels", () => {

.github/workflows/update-labels.yaml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,14 @@ jobs:
4949
.github
5050
5151
- name: Update Labels
52-
uses: ./.github/actions/update-labels
52+
uses: actions/github-script@v7
53+
env:
54+
OWNER: ${{ inputs.owner }}
55+
REPO: ${{ inputs.repo }}
56+
ISSUE_NUMBER: ${{ inputs.issue_number }}
57+
RUN_ID: ${{ inputs.run_id }}
5358
with:
54-
owner: ${{ inputs.owner }}
55-
repo: ${{ inputs.repo }}
56-
issue_number: ${{ inputs.issue_number }}
57-
run_id: ${{ inputs.run_id }}
59+
script: |
60+
const { default: updateLabels } =
61+
await import('${{ github.workspace }}/.github/workflows/src/update-labels.js');
62+
await updateLabels({ github, context, core });

0 commit comments

Comments
 (0)