Repository navigation
75 lines (62 loc) · 3.83 KB
/
Copy pathpr-comment.yaml
File metadata and controls
75 lines (62 loc) · 3.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# Copyright 2025 Amazon.com, Inc. or its affiliates. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
name: External PR Check
on:
pull_request_target:
branches:
- main
permissions:
contents: read
pull-requests: write
jobs:
pr-comment:
# Only comment on PRs from forked repos
if: ${{ github.event.pull_request.head.repo.full_name != 'aws/csi-components' }}
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const body = `## Summary
Hello and thank you for your contribution to the **CSI Components** repository!
This PR was created from a fork of the upstream [\`aws/csi-components\` repository](https://github.com/aws/csi-components) - thus, the E2E tests CI job will not run. This is because the job requires significant dangerous AWS permissions to create [Amazon EKS](https://aws.amazon.com/eks/) and [kOps](https://kops.sigs.k8s.io/) Kubernetes clusters.
## Instructions for Third Party Contributors
Maintainers will review your PR as per normal GitHub procedure, and approve and/or suggest changes as necessary. After the changes are ready to merge, a maintainer will transfer the changes to a branch on the upstream repository and open a new PR using the new branch. This will allow the changes to run against the E2E changes before being merged.
You may find it useful to pre-emptively run the E2E tests yourself to avoid any issues in the merging process. Currently, the CI runs the following E2E tests:
- \`make e2e/test-e2e-external\`
- \`make e2e/test-e2e-external-arm64\`
- \`make e2e/test-e2e-external-eks-windows\`
- \`make e2e/test-e2e-external-eks-bottlerocket\`
_Note: These tests require access to an AWS account, and will temporarily create testing resources in the account that cost money. If the tests crash or otherwise exit early, they may leave resources behind that require manual cleanup._
## Instructions for Maintainers
**If you are a maintainer and submitted this PR, close it and open the PR using a branch pushed to the upstream [\`aws/csi-components\` repository](https://github.com/aws/csi-components).**
If this is a third party contributor's PR, follow this procedure:
1. Review the PR's changes as normal
_If applicable, run associated E2E tests locally_
2. When the PR is ready to merge, in a checked out version of the upstrem repository:
\`\`\`bash
gh pr checkout ${{ github.event.pull_request.number }}
git switch -c pr-${{ github.event.pull_request.number }}
git push
\`\`\`
3. Visit https://github.com/aws/csi-components/pull/new/pr-${{ github.event.pull_request.number }} and create the PR
_Reuse the title and description of this PR if they are applicable_
4. Do not close this PR - GitHub will automatically close it after that PR is merged`;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: body
})