1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-25 00:07:47 +01:00

fix: set as core

This commit is contained in:
FredrikOseberg 2024-12-09 15:48:20 +01:00
parent 72e535d5f0
commit b17a49666b
No known key found for this signature in database
GPG Key ID: 282FD8A6D8F9BCF0

View File

@ -8,7 +8,7 @@ on:
paths: paths:
- src/lib/features/client-feature-toggles/* - src/lib/features/client-feature-toggles/*
- src/lib/features/frontend-api/* - src/lib/features/frontend-api/*
jobs: jobs:
check-core-feature: check-core-feature:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -52,9 +52,8 @@ jobs:
core.setOutput('hasComment', hasComment); core.setOutput('hasComment', hasComment);
core.setOutput('hasReviewers', hasReviewers); core.setOutput('hasReviewers', hasReviewers);
outputs: env:
hasComment: ${{ steps.check-comment.outputs.hasComment }} GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
hasReviewers: ${{ steps.check-comment.outputs.hasReviewers }}
- name: Add reviewers and comment if necessary - name: Add reviewers and comment if necessary
if: steps.check-comment.outputs.hasComment == 'false' || steps.check-comment.outputs.hasReviewers == 'false' if: steps.check-comment.outputs.hasComment == 'false' || steps.check-comment.outputs.hasReviewers == 'false'
@ -64,7 +63,7 @@ jobs:
const prNumber = context.payload.pull_request.number; const prNumber = context.payload.pull_request.number;
const prCreator = context.payload.pull_request.user.login; const prCreator = context.payload.pull_request.user.login;
// Add a comment if not already present
if (!${{ steps.check-comment.outputs.hasComment }}) { if (!${{ steps.check-comment.outputs.hasComment }}) {
await github.rest.issues.createComment({ await github.rest.issues.createComment({
owner: context.repo.owner, owner: context.repo.owner,
@ -74,6 +73,7 @@ jobs:
}); });
} }
// Add reviewers if not already present
if (!${{ steps.check-comment.outputs.hasReviewers }}) { if (!${{ steps.check-comment.outputs.hasReviewers }}) {
await github.rest.pulls.requestReviewers({ await github.rest.pulls.requestReviewers({
owner: context.repo.owner, owner: context.repo.owner,
@ -82,3 +82,5 @@ jobs:
reviewers: ['FredrikOseberg'], // Do not include @ in reviewer names reviewers: ['FredrikOseberg'], // Do not include @ in reviewer names
}); });
} }
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}