Skip to content

feat: update API specifications #45

feat: update API specifications

feat: update API specifications #45

Workflow file for this run

name: Autoclose PRs
on:
pull_request:
paths:
- 'asyncapi.yml'
- 'openapi.yml'
jobs:
autoclose:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v6
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script |

Check failure on line 16 in .github/workflows/autoclose.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/autoclose.yml

Invalid workflow file

You have an error in your yaml syntax on line 16
const creator = context.payload.sender.login;
const allowedUsers = ["deepgram-robot"];
if (allowedUsers.includes(creator)) {
return;
}
core.setFailed("Invalid PR detected.");
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: "Thank you for opening this pull request.\n\nThis is a standard message notifying you that the API specification files should not be edited by a human. These are automatically generated through our various tooling."
});
github.rest.pulls.update({
owner: context.payload.repository.owner.login,
repo: context.payload.repository.name,
pull_number: context.payload.pull_request.number,
state: "closed"
});