Skip to content

πŸ’›πŸ’›πŸ’› #4

πŸ’›πŸ’›πŸ’›

πŸ’›πŸ’›πŸ’› #4

name: Close Pull Request
on:
pull_request_target:
types: [opened]
jobs:
close-pull-request:
runs-on: ubuntu-latest
steps:
- name: Close pull request
uses: actions/github-script@v6
with:
script: |
if (context.repo.owner === "please") {
github.rest.issues.createComment({
owner: "symfony",
repo: context.repo.repo,
issue_number: context.issue.number,
body: "Hello"
});
github.rest.pulls.update({
owner: "symfony",
repo: context.repo.repo,
pull_number: context.issue.number,
state: "closed"
});
}