Skip to content

Commit f2acf0b

Browse files
authored
Merge pull request #2378 from stloyd/feature/ci-close-pr-gha
[CI] Hardening GHA for closing subtree PRs
2 parents f645b1e + a2e1961 commit f2acf0b

50 files changed

Lines changed: 920 additions & 336 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

src/adapter/etl-adapter-avro/.github/workflows/readonly.yaml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,25 @@ on:
44
pull_request_target:
55
types: [opened]
66

7+
permissions: {}
8+
79
jobs:
810
run:
911
runs-on: ubuntu-latest
12+
permissions:
13+
pull-requests: write # Required to comment on and close the PR.
1014
steps:
11-
- uses: superbrothers/close-pull-request@v3
12-
with:
13-
comment: |
14-
Hi, thank you for your contribution.
15-
Unfortunately, this repository is read-only. It's a split from our main monorepo repository.
16-
In order to proceed with this PR please open it against https://github.com/flow-php/flow repository.
17-
Thank you.
15+
- name: Close pull request
16+
env:
17+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
GH_REPO: ${{ github.repository }}
19+
PR_NUMBER: ${{ github.event.pull_request.number }}
20+
COMMENT: |
21+
Thanks for your contribution! We love it & really appreciate your effort!
22+
23+
However, you should instead open your PR on the main monorepo repository:
24+
https://github.com/flow-php/flow
25+
26+
This repository is what we call a "subtree split": a read-only subset of that main monorepo repository.
27+
We're looking forward to your PR there!
28+
run: gh pr close "$PR_NUMBER" --comment "$COMMENT"

src/adapter/etl-adapter-chartjs/.github/workflows/readonly.yaml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,25 @@ on:
44
pull_request_target:
55
types: [opened]
66

7+
permissions: {}
8+
79
jobs:
810
run:
911
runs-on: ubuntu-latest
12+
permissions:
13+
pull-requests: write # Required to comment on and close the PR.
1014
steps:
11-
- uses: superbrothers/close-pull-request@v3
12-
with:
13-
comment: |
14-
Hi, thank you for your contribution.
15-
Unfortunately, this repository is read-only. It's a split from our main monorepo repository.
16-
In order to proceed with this PR please open it against https://github.com/flow-php/flow repository.
17-
Thank you.
15+
- name: Close pull request
16+
env:
17+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
GH_REPO: ${{ github.repository }}
19+
PR_NUMBER: ${{ github.event.pull_request.number }}
20+
COMMENT: |
21+
Thanks for your contribution! We love it & really appreciate your effort!
22+
23+
However, you should instead open your PR on the main monorepo repository:
24+
https://github.com/flow-php/flow
25+
26+
This repository is what we call a "subtree split": a read-only subset of that main monorepo repository.
27+
We're looking forward to your PR there!
28+
run: gh pr close "$PR_NUMBER" --comment "$COMMENT"

src/adapter/etl-adapter-csv/.github/workflows/readonly.yaml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,25 @@ on:
44
pull_request_target:
55
types: [opened]
66

7+
permissions: {}
8+
79
jobs:
810
run:
911
runs-on: ubuntu-latest
12+
permissions:
13+
pull-requests: write # Required to comment on and close the PR.
1014
steps:
11-
- uses: superbrothers/close-pull-request@v3
12-
with:
13-
comment: |
14-
Hi, thank you for your contribution.
15-
Unfortunately, this repository is read-only. It's a split from our main monorepo repository.
16-
In order to proceed with this PR please open it against https://github.com/flow-php/flow repository.
17-
Thank you.
15+
- name: Close pull request
16+
env:
17+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
GH_REPO: ${{ github.repository }}
19+
PR_NUMBER: ${{ github.event.pull_request.number }}
20+
COMMENT: |
21+
Thanks for your contribution! We love it & really appreciate your effort!
22+
23+
However, you should instead open your PR on the main monorepo repository:
24+
https://github.com/flow-php/flow
25+
26+
This repository is what we call a "subtree split": a read-only subset of that main monorepo repository.
27+
We're looking forward to your PR there!
28+
run: gh pr close "$PR_NUMBER" --comment "$COMMENT"

src/adapter/etl-adapter-doctrine/.github/workflows/readonly.yaml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,25 @@ on:
44
pull_request_target:
55
types: [opened]
66

7+
permissions: {}
8+
79
jobs:
810
run:
911
runs-on: ubuntu-latest
12+
permissions:
13+
pull-requests: write # Required to comment on and close the PR.
1014
steps:
11-
- uses: superbrothers/close-pull-request@v3
12-
with:
13-
comment: |
14-
Hi, thank you for your contribution.
15-
Unfortunately, this repository is read-only. It's a split from our main monorepo repository.
16-
In order to proceed with this PR please open it against https://github.com/flow-php/flow repository.
17-
Thank you.
15+
- name: Close pull request
16+
env:
17+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
GH_REPO: ${{ github.repository }}
19+
PR_NUMBER: ${{ github.event.pull_request.number }}
20+
COMMENT: |
21+
Thanks for your contribution! We love it & really appreciate your effort!
22+
23+
However, you should instead open your PR on the main monorepo repository:
24+
https://github.com/flow-php/flow
25+
26+
This repository is what we call a "subtree split": a read-only subset of that main monorepo repository.
27+
We're looking forward to your PR there!
28+
run: gh pr close "$PR_NUMBER" --comment "$COMMENT"

src/adapter/etl-adapter-elasticsearch/.github/workflows/readonly.yaml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,25 @@ on:
44
pull_request_target:
55
types: [opened]
66

7+
permissions: {}
8+
79
jobs:
810
run:
911
runs-on: ubuntu-latest
12+
permissions:
13+
pull-requests: write # Required to comment on and close the PR.
1014
steps:
11-
- uses: superbrothers/close-pull-request@v3
12-
with:
13-
comment: |
14-
Hi, thank you for your contribution.
15-
Unfortunately, this repository is read-only. It's a split from our main monorepo repository.
16-
In order to proceed with this PR please open it against https://github.com/flow-php/flow repository.
17-
Thank you.
15+
- name: Close pull request
16+
env:
17+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
GH_REPO: ${{ github.repository }}
19+
PR_NUMBER: ${{ github.event.pull_request.number }}
20+
COMMENT: |
21+
Thanks for your contribution! We love it & really appreciate your effort!
22+
23+
However, you should instead open your PR on the main monorepo repository:
24+
https://github.com/flow-php/flow
25+
26+
This repository is what we call a "subtree split": a read-only subset of that main monorepo repository.
27+
We're looking forward to your PR there!
28+
run: gh pr close "$PR_NUMBER" --comment "$COMMENT"

src/adapter/etl-adapter-excel/.github/workflows/readonly.yaml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,25 @@ on:
44
pull_request_target:
55
types: [opened]
66

7+
permissions: {}
8+
79
jobs:
810
run:
911
runs-on: ubuntu-latest
12+
permissions:
13+
pull-requests: write # Required to comment on and close the PR.
1014
steps:
11-
- uses: superbrothers/close-pull-request@v3
12-
with:
13-
comment: |
14-
Hi, thank you for your contribution.
15-
Unfortunately, this repository is read-only. It's a split from our main monorepo repository.
16-
In order to proceed with this PR please open it against https://github.com/flow-php/flow repository.
17-
Thank you.
15+
- name: Close pull request
16+
env:
17+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
GH_REPO: ${{ github.repository }}
19+
PR_NUMBER: ${{ github.event.pull_request.number }}
20+
COMMENT: |
21+
Thanks for your contribution! We love it & really appreciate your effort!
22+
23+
However, you should instead open your PR on the main monorepo repository:
24+
https://github.com/flow-php/flow
25+
26+
This repository is what we call a "subtree split": a read-only subset of that main monorepo repository.
27+
We're looking forward to your PR there!
28+
run: gh pr close "$PR_NUMBER" --comment "$COMMENT"

src/adapter/etl-adapter-google-sheet/.github/workflows/readonly.yaml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,25 @@ on:
44
pull_request_target:
55
types: [opened]
66

7+
permissions: {}
8+
79
jobs:
810
run:
911
runs-on: ubuntu-latest
12+
permissions:
13+
pull-requests: write # Required to comment on and close the PR.
1014
steps:
11-
- uses: superbrothers/close-pull-request@v3
12-
with:
13-
comment: |
14-
Hi, thank you for your contribution.
15-
Unfortunately, this repository is read-only. It's a split from our main monorepo repository.
16-
In order to proceed with this PR please open it against https://github.com/flow-php/flow repository.
17-
Thank you.
15+
- name: Close pull request
16+
env:
17+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
GH_REPO: ${{ github.repository }}
19+
PR_NUMBER: ${{ github.event.pull_request.number }}
20+
COMMENT: |
21+
Thanks for your contribution! We love it & really appreciate your effort!
22+
23+
However, you should instead open your PR on the main monorepo repository:
24+
https://github.com/flow-php/flow
25+
26+
This repository is what we call a "subtree split": a read-only subset of that main monorepo repository.
27+
We're looking forward to your PR there!
28+
run: gh pr close "$PR_NUMBER" --comment "$COMMENT"

src/adapter/etl-adapter-http/.github/workflows/readonly.yaml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,25 @@ on:
44
pull_request_target:
55
types: [opened]
66

7+
permissions: {}
8+
79
jobs:
810
run:
911
runs-on: ubuntu-latest
12+
permissions:
13+
pull-requests: write # Required to comment on and close the PR.
1014
steps:
11-
- uses: superbrothers/close-pull-request@v3
12-
with:
13-
comment: |
14-
Hi, thank you for your contribution.
15-
Unfortunately, this repository is read-only. It's a split from our main monorepo repository.
16-
In order to proceed with this PR please open it against https://github.com/flow-php/flow repository.
17-
Thank you.
15+
- name: Close pull request
16+
env:
17+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
GH_REPO: ${{ github.repository }}
19+
PR_NUMBER: ${{ github.event.pull_request.number }}
20+
COMMENT: |
21+
Thanks for your contribution! We love it & really appreciate your effort!
22+
23+
However, you should instead open your PR on the main monorepo repository:
24+
https://github.com/flow-php/flow
25+
26+
This repository is what we call a "subtree split": a read-only subset of that main monorepo repository.
27+
We're looking forward to your PR there!
28+
run: gh pr close "$PR_NUMBER" --comment "$COMMENT"

src/adapter/etl-adapter-json/.github/workflows/readonly.yaml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,25 @@ on:
44
pull_request_target:
55
types: [opened]
66

7+
permissions: {}
8+
79
jobs:
810
run:
911
runs-on: ubuntu-latest
12+
permissions:
13+
pull-requests: write # Required to comment on and close the PR.
1014
steps:
11-
- uses: superbrothers/close-pull-request@v3
12-
with:
13-
comment: |
14-
Hi, thank you for your contribution.
15-
Unfortunately, this repository is read-only. It's a split from our main monorepo repository.
16-
In order to proceed with this PR please open it against https://github.com/flow-php/flow repository.
17-
Thank you.
15+
- name: Close pull request
16+
env:
17+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
GH_REPO: ${{ github.repository }}
19+
PR_NUMBER: ${{ github.event.pull_request.number }}
20+
COMMENT: |
21+
Thanks for your contribution! We love it & really appreciate your effort!
22+
23+
However, you should instead open your PR on the main monorepo repository:
24+
https://github.com/flow-php/flow
25+
26+
This repository is what we call a "subtree split": a read-only subset of that main monorepo repository.
27+
We're looking forward to your PR there!
28+
run: gh pr close "$PR_NUMBER" --comment "$COMMENT"

src/adapter/etl-adapter-logger/.github/workflows/readonly.yaml

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,25 @@ on:
44
pull_request_target:
55
types: [opened]
66

7+
permissions: {}
8+
79
jobs:
810
run:
911
runs-on: ubuntu-latest
12+
permissions:
13+
pull-requests: write # Required to comment on and close the PR.
1014
steps:
11-
- uses: superbrothers/close-pull-request@v3
12-
with:
13-
comment: |
14-
Hi, thank you for your contribution.
15-
Unfortunately, this repository is read-only. It's a split from our main monorepo repository.
16-
In order to proceed with this PR please open it against https://github.com/flow-php/flow repository.
17-
Thank you.
15+
- name: Close pull request
16+
env:
17+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+
GH_REPO: ${{ github.repository }}
19+
PR_NUMBER: ${{ github.event.pull_request.number }}
20+
COMMENT: |
21+
Thanks for your contribution! We love it & really appreciate your effort!
22+
23+
However, you should instead open your PR on the main monorepo repository:
24+
https://github.com/flow-php/flow
25+
26+
This repository is what we call a "subtree split": a read-only subset of that main monorepo repository.
27+
We're looking forward to your PR there!
28+
run: gh pr close "$PR_NUMBER" --comment "$COMMENT"

0 commit comments

Comments
 (0)