Compare commits

...

26 Commits

Author SHA1 Message Date
Shyam Grover c5e64443ea Merge pull request #79 from actions/dependabot/npm_and_yarn/actions/core-1.9.1
Bump @actions/core from 1.6.0 to 1.9.1
2022-11-01 11:53:52 +05:30
Shyam Grover 9b1e76ea45 Update core.dep.yml 2022-11-01 11:51:12 +05:30
Shyam Grover 37b7aca7eb Update core.dep.yml 2022-11-01 11:50:38 +05:30
Shyam Grover f87b4a0b81 Update README.md 2022-11-01 11:48:29 +05:30
Shyam Grover 6961202f36 Merge pull request #70 from actions/dependabot/npm_and_yarn/minimist-1.2.6
Bump minimist from 1.2.5 to 1.2.6
2022-11-01 11:44:17 +05:30
Naveen Desu 4eab40be13 Merge pull request #82 from gaelgoth/fix_readme_typo
fix typo in readme
2022-09-15 12:02:36 +05:30
gael.gothuey 8701e46f41 fix typo in readme 2022-09-14 22:07:47 +02:00
dependabot[bot] 565ec2459a Bump @actions/core from 1.6.0 to 1.9.1
Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.6.0 to 1.9.1.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

---
updated-dependencies:
- dependency-name: "@actions/core"
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-08-18 19:22:50 +00:00
Tina Heidinger ec4518c513 Merge pull request #75 from actions/74-add-support-for-deletion-of-container-and-npm-packages
Indicate missing support for GHCR and soon also npm in readme
2022-07-01 11:37:47 +02:00
tinaheidinger 33300d7916 Indicate missing support for GHCR and soon also npm in readme 2022-07-01 11:34:51 +02:00
dependabot[bot] e048663cdf Bump minimist from 1.2.5 to 1.2.6
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-03-26 06:17:25 +00:00
Namrata Jha 0e86ee6891 Update README.md 2022-03-02 13:36:45 +05:30
Namrata Jha a31a43afa6 Merge pull request #69 from actions/Upgrade-to-node16
Upgrade to node16
2022-03-02 13:28:44 +05:30
Namrata Jha 56849b848a Upgrade to node16 2022-03-02 07:40:19 +00:00
Namrata Jha 000223ef3e Merge pull request #68 from actions/v2-patch-release
Package and Smoke Test / Package (push) Has been cancelled
Package and Smoke Test / Smoke Test (push) Has been cancelled
change node version for v2 patch release
2022-03-02 12:32:41 +05:30
Namrata Jha df897cea27 change node version for v2 patch release 2022-03-02 06:11:51 +00:00
Namrata Jha b77daeff53 Merge pull request #67 from ralfstuckert/main
#66 Type mismatch on variable $packageVersionId and argument packageV…
2022-03-02 11:26:17 +05:30
Ralf Stuckert 7515f7a4f9 #66 Type mismatch on variable $packageVersionId and argument packageVersionId (String! / ID!) 2022-03-01 07:44:01 +01:00
Namrata Jha 3e14cd73d4 Merge pull request #62 from actions/thboop/updatetonode16
Update default runtime to node16
2022-02-16 14:45:08 +05:30
Namrata Jha 5e4787da1c Merge pull request #64 from actions/fix-dependabot-alerts
Fix dependabot alerts
2022-02-16 14:43:28 +05:30
Namrata Jha 355299fa7d fix licensed 2022-02-15 15:21:28 +00:00
Namrata Jha 5263253279 upgrade eslint and fix breaking changes 2022-02-15 13:52:11 +00:00
Namrata Jha d6bf5f6a97 update node-fetch and ws 2022-02-15 07:10:56 +00:00
Namrata Jha 4afcc8f713 Merge pull request #63 from actions/dependabot/npm_and_yarn/ajv-6.12.6
Bump ajv from 6.10.2 to 6.12.6
2022-02-15 12:23:29 +05:30
dependabot[bot] 1472d90599 Bump ajv from 6.10.2 to 6.12.6
Bumps [ajv](https://github.com/ajv-validator/ajv) from 6.10.2 to 6.12.6.
- [Release notes](https://github.com/ajv-validator/ajv/releases)
- [Commits](https://github.com/ajv-validator/ajv/compare/v6.10.2...v6.12.6)

---
updated-dependencies:
- dependency-name: ajv
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-02-13 02:52:00 +00:00
Thomas Boop 09f7b84634 Update default runtime to node16
Update default runtime to node16
2022-02-07 13:58:41 -05:00
12 changed files with 9086 additions and 11057 deletions
+27 -8
View File
@@ -1,6 +1,6 @@
{
"plugins": ["jest", "@typescript-eslint"],
"extends": ["plugin:github/es6"],
"extends": ["plugin:github/recommended","plugin:@typescript-eslint/recommended"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 9,
@@ -17,13 +17,29 @@
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/array-type": "error",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-ts-ignore": "error",
"@typescript-eslint/ban-ts-comment": "error",
"camelcase": "off",
"@typescript-eslint/camelcase": "error",
"@typescript-eslint/class-name-casing": "error",
"@typescript-eslint/naming-convention": [
"error",
{
"selector": "class",
"format": ["PascalCase"]
},
{
"selector": "interface",
"format": ["PascalCase"]
},
{
"selector": "typeProperty",
"format": [],
"custom": {
"regex": "^[A-Z][A-Za-z]*$",
"match": false
}
}
],
"@typescript-eslint/explicit-function-return-type": ["error", {"allowExpressions": true}],
"@typescript-eslint/func-call-spacing": ["error", "never"],
"@typescript-eslint/generic-type-naming": ["error", "^[A-Z][A-Za-z]*$"],
"@typescript-eslint/no-array-constructor": "error",
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-explicit-any": "error",
@@ -33,7 +49,7 @@
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-non-null-assertion": "warn",
"@typescript-eslint/no-object-literal-type-assertion": "error",
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-useless-constructor": "error",
@@ -41,7 +57,7 @@
"@typescript-eslint/prefer-for-of": "warn",
"@typescript-eslint/prefer-function-type": "warn",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-interface": "error",
"@typescript-eslint/consistent-type-definitions": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/require-array-sort-compare": "error",
@@ -50,7 +66,10 @@
"@typescript-eslint/semi": ["error", "never"],
"@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/unbound-method": "error",
"no-console": "off"
"no-console": "off",
"import/no-unresolved": "off",
"sort-imports": "off",
"filenames/match-regex": "off"
},
"env": {
"node": true,
+2 -2
View File
@@ -24,10 +24,10 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Set Node.js 12.x
- name: Set Node.js 16.x
uses: actions/setup-node@v1
with:
node-version: 12.x
node-version: 16.x
- name: Install dependencies
run: npm ci
+1 -1
View File
@@ -1,6 +1,6 @@
---
name: "@actions/core"
version: 1.6.0
version: 1.9.1
type: npm
summary: Actions core lib
homepage: https://github.com/actions/toolkit/tree/master/packages/core
+1 -1
View File
@@ -1,6 +1,6 @@
---
name: rxjs
version: 6.5.4
version: 6.6.7
type: npm
summary: Reactive Extensions for modern JavaScript
homepage: https://github.com/ReactiveX/RxJS
+28 -25
View File
@@ -1,6 +1,8 @@
# Delete Package Versions
This action deletes versions of a package from [GitHub Packages](https://github.com/features/packages) except ghcr packages. This action will only delete a maximum of 99 versions in one run.
This action deletes versions of a package from [GitHub Packages](https://github.com/features/packages). This action will only delete a maximum of 99 versions in one run.
_This action does currently not support deleting packages from the GitHub Container Registry. As the npm registry is about to be migrated to the same new architecture as GHCR, this action won't work for npm soon too (see [#74](https://github.com/actions/delete-package-versions/issues/74))._
### What It Can Do
@@ -17,7 +19,7 @@ This action deletes versions of a package from [GitHub Packages](https://github.
# Usage
```yaml
- uses: actions/delete-package-versions@v2
- uses: actions/delete-package-versions@v3
with:
# Can be a single package version id, or a comma separated list of package version ids.
# Defaults to an empty string.
@@ -101,7 +103,7 @@ This action deletes versions of a package from [GitHub Packages](https://github.
Delete all pre-release package versions except latest 10 in the same repo as the workflow
```yaml
- uses: actions/delete-package-versions@v2
- uses: actions/delete-package-versions@v3
with:
package-name: 'test-package'
min-versions-to-keep: 10
@@ -116,7 +118,7 @@ This action deletes versions of a package from [GitHub Packages](https://github.
Delete all pre-release package versions except latest 10 in a different repo than the workflow
```yaml
- uses: actions/delete-package-versions@v2
- uses: actions/delete-package-versions@v3
with:
owner: 'github'
repo: 'packages'
@@ -137,9 +139,9 @@ This action deletes versions of a package from [GitHub Packages](https://github.
Delete all except latest 3 package versions excluding major versions as per semver in the same repo as the workflow
```yaml
- uses: actions/delete-package-versions@v2
- uses: actions/delete-package-versions@v3
with:
package-name: 'test-packae'
package-name: 'test-package'
min-versions-to-keep: 3
ignore-versions: '^(0|[1-9]\\d*)\\.0\\.0$'
```
@@ -153,11 +155,11 @@ This action deletes versions of a package from [GitHub Packages](https://github.
Delete all except latest 3 package versions excluding major versions as per semver in a different repo than the workflow
```yaml
- uses: actions/delete-package-versions@v2
- uses: actions/delete-package-versions@v3
with:
owner: 'github'
repo: 'packages'
package-name: 'test-packae'
package-name: 'test-package'
token: ${{ secrets.GITHUB_PAT }}
min-versions-to-keep: 3
ignore-versions: '^(0|[1-9]\\d*)\\.0\\.0$'
@@ -176,9 +178,9 @@ This action deletes versions of a package from [GitHub Packages](https://github.
Delete 3 oldest versions excluding major versions as per semver is the same repo as the workflow
```yaml
- uses: actions/delete-package-versions@v2
- uses: actions/delete-package-versions@v3
with:
package-name: 'test-packae'
package-name: 'test-package'
num-old-versions-to-delete: 3
ignore-versions: '^(0|[1-9]\\d*)\\.0\\.0$'
```
@@ -191,14 +193,14 @@ This action deletes versions of a package from [GitHub Packages](https://github.
__Example__
Delete 3 oldest versions excluding major versions as per semver is a differernt repo than the workflow
Delete 3 oldest versions excluding major versions as per semver is a different repo than the workflow
```yaml
- uses: actions/delete-package-versions@v2
- uses: actions/delete-package-versions@v3
with:
owner: 'github'
repo: 'packages'
package-name: 'test-packae'
package-name: 'test-package'
token: ${{ secrets.PAT }}
num-old-versions-to-delete: 3
ignore-versions: '^(0|[1-9]\\d*)\\.0\\.0$'
@@ -215,7 +217,7 @@ This action deletes versions of a package from [GitHub Packages](https://github.
Delete all except latest 2 versions of a package hosted in the same repo as the workflow
```yaml
- uses: actions/delete-package-versions@v2
- uses: actions/delete-package-versions@v3
with:
package-name: 'test-package'
min-versions-to-keep: 2
@@ -230,7 +232,7 @@ This action deletes versions of a package from [GitHub Packages](https://github.
Delete all except latest 2 versions of a package hosted in a repo other than the workflow
```yaml
- uses: actions/delete-package-versions@v2
- uses: actions/delete-package-versions@v3
with:
owner: 'github'
repo: 'packages'
@@ -250,7 +252,7 @@ This action deletes versions of a package from [GitHub Packages](https://github.
Delete the oldest 3 version of a package hosted in the same repo as the workflow
```yaml
- uses: actions/delete-package-versions@v2
- uses: actions/delete-package-versions@v3
with:
package-name: 'test-package'
num-old-versions-to-delete: 3
@@ -265,7 +267,7 @@ This action deletes versions of a package from [GitHub Packages](https://github.
Delete the oldest 3 version of a package hosted in a different repo than the one executing the workflow
```yaml
- uses: actions/delete-package-versions@v2
- uses: actions/delete-package-versions@v3
with:
owner: 'github'
repo: 'packages'
@@ -283,7 +285,7 @@ This action deletes versions of a package from [GitHub Packages](https://github.
__Example__
```yaml
- uses: actions/delete-package-versions@v2
- uses: actions/delete-package-versions@v3
with:
package-name: 'test-package'
```
@@ -295,7 +297,7 @@ This action deletes versions of a package from [GitHub Packages](https://github.
__Example__
```yaml
- uses: actions/delete-package-versions@v2
- uses: actions/delete-package-versions@v3
with:
owner: 'github'
repo: 'packages'
@@ -314,7 +316,7 @@ This action deletes versions of a package from [GitHub Packages](https://github.
__Example__
```yaml
- uses: actions/delete-package-versions@v2
- uses: actions/delete-package-versions@v3
with:
package-version-ids: 'MDE0OlBhY2thZ2VWZXJzaW9uOTcyMDY3'
```
@@ -328,7 +330,7 @@ This action deletes versions of a package from [GitHub Packages](https://github.
__Example__
```yaml
- uses: actions/delete-package-versions@v2
- uses: actions/delete-package-versions@v3
with:
package-version-ids: 'MDE0OlBhY2thZ2VWZXJzaW9uOTcyMDY3'
token: ${{ secrets.PAT }}
@@ -338,19 +340,19 @@ This action deletes versions of a package from [GitHub Packages](https://github.
### Delete multiple specific versions of a package
To delete multiple specifc versions of a package that is hosted in the same repo as the workflow the __package-version-ids__ input is required.
To delete multiple specific versions of a package that is hosted in the same repo as the workflow the __package-version-ids__ input is required.
The __package-version-ids__ input should be a comma separated string of package version ids. Package version ids can be retrieved via the [GitHub GraphQL API][api].
__Example__
```yaml
- uses: actions/delete-package-versions@v2
- uses: actions/delete-package-versions@v3
with:
package-version-ids: 'MDE0OlBhY2thZ2VWZXJzaW9uOTcyMDY3, MDE0OlBhY2thZ2VWZXJzaW9uOTcyMzQ5, MDE0OlBhY2thZ2VWZXJzaW9uOTcyMzUw'
```
To delete multiple specifc versions of a package that is hosted in a repo other than the workflow the __package-version-ids__, __token__ inputs are required.
To delete multiple specific versions of a package that is hosted in a repo other than the workflow the __package-version-ids__, __token__ inputs are required.
The __package-version-ids__ input should be a comma separated string of package version ids. Package version ids can be retrieved via the [GitHub GraphQL API][api].
@@ -359,7 +361,7 @@ This action deletes versions of a package from [GitHub Packages](https://github.
__Example__
```yaml
- uses: actions/delete-package-versions@v2
- uses: actions/delete-package-versions@v3
with:
package-version-ids: 'MDE0OlBhY2thZ2VWZXJzaW9uOTcyMDY3, MDE0OlBhY2thZ2VWZXJzaW9uOTcyMzQ5, MDE0OlBhY2thZ2VWZXJzaW9uOTcyMzUw'
token: ${{ secrets.PAT }}
@@ -372,3 +374,4 @@ The scripts and documentation in this project are released under the [MIT Licens
[api]: https://developer.github.com/v4/previews/#github-packages
[token]: https://help.github.com/en/packages/publishing-and-managing-packages/about-github-packages#about-tokens
[secret]: https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets
+2 -2
View File
@@ -67,9 +67,9 @@ inputs:
default: ${{ github.token }}
runs:
using: node12
using: node16
main: dist/index.js
branding:
icon: package
color: blue
color: blue
+6346 -6732
View File
File diff suppressed because one or more lines are too long
+2667 -4278
View File
File diff suppressed because it is too large Load Diff
+4 -4
View File
@@ -25,17 +25,17 @@
"author": "YourNameOrOrganization",
"license": "MIT",
"dependencies": {
"@actions/core": "^1.6.0",
"@actions/core": "^1.9.1",
"@actions/github": "^2.1.1",
"rxjs": "^6.5.4"
},
"devDependencies": {
"@types/jest": "^24.0.23",
"@types/jest": "^27.4.0",
"@types/node": "^12.7.12",
"@typescript-eslint/parser": "^2.8.0",
"@vercel/ncc": "^0.31.1",
"eslint": "^5.16.0",
"eslint-plugin-github": "^2.0.0",
"eslint": "^8.9.0",
"eslint-plugin-github": "^4.3.5",
"eslint-plugin-jest": "^22.21.0",
"jest": "^27.3.1",
"jest-circus": "^27.3.1",
+2 -1
View File
@@ -1,3 +1,4 @@
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import {from, Observable, merge, throwError, of} from 'rxjs'
import {catchError, map, tap} from 'rxjs/operators'
import {graphql} from './graphql'
@@ -11,7 +12,7 @@ export interface DeletePackageVersionMutationResponse {
}
const mutation = `
mutation deletePackageVersion($packageVersionId: String!) {
mutation deletePackageVersion($packageVersionId: ID!) {
deletePackageVersion(input: {packageVersionId: $packageVersionId}) {
success
}
+5 -3
View File
@@ -1,4 +1,6 @@
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import {GraphQlQueryResponse} from '@octokit/graphql/dist-types/types'
// eslint-disable-next-line @typescript-eslint/no-unused-vars
import {Observable, from, throwError} from 'rxjs'
import {catchError, map} from 'rxjs/operators'
import {graphql} from './graphql'
@@ -107,7 +109,7 @@ export function queryForOldestVersions(
}
}) as Promise<GetVersionsQueryResponse>
).pipe(
catchError((err: GraphQlQueryResponse) => {
catchError((err: GraphQlQueryResponse<unknown>) => {
const msg = 'query for oldest version failed.'
return throwError(
err.errors && err.errors.length > 0
@@ -129,7 +131,7 @@ export function queryForOldestVersions(
}
}) as Promise<GetVersionsQueryResponse>
).pipe(
catchError((err: GraphQlQueryResponse) => {
catchError((err: GraphQlQueryResponse<unknown>) => {
const msg = 'query for oldest version failed.'
return throwError(
err.errors && err.errors.length > 0
@@ -164,7 +166,7 @@ export function getOldestVersions(
`package: ${packageName} not found for owner: ${owner} in repo: ${repo}`
)
r = {
versions: <VersionInfo[]>[],
versions: [] as VersionInfo[],
cursor: '',
paginate: false,
totalCount: 0
+1
View File
@@ -1,3 +1,4 @@
/* eslint-disable @typescript-eslint/no-unused-vars */
import {GitHub} from '@actions/github'
import {GraphQlQueryResponseData} from '@octokit/graphql/dist-types/types'
import {RequestParameters} from '@octokit/types/dist-types/RequestParameters'