Skip to content

Commit

Permalink
chore(ci): fix run on main
Browse files Browse the repository at this point in the history
Signed-off-by: Nikita Korolev <[email protected]>
  • Loading branch information
universal-itengineer committed Nov 28, 2024
1 parent 741b303 commit 012ad44
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/dev_module_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ on:
branches:
- main
- pre-alpha
- chore/ci/fix-select-edition-dev_module_build-main-branch

defaults:
run:
Expand All @@ -58,13 +59,17 @@ jobs:
uses: actions/github-script@v7
with:
script: |
const prNumber = context.payload.pull_request.number;
const { data: labels } = await github.rest.issues.listLabelsOnIssue({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
});
return labels.map(label => label.name);
if (context.eventName === "pull_request" || context.eventName === "pull_request_target" ) {
const prNumber = context.payload.pull_request.number;
const { data: labels } = await github.rest.issues.listLabelsOnIssue({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: prNumber,
});
return labels.map(label => label.name);
} else {
return [];
}
result-encoding: string

- name: Set vars
Expand Down

0 comments on commit 012ad44

Please sign in to comment.