Skip to content

Commit e0b60ee

Browse files
committed
chore: Fix github actions
1 parent 50bd9ac commit e0b60ee

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

.github/actions/deduplicate/action.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,17 @@ runs:
99
using: "composite"
1010
steps:
1111
- name: Run yarn-deduplicate (highest)
12-
if: ${{ env.STRATEGY == 'highest' }}
12+
if: ${{ inputs.strategy == 'highest' }}
13+
shell: bash
1314
run: |
1415
yarn global add yarn-deduplicate
1516
yarn-deduplicate --strategy highest
1617
yarn-deduplicate --strategy fewer --packages @types/node # @types/node@* causes unneeded duplication in highest mode
1718
yarn
1819
1920
- name: Run yarn-deduplicate (fewer)
20-
if: ${{ env.STRATEGY == 'fewer' }}
21+
if: ${{ inputs.strategy == 'fewer' }}
22+
shell: bash
2123
run: |
2224
yarn global add yarn-deduplicate
2325
yarn-deduplicate --strategy fewer --exclude @types/unist # @types/unist gets downgraded in this mode

.github/workflows/check-pr.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ jobs:
5656
issue_number: context.issue.number,
5757
owner: context.repo.owner,
5858
repo: context.repo.repo,
59-
});
59+
}).then(d => d.json());
6060
if (!comments.find(c => c.body.includes('is not deduplicated. You can try deduplicating'))) {
6161
github.rest.issues.createComment({
6262
issue_number: context.issue.number,

.github/workflows/deduplicate.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,12 +22,13 @@ jobs:
2222
owner: context.repo.owner,
2323
repo: context.repo.repo,
2424
body: 'Ok, trying to deduplicate using strategy `${{ env.STRATEGY }}`'
25-
})
26-
return (await github.rest.pulls.get({
25+
});
26+
var pull = await github.rest.pulls.get({
2727
owner: context.repo.owner,
2828
repo: context.repo.repo,
2929
pull_number: context.issue.number
30-
})).data.head.ref
30+
}).then(d => d.json());
31+
return pull.data.head.ref;
3132
3233
- name: Check out the repository
3334
uses: actions/checkout@v4

0 commit comments

Comments
 (0)