Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: scope of token for maintainers workflow #836

Merged
merged 1 commit into from
Aug 10, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions .github/workflows/maintainers-tsc-changes-verification.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ on:
types: [synchronize, opened, reopened]
paths:
- "MAINTAINERS.yaml"
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

jobs:
verify-changes:
# if statement to check if the PR is open.
if: github.event.pull_request.state == 'open'
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

steps:
- name: Checkout main branch
uses: actions/checkout@v3
Expand Down Expand Up @@ -52,7 +53,7 @@ jobs:

// If the PR is made by the bot.
if (author === 'asyncapi-bot') {
console.log('Changes made by asyncapi-bot')
core.info('Changes made by asyncapi-bot')

const removedMaintainers = mainFile.filter(
(mainMaintainer) => !prFile.some((maintainer) => mainMaintainer.github === maintainer.github)
Expand Down Expand Up @@ -105,9 +106,9 @@ jobs:
}
}
// Console log the error messages
console.log('Error messages:', errorMessages);
core.info('Error messages:', errorMessages);
// Set the error messages as an output
console.log('Setting error messages output...');
core.info('Setting error messages output...');
core.setOutput('errorMessages', JSON.stringify(errorMessages));

outputs:
Expand Down
Loading