Merge pull request #32356 from woocommerce/remove/32352-admin-github-files

Remove unnecessary admin `.github` files
This commit is contained in:
Chi-Hsuan Huang 2022-03-25 18:24:55 +08:00 committed by GitHub
commit b43d66f862
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 0 additions and 9814 deletions

View File

@ -1,43 +0,0 @@
---
name: Bug report
about: Create a report to help us improve
---
### Describe the bug
<!-- A clear and concise description of what the bug is. Please be as descriptive as possible. -->
### To Reproduce
<!-- Describe the steps to reproduce the behavior.-->
1. Go to '…'
2. Click on '…'
3. Scroll down to …'
4. See error
### Actual behavior:
<!-- A clear and concise description of what actually happens. -->
### Screenshots
<!-- If applicable, add screenshots to help explain your problem. -->
### Expected behavior
<!-- A clear and concise description of what you expected to happen. -->
### Desktop (please complete the following information):
* OS: [e.g. iOS]
* Browser [e.g. chrome, safari]
* Version [e.g. 22]
### Smartphone (please complete the following information):
* Device: [e.g. iPhone6]
* OS: [e.g. iOS8.1]
* Browser [e.g. stock browser, safari]
* Version [e.g. 22]
### Additional context
<!--Any additional context or details you think might be helpful.-->
<!--Ticket numbers/links, plugin versions, system statuses etc.-->

View File

@ -1,20 +0,0 @@
---
name: Feature request
about: Suggest an idea for this project
---
### Is your feature request related to a problem? Please describe.
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when […] -->
### Describe the solution you'd like
<!-- A clear and concise description of what you want to happen. -->
### Describe alternatives you've considered
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
### Should this be prioritized? Why?
### Additional context
<!--Any additional context, screenshots, or details you think might be helpful.-->

View File

@ -1,27 +0,0 @@
Fixes #
_Replace this with a good description of your changes & reasoning._
### Accessibility
<!-- If you've changed or added any interactions, check off the appropriate items below. You can delete any that don't apply. Use this space to elaborate on anything if needed. -->
- [ ] I've tested using only a keyboard (no mouse)
- [ ] I've tested using a screen reader
- [ ] All animations respect [`prefers-reduced-motion`](https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion)
- [ ] All text has [at least a 4.5 color contrast with its background](https://webaim.org/resources/contrastchecker/)
### Screenshots
### Detailed test instructions:
- Ex: Open page `url`
- Click XYZ…
<!--
Please add your test instructions to `/TESTING-INSTRUCTIONS.md`.
-->
<!--- Please add a Changelog note
Enter a changelog note using the following CLI command `pnpm run changelogger -- add` and commit changes. --->

View File

@ -1,18 +0,0 @@
# PR Labeler Action
This is a standalone github action hosted within wc-admin that supports
auto adding or removing a PR label, which could be useful in various
automation scenarios.
To keep it simple and avoid checking in `node_modules` when you make
changes to `index.js` you'll need to compile it into the `dist` directory
via [@vercel/ncc](https://github.com/vercel/ncc).
Run these commands from the root of the action before pushing an update to `dist/index.js`:
```
pnpm i -g @vercel/ncc
ncc build index.js
```
This will compile the `node_modules` alongside the js into one single file.

View File

@ -1,17 +0,0 @@
name: 'PR labeler'
description: 'Add or remove a label from a PR'
inputs:
access_token:
description: 'Github token used to access the API'
required: true
label:
description: 'Label to add or remove'
required: true
default: ''
action:
description: 'Add or remove the label'
required: true
default: 'add'
runs:
using: 'node12'
main: 'dist/index.js'

File diff suppressed because one or more lines are too long

View File

@ -1,60 +0,0 @@
const core = require( '@actions/core' );
const github = require( '@actions/github' );
const getPRNumber = () => {
const pr = github.context.payload.pull_request;
return pr && pr.number ? pr.number : null;
};
const addLabel = async ( client, label, prNumber ) => {
await client.issues.addLabels( {
owner: github.context.repo.owner,
repo: github.context.repo.repo,
issue_number: prNumber,
labels: [ label ],
} );
};
const removeLabel = async ( client, label, prNumber ) => {
await client.issues.removeLabel( {
owner: github.context.repo.owner,
repo: github.context.repo.repo,
issue_number: prNumber,
name: label,
} );
};
async function run() {
try {
const prNumber = getPRNumber();
if ( ! prNumber ) {
console.log( 'This action only supports pull requests.' );
return;
}
const token = core.getInput( 'access_token', { required: true } );
const client = github.getOctokit( token );
const label = core.getInput( 'label', { required: true } );
const action = core.getInput( 'action', { required: true } );
const { data: pullRequest } = await client.pulls.get( {
owner: github.context.repo.owner,
repo: github.context.repo.repo,
pull_number: prNumber,
} );
const prHasLabel = pullRequest.labels.some( ( l ) => l.name === label );
if ( action === 'add' && ! prHasLabel ) {
await addLabel( client, label, prNumber );
} else if ( action === 'remove' && prHasLabel ) {
await removeLabel( client, label, prNumber );
}
} catch ( e ) {
core.error( e );
core.setFailed( e.message );
}
}
run();

View File

@ -1,192 +0,0 @@
{
"name": "pr-labeler",
"version": "1.0.0",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
"@actions/core": {
"version": "1.5.0",
"resolved": "https://registry.npmjs.org/@actions/core/-/core-1.5.0.tgz",
"integrity": "sha512-eDOLH1Nq9zh+PJlYLqEMkS/jLQxhksPNmUGNBHfa4G+tQmnIhzpctxmchETtVGyBOvXgOVVpYuE40+eS4cUnwQ=="
},
"@actions/github": {
"version": "4.0.0",
"resolved": "https://registry.npmjs.org/@actions/github/-/github-4.0.0.tgz",
"integrity": "sha512-Ej/Y2E+VV6sR9X7pWL5F3VgEWrABaT292DRqRU6R4hnQjPtC/zD3nagxVdXWiRQvYDh8kHXo7IDmG42eJ/dOMA==",
"requires": {
"@actions/http-client": "^1.0.8",
"@octokit/core": "^3.0.0",
"@octokit/plugin-paginate-rest": "^2.2.3",
"@octokit/plugin-rest-endpoint-methods": "^4.0.0"
}
},
"@actions/http-client": {
"version": "1.0.11",
"resolved": "https://registry.npmjs.org/@actions/http-client/-/http-client-1.0.11.tgz",
"integrity": "sha512-VRYHGQV1rqnROJqdMvGUbY/Kn8vriQe/F9HR2AlYHzmKuM/p3kjNuXhmdBfcVgsvRWTz5C5XW5xvndZrVBuAYg==",
"requires": {
"tunnel": "0.0.6"
}
},
"@octokit/auth-token": {
"version": "2.4.5",
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.5.tgz",
"integrity": "sha512-BpGYsPgJt05M7/L/5FoE1PiAbdxXFZkX/3kDYcsvd1v6UhlnE5e96dTDr0ezX/EFwciQxf3cNV0loipsURU+WA==",
"requires": {
"@octokit/types": "^6.0.3"
}
},
"@octokit/core": {
"version": "3.5.1",
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.5.1.tgz",
"integrity": "sha512-omncwpLVxMP+GLpLPgeGJBF6IWJFjXDS5flY5VbppePYX9XehevbDykRH9PdCdvqt9TS5AOTiDide7h0qrkHjw==",
"requires": {
"@octokit/auth-token": "^2.4.4",
"@octokit/graphql": "^4.5.8",
"@octokit/request": "^5.6.0",
"@octokit/request-error": "^2.0.5",
"@octokit/types": "^6.0.3",
"before-after-hook": "^2.2.0",
"universal-user-agent": "^6.0.0"
}
},
"@octokit/endpoint": {
"version": "6.0.12",
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.12.tgz",
"integrity": "sha512-lF3puPwkQWGfkMClXb4k/eUT/nZKQfxinRWJrdZaJO85Dqwo/G0yOC434Jr2ojwafWJMYqFGFa5ms4jJUgujdA==",
"requires": {
"@octokit/types": "^6.0.3",
"is-plain-object": "^5.0.0",
"universal-user-agent": "^6.0.0"
}
},
"@octokit/graphql": {
"version": "4.8.0",
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.8.0.tgz",
"integrity": "sha512-0gv+qLSBLKF0z8TKaSKTsS39scVKF9dbMxJpj3U0vC7wjNWFuIpL/z76Qe2fiuCbDRcJSavkXsVtMS6/dtQQsg==",
"requires": {
"@octokit/request": "^5.6.0",
"@octokit/types": "^6.0.3",
"universal-user-agent": "^6.0.0"
}
},
"@octokit/openapi-types": {
"version": "10.0.0",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-10.0.0.tgz",
"integrity": "sha512-k1iO2zKuEjjRS1EJb4FwSLk+iF6EGp+ZV0OMRViQoWhQ1fZTk9hg1xccZII5uyYoiqcbC73MRBmT45y1vp2PPg=="
},
"@octokit/plugin-paginate-rest": {
"version": "2.16.0",
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.16.0.tgz",
"integrity": "sha512-8YYzALPMvEZ35kgy5pdYvQ22Roz+BIuEaedO575GwE2vb/ACDqQn0xQrTJR4tnZCJn7pi8+AWPVjrFDaERIyXQ==",
"requires": {
"@octokit/types": "^6.26.0"
}
},
"@octokit/plugin-rest-endpoint-methods": {
"version": "4.15.1",
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.15.1.tgz",
"integrity": "sha512-4gQg4ySoW7ktKB0Mf38fHzcSffVZd6mT5deJQtpqkuPuAqzlED5AJTeW8Uk7dPRn7KaOlWcXB0MedTFJU1j4qA==",
"requires": {
"@octokit/types": "^6.13.0",
"deprecation": "^2.3.1"
}
},
"@octokit/request": {
"version": "5.6.1",
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.6.1.tgz",
"integrity": "sha512-Ls2cfs1OfXaOKzkcxnqw5MR6drMA/zWX/LIS/p8Yjdz7QKTPQLMsB3R+OvoxE6XnXeXEE2X7xe4G4l4X0gRiKQ==",
"requires": {
"@octokit/endpoint": "^6.0.1",
"@octokit/request-error": "^2.1.0",
"@octokit/types": "^6.16.1",
"is-plain-object": "^5.0.0",
"node-fetch": "^2.6.1",
"universal-user-agent": "^6.0.0"
}
},
"@octokit/request-error": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.1.0.tgz",
"integrity": "sha512-1VIvgXxs9WHSjicsRwq8PlR2LR2x6DwsJAaFgzdi0JfJoGSO8mYI/cHJQ+9FbN21aa+DrgNLnwObmyeSC8Rmpg==",
"requires": {
"@octokit/types": "^6.0.3",
"deprecation": "^2.0.0",
"once": "^1.4.0"
}
},
"@octokit/types": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.26.0.tgz",
"integrity": "sha512-RDxZBAFMtqs1ZPnbUu1e7ohPNfoNhTiep4fErY7tZs995BeHu369Vsh5woMIaFbllRWEZBfvTCS4hvDnMPiHrA==",
"requires": {
"@octokit/openapi-types": "^10.0.0"
}
},
"before-after-hook": {
"version": "2.2.2",
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.2.tgz",
"integrity": "sha512-3pZEU3NT5BFUo/AD5ERPWOgQOCZITni6iavr5AUw5AUwQjMlI0kzu5btnyD39AF0gUEsDPwJT+oY1ORBJijPjQ=="
},
"deprecation": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz",
"integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ=="
},
"is-plain-object": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz",
"integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q=="
},
"node-fetch": {
"version": "2.6.7",
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.7.tgz",
"integrity": "sha512-ZjMPFEfVx5j+y2yF35Kzx5sF7kDzxuDj6ziH4FFbOp87zKDZNx8yExJIb05OGF4Nlt9IHFIMBkRl41VdvcNdbQ==",
"requires": {
"whatwg-url": "^5.0.0"
}
},
"once": {
"version": "1.4.0",
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
"requires": {
"wrappy": "1"
}
},
"tr46": {
"version": "0.0.3",
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
"integrity": "sha1-gYT9NH2snNwYWZLzpmIuFLnZq2o="
},
"tunnel": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz",
"integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg=="
},
"universal-user-agent": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz",
"integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w=="
},
"webidl-conversions": {
"version": "3.0.1",
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
"integrity": "sha1-JFNCdeKnvGvnvIZhHMFq4KVlSHE="
},
"whatwg-url": {
"version": "5.0.0",
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
"integrity": "sha1-lmRU6HZUYuN2RNNib2dCzotwll0=",
"requires": {
"tr46": "~0.0.3",
"webidl-conversions": "^3.0.0"
}
},
"wrappy": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
}
}
}

View File

@ -1,15 +0,0 @@
{
"name": "pr-labeler",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "GPL-3.0-or-later",
"dependencies": {
"@actions/core": "^1.2.6",
"@actions/github": "^4.0.0"
}
}

View File

@ -1,3 +0,0 @@
Packages: [ "/packages/*" ]
Components: /packages/components
Build: [ "/.*", "*.config.js", "bin/*", "composer.json", "Gruntfile.js", "package.json" ]

View File

@ -1,140 +0,0 @@
[
{
"name": "category: accessibility",
"color": "5804ea",
"aliases": [ "Accessibility" ],
"description": "The issue/PR is related to accessibility."
},
{
"name": "category: duplicate",
"color": "5804ea",
"aliases": [],
"description": "The issue/PR is a duplicate of another issue."
},
{
"name": "category: i18n",
"color": "5804ea",
"aliases": [],
"description": "The issue/PR is related to internationalization."
},
{
"name": "category: performance",
"color": "5804ea",
"aliases": [ "[Type] Performance" ],
"description": "The issue/PR is related to performance."
},
{
"name": "category: refactor",
"color": "5804ea",
"aliases": [],
"description": "The issue/PR is related to refactoring."
},
{
"name": "category: won't fix",
"color": "5804ea",
"aliases": [],
"description": "The issue wont be fixed."
},
{
"name": "good first issue",
"color": "1eff05",
"aliases": [],
"description": "The issue is a good candidate for the first community contribution/for a newcomer to the team."
},
{
"name": "impact: high",
"color": "d73a4a",
"aliases": [],
"description": "This issue impacts a lot of users as reported by our Happiness Engineers."
},
{
"name": "needs design",
"color": "ed95d2",
"aliases": [ "Design", "[Status] Needs Design Review" ],
"description": "The issue requires design input/work from a designer."
},
{
"name": "needs docs",
"color": "ed95d2",
"aliases": [],
"description": "The issue/PR requires documentation to be added."
},
{
"name": "needs feedback",
"color": "ed95d2",
"aliases": [ "[Status] Needs feedback" ],
"description": "The issue/PR needs a response from any of the parties involved in the issue."
},
{
"name": "needs tests",
"color": "ed95d2",
"aliases": [],
"description": "The issue/PR needs tests before it can move forward."
},
{
"name": "priority: critical",
"color": "d73a4a",
"aliases": [ "[Priority] Critical" ],
"description": "The issue is critical—e.g. a fatal error, security problem affecting many customers."
},
{
"name": "priority: high",
"color": "d93f0b",
"aliases": [ "[Priority] High" ],
"description": "The issue/PR is high priority—it affects lots of customers substantially, but not critically."
},
{
"name": "priority: low",
"color": "e2f78c",
"aliases": [ "[Priority] Low" ],
"description": "The issue/PR is low priority—not many people are affected or theres a workaround, etc."
},
{
"name": "status: blocked",
"color": "d73a4a",
"aliases": [ "[Status] Blocked" ],
"description": "The issue is blocked from progressing, waiting for another piece of work to be done."
},
{
"name": "status: on hold",
"color": "d93f0b",
"aliases": [ "[Status] On Hold" ],
"description": "The issue is currently not prioritized."
},
{
"name": "type: bug",
"color": "d73a4a",
"aliases": [ "[Type] Bug" ],
"description": "The issue is a confirmed bug."
},
{
"name": "type: documentation",
"color": "0075ca",
"aliases": [ "Documentation" ],
"description": "This issue is a request for better documentation."
},
{
"name": "type: enhancement",
"color": "0075ca",
"aliases": [ "[Type] Enhancement" ],
"description": "The issue is a request for an enhancement."
},
{
"name": "type: question",
"color": "0075ca",
"aliases": [],
"description": "The issue is a question about how code works."
},
{
"name": "type: task",
"color": "0075ca",
"aliases": [ "[Type] Task" ],
"description": "The issue is an internally driven task (e.g. from another A8c team)."
},
{
"name": "type: technical debt",
"color": "0075ca",
"aliases": [ "Tech debt" ],
"description": "This issue/PR represents/solves the technical debt of the project."
}
]

View File

@ -1,10 +0,0 @@
name: 'Block Merge To main'
on: [ pull_request ]
jobs:
block_merge:
runs-on: ubuntu-latest
steps:
- name: Merge Blocked
if: github.event.pull_request.base.ref == 'main'
run: exit 1

View File

@ -1,37 +0,0 @@
name: Lint the changelog
on:
pull_request:
types: [opened, synchronize, reopened, edited]
jobs:
lint-changelog:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.7.0
with:
access_token: ${{ github.token }}
- name: Check out repository code
uses: actions/checkout@v2
if: github.event.pull_request.user.login != 'renovate[bot]'
- name: skip-workflow
id: skip-workflow
uses: saulmaldonado/skip-workflow@v1.1.1
with:
phrase: /no changelog/i
github-token: ${{ secrets.GITHUB_TOKEN }}
pr-message: 'body'
search: '["pull_request"]'
- name: Check for changelog entry
if: github.event.pull_request.user.login != 'renovate[bot]' && !steps.skip-workflow.outputs.skip
env:
PR_NUMBER: ${{github.event.number}}
run: bin/ci/lint-changelog.sh
shell: bash
- name: Add a reminder label to the PR
uses: ./.github/actions/pr-labeler
if: github.event.pull_request.user.login != 'renovate[bot]' && always()
with:
access_token: ${{ github.token }}
label: ${{ env.label || 'needs changelog entry' }}
action: ${{ env.label_action || 'remove' }}

View File

@ -1,23 +0,0 @@
name: 'Mark or close stale issues and PRs'
on:
schedule:
- cron: '00 * * * *'
jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
days-before-stale: 60
days-before-close: 5
stale-issue-message: 'This issue has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. Thank you for your contributions.'
stale-pr-message: 'This PR has been automatically marked as stale because it has not had any recent activity. It will be closed if no further activity occurs. Thank you for your contributions.'
close-issue-message: 'This issue was automatically closed due to being stale. Please feel free to re-open it if you still experience this problem.'
close-pr-message: 'This PR was automatically closed due to being stale.'
stale-pr-label: 'status: stale'
stale-issue-label: 'status: stale'
exempt-issue-labels: 'cooldown period,priority: high,priority: critical,feature: inbox,feature: components,feature: analytics,feature: marketing,feature: onboarding,feature: navigation,feature: wcpay,feature: settings,feature: home screen,feature: customer effort score,feature: setup checklist,feature: activity panel,feature: rest api'
ascending: true