Merge 5cd898d395 into sapling-pr-archive-poteto

This commit is contained in:
lauren
2025-02-07 17:37:41 -05:00
committed by GitHub
@@ -0,0 +1,38 @@
name: (Shared) Close Direct Sync Branch PRs
on:
pull_request:
branches:
- builds/facebook-www
- builds/facebook-fbsource
env:
TZ: /usr/share/zoneinfo/America/Los_Angeles
# https://github.com/actions/cache/blob/main/tips-and-workarounds.md#cache-segment-restore-timeout
SEGMENT_DOWNLOAD_TIMEOUT_MINS: 1
jobs:
close_pr:
runs-on: ubuntu-latest
steps:
- name: Close PR
uses: actions/github-script@v7
with:
script: |
const owner = context.repo.owner;
const repo = context.repo.repo;
const pullNumber = ${{ github.event.number }};
await github.rest.pulls.createReview({
owner,
repo,
pull_number: pullNumber,
body: 'Do not commit changes directly to ${{ github.event.pull_request.base.ref }}',
event: 'REQUEST_CHANGES'
});
await github.rest.pulls.update({
owner,
repo,
pull_number: pullNumber,
state: 'closed'
});