Update dev docker image for easier contributions #111
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# https://docs.github.com/en/actions | |
name: "Close" | |
on: # yamllint disable-line rule:truthy | |
pull_request_target: | |
types: | |
- "opened" | |
- "reopened" | |
jobs: | |
close: | |
name: "Close" | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: "Close pull requests created by violinist-bot" | |
uses: "actions/github-script@v7" | |
with: | |
github-token: "${{ secrets.GITHUB_TOKEN }}" | |
script: | | |
const actors = [ | |
"violinist-bot", | |
] | |
const pullRequest = context.payload.pull_request; | |
const repository = context.repo; | |
const actor = context.actor; | |
if (actors.includes(actor)) { | |
github.rest.issues.createComment({ | |
body: "I'm sorry, @" + actor + ". I'm afraid you can't do that.", | |
issue_number: pullRequest.number, | |
owner: repository.owner, | |
repo: repository.repo, | |
}); | |
github.rest.pulls.update({ | |
owner: repository.owner, | |
pull_number: pullRequest.number, | |
repo: repository.repo, | |
state: "closed", | |
}); | |
github.rest.issues.lock({ | |
issue_number: pullRequest.number, | |
lock_reason: "off-topic", | |
owner: repository.owner, | |
repo: repository.repo, | |
}); | |
} |