fix: undeploy.sh misses runtime-created CRDs, webhooks, and workload namespaces #328
This file contains hidden or 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
| # Copyright (c) 2026, NVIDIA CORPORATION. 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: Welcome First-Time Contributors | |
| on: | |
| issues: | |
| types: [opened] | |
| pull_request_target: | |
| types: [opened] | |
| workflow_dispatch: {} | |
| permissions: | |
| contents: read | |
| jobs: | |
| welcome: | |
| name: Welcome New Contributor | |
| runs-on: ubuntu-latest | |
| permissions: | |
| issues: write | |
| pull-requests: write | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Welcome First-Time Issue Author | |
| if: github.event_name == 'issues' | |
| uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 | |
| with: | |
| script: | | |
| const creator = context.payload.issue.user.login; | |
| const { data: issues } = await github.rest.issues.listForRepo({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| creator: creator, | |
| state: 'all', | |
| }); | |
| // Only the issue that just triggered this event | |
| if (issues.length === 1) { | |
| await github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.issue.number, | |
| body: [ | |
| `Welcome to AICR, @${creator}! Thanks for opening your first issue.`, | |
| '', | |
| 'A maintainer will triage this shortly. In the meantime:', | |
| '- Check the [Contributing Guide](../blob/main/CONTRIBUTING.md) for project conventions', | |
| '- Browse existing [labels](../../labels) for related topics', | |
| '- Join the conversation in [Discussions](../../discussions) for questions', | |
| ].join('\n'), | |
| }); | |
| } | |
| - name: Welcome First-Time PR Author | |
| if: github.event_name == 'pull_request_target' | |
| uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0 | |
| with: | |
| script: | | |
| const creator = context.payload.pull_request.user.login; | |
| const { data: prs } = await github.rest.pulls.list({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| state: 'all', | |
| }); | |
| const authorPRs = prs.filter(pr => pr.user.login === creator); | |
| // Only the PR that just triggered this event | |
| if (authorPRs.length === 1) { | |
| await github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.payload.pull_request.number, | |
| body: [ | |
| `Welcome to AICR, @${creator}! Thanks for your first pull request.`, | |
| '', | |
| 'Before review, please ensure:', | |
| '- All commits are signed off per the [DCO](../blob/main/CONTRIBUTING.md#developer-certificate-of-origin)', | |
| '- CI checks pass (tests, lint, security scan)', | |
| '- The PR description explains the *why* behind your changes', | |
| '', | |
| 'A maintainer will review this soon.', | |
| ].join('\n'), | |
| }); | |
| } |