Compare commits
43 Commits
signed-com
...
signed-com
Author | SHA1 | Date | |
---|---|---|---|
![]() |
b8ff24664a | ||
![]() |
d93a919a26 | ||
![]() |
a2d4746d68 | ||
![]() |
2c262e8e92 | ||
![]() |
7b7dc5777f | ||
![]() |
c1be170c86 | ||
![]() |
822f3b39c1 | ||
![]() |
197e74c6e1 | ||
![]() |
c7909f9b04 | ||
![]() |
491f77f4d6 | ||
![]() |
93858f721d | ||
![]() |
2668dc956a | ||
![]() |
b0303827bb | ||
![]() |
90b04fe25b | ||
![]() |
2707da835d | ||
![]() |
e4c51477d1 | ||
![]() |
0a237f343d | ||
![]() |
77c6c11180 | ||
![]() |
477c78c3f2 | ||
![]() |
7f459482cc | ||
![]() |
018afb52b6 | ||
![]() |
3a7a677a14 | ||
![]() |
74416df758 | ||
![]() |
7575ead361 | ||
![]() |
3d409de49f | ||
![]() |
743dcd81f7 | ||
![]() |
0f72e35b7f | ||
![]() |
4a3e69b7f7 | ||
![]() |
525f1f0028 | ||
![]() |
36bba202e3 | ||
![]() |
3563849c8a | ||
![]() |
6c03c11aff | ||
![]() |
27642d5a9e | ||
![]() |
136db6a783 | ||
![]() |
43d45f2e88 | ||
![]() |
24bfe8de6b | ||
![]() |
22fb2d9a65 | ||
![]() |
ba864ad40c | ||
![]() |
b57f967cb0 | ||
![]() |
c2b738937b | ||
![]() |
3707121594 | ||
![]() |
058cde4277 | ||
![]() |
a0390aed21 |
@@ -65,6 +65,7 @@ All inputs are **optional**. If not set, sensible defaults will be used.
|
|||||||
| `branch-suffix` | The branch suffix type when using the alternative branching strategy. Valid values are `random`, `timestamp` and `short-commit-hash`. See [Alternative strategy](#alternative-strategy---always-create-a-new-pull-request-branch) for details. | |
|
| `branch-suffix` | The branch suffix type when using the alternative branching strategy. Valid values are `random`, `timestamp` and `short-commit-hash`. See [Alternative strategy](#alternative-strategy---always-create-a-new-pull-request-branch) for details. | |
|
||||||
| `base` | Sets the pull request base branch. | Defaults to the branch checked out in the workflow. |
|
| `base` | Sets the pull request base branch. | Defaults to the branch checked out in the workflow. |
|
||||||
| `push-to-fork` | A fork of the checked-out parent repository to which the pull request branch will be pushed. e.g. `owner/repo-fork`. The pull request will be created to merge the fork's branch into the parent's base. See [push pull request branches to a fork](docs/concepts-guidelines.md#push-pull-request-branches-to-a-fork) for details. | |
|
| `push-to-fork` | A fork of the checked-out parent repository to which the pull request branch will be pushed. e.g. `owner/repo-fork`. The pull request will be created to merge the fork's branch into the parent's base. See [push pull request branches to a fork](docs/concepts-guidelines.md#push-pull-request-branches-to-a-fork) for details. | |
|
||||||
|
| `sign-commits` | Sign commits as `github-actions[bot]` when using `GITHUB_TOKEN`, or your own bot when using [GitHub App tokens](docs/concepts-guidelines.md#authenticating-with-github-app-generated-tokens). See [commit signing](docs/concepts-guidelines.md#commit-signature-verification-for-bots) for details. | `false` |
|
||||||
| `title` | The title of the pull request. | `Changes by create-pull-request action` |
|
| `title` | The title of the pull request. | `Changes by create-pull-request action` |
|
||||||
| `body` | The body of the pull request. | `Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action` |
|
| `body` | The body of the pull request. | `Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action` |
|
||||||
| `body-path` | The path to a file containing the pull request body. Takes precedence over `body`. | |
|
| `body-path` | The path to a file containing the pull request body. Takes precedence over `body`. | |
|
||||||
@@ -74,7 +75,6 @@ All inputs are **optional**. If not set, sensible defaults will be used.
|
|||||||
| `team-reviewers` | A comma or newline-separated list of GitHub teams to request a review from. Note that a `repo` scoped [PAT](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token), or equivalent [GitHub App permissions](docs/concepts-guidelines.md#authenticating-with-github-app-generated-tokens), are required. | |
|
| `team-reviewers` | A comma or newline-separated list of GitHub teams to request a review from. Note that a `repo` scoped [PAT](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token), or equivalent [GitHub App permissions](docs/concepts-guidelines.md#authenticating-with-github-app-generated-tokens), are required. | |
|
||||||
| `milestone` | The number of the milestone to associate this pull request with. | |
|
| `milestone` | The number of the milestone to associate this pull request with. | |
|
||||||
| `draft` | Create a [draft pull request](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests#draft-pull-requests). It is not possible to change draft status after creation except through the web interface. | `false` |
|
| `draft` | Create a [draft pull request](https://docs.github.com/en/github/collaborating-with-issues-and-pull-requests/about-pull-requests#draft-pull-requests). It is not possible to change draft status after creation except through the web interface. | `false` |
|
||||||
| `sign-commit` | Sign the commit as bot [refer: [Signature verification for bots](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification#signature-verification-for-bots)]. This can be useful if your repo or org has enforced commit-signing. | `false` |
|
|
||||||
|
|
||||||
#### commit-message
|
#### commit-message
|
||||||
|
|
||||||
|
@@ -2,7 +2,7 @@ import {
|
|||||||
createOrUpdateBranch,
|
createOrUpdateBranch,
|
||||||
tryFetch,
|
tryFetch,
|
||||||
getWorkingBaseAndType,
|
getWorkingBaseAndType,
|
||||||
buildBranchFileChanges
|
buildBranchCommits
|
||||||
} from '../lib/create-or-update-branch'
|
} from '../lib/create-or-update-branch'
|
||||||
import * as fs from 'fs'
|
import * as fs from 'fs'
|
||||||
import {GitCommandManager} from '../lib/git-command-manager'
|
import {GitCommandManager} from '../lib/git-command-manager'
|
||||||
@@ -230,37 +230,36 @@ describe('create-or-update-branch tests', () => {
|
|||||||
expect(workingBaseType).toEqual('commit')
|
expect(workingBaseType).toEqual('commit')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('tests buildBranchFileChanges with no diff', async () => {
|
it('tests buildBranchCommits with no diff', async () => {
|
||||||
await git.checkout(BRANCH, BASE)
|
await git.checkout(BRANCH, BASE)
|
||||||
const branchFileChanges = await buildBranchFileChanges(git, BASE, BRANCH)
|
const branchCommits = await buildBranchCommits(git, BASE, BRANCH)
|
||||||
expect(branchFileChanges.additions.length).toEqual(0)
|
expect(branchCommits.length).toEqual(0)
|
||||||
expect(branchFileChanges.deletions.length).toEqual(0)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
it('tests buildBranchFileChanges with addition and modification', async () => {
|
it('tests buildBranchCommits with addition and modification', async () => {
|
||||||
await git.checkout(BRANCH, BASE)
|
await git.checkout(BRANCH, BASE)
|
||||||
const changes = await createChanges()
|
await createChanges()
|
||||||
|
const UNTRACKED_EXE_FILE = 'a/script.sh'
|
||||||
|
const filepath = path.join(REPO_PATH, UNTRACKED_EXE_FILE)
|
||||||
|
await fs.promises.writeFile(filepath, '#!/usr/bin/env bash', {mode: 0o755})
|
||||||
await git.exec(['add', '-A'])
|
await git.exec(['add', '-A'])
|
||||||
await git.commit(['-m', 'Test changes'])
|
await git.commit(['-m', 'Test changes'])
|
||||||
|
|
||||||
const branchFileChanges = await buildBranchFileChanges(git, BASE, BRANCH)
|
const branchCommits = await buildBranchCommits(git, BASE, BRANCH)
|
||||||
|
|
||||||
expect(branchFileChanges.additions).toEqual([
|
expect(branchCommits.length).toEqual(1)
|
||||||
{
|
expect(branchCommits[0].subject).toEqual('Test changes')
|
||||||
path: TRACKED_FILE,
|
expect(branchCommits[0].changes.length).toEqual(3)
|
||||||
contents: Buffer.from(changes.tracked, 'binary').toString('base64')
|
expect(branchCommits[0].changes).toEqual([
|
||||||
},
|
{mode: '100755', path: UNTRACKED_EXE_FILE, status: 'A'},
|
||||||
{
|
{mode: '100644', path: TRACKED_FILE, status: 'M'},
|
||||||
path: UNTRACKED_FILE,
|
{mode: '100644', path: UNTRACKED_FILE, status: 'A'}
|
||||||
contents: Buffer.from(changes.untracked, 'binary').toString('base64')
|
|
||||||
}
|
|
||||||
])
|
])
|
||||||
expect(branchFileChanges.deletions.length).toEqual(0)
|
|
||||||
})
|
})
|
||||||
|
|
||||||
it('tests buildBranchFileChanges with addition and deletion', async () => {
|
it('tests buildBranchCommits with addition and deletion', async () => {
|
||||||
await git.checkout(BRANCH, BASE)
|
await git.checkout(BRANCH, BASE)
|
||||||
const changes = await createChanges()
|
await createChanges()
|
||||||
const TRACKED_FILE_NEW_PATH = 'c/tracked-file.txt'
|
const TRACKED_FILE_NEW_PATH = 'c/tracked-file.txt'
|
||||||
const filepath = path.join(REPO_PATH, TRACKED_FILE_NEW_PATH)
|
const filepath = path.join(REPO_PATH, TRACKED_FILE_NEW_PATH)
|
||||||
await fs.promises.mkdir(path.dirname(filepath), {recursive: true})
|
await fs.promises.mkdir(path.dirname(filepath), {recursive: true})
|
||||||
@@ -268,40 +267,38 @@ describe('create-or-update-branch tests', () => {
|
|||||||
await git.exec(['add', '-A'])
|
await git.exec(['add', '-A'])
|
||||||
await git.commit(['-m', 'Test changes'])
|
await git.commit(['-m', 'Test changes'])
|
||||||
|
|
||||||
const branchFileChanges = await buildBranchFileChanges(git, BASE, BRANCH)
|
const branchCommits = await buildBranchCommits(git, BASE, BRANCH)
|
||||||
|
|
||||||
expect(branchFileChanges.additions).toEqual([
|
expect(branchCommits.length).toEqual(1)
|
||||||
{
|
expect(branchCommits[0].subject).toEqual('Test changes')
|
||||||
path: UNTRACKED_FILE,
|
expect(branchCommits[0].changes.length).toEqual(3)
|
||||||
contents: Buffer.from(changes.untracked, 'binary').toString('base64')
|
expect(branchCommits[0].changes).toEqual([
|
||||||
},
|
{mode: '100644', path: TRACKED_FILE, status: 'D'},
|
||||||
{
|
{mode: '100644', path: UNTRACKED_FILE, status: 'A'},
|
||||||
path: TRACKED_FILE_NEW_PATH,
|
{mode: '100644', path: TRACKED_FILE_NEW_PATH, status: 'A'}
|
||||||
contents: Buffer.from(changes.tracked, 'binary').toString('base64')
|
|
||||||
}
|
|
||||||
])
|
])
|
||||||
expect(branchFileChanges.deletions).toEqual([{path: TRACKED_FILE}])
|
|
||||||
})
|
})
|
||||||
|
|
||||||
it('tests buildBranchFileChanges with binary files', async () => {
|
it('tests buildBranchCommits with multiple commits', async () => {
|
||||||
await git.checkout(BRANCH, BASE)
|
await git.checkout(BRANCH, BASE)
|
||||||
const filename = 'c/untracked-binary-file'
|
for (let i = 0; i < 3; i++) {
|
||||||
const filepath = path.join(REPO_PATH, filename)
|
await createChanges()
|
||||||
const binaryData = Buffer.from([0x00, 0xff, 0x10, 0x20])
|
|
||||||
await fs.promises.mkdir(path.dirname(filepath), {recursive: true})
|
|
||||||
await fs.promises.writeFile(filepath, binaryData)
|
|
||||||
await git.exec(['add', '-A'])
|
await git.exec(['add', '-A'])
|
||||||
await git.commit(['-m', 'Test changes'])
|
await git.commit(['-m', `Test changes ${i}`])
|
||||||
|
|
||||||
const branchFileChanges = await buildBranchFileChanges(git, BASE, BRANCH)
|
|
||||||
|
|
||||||
expect(branchFileChanges.additions).toEqual([
|
|
||||||
{
|
|
||||||
path: filename,
|
|
||||||
contents: binaryData.toString('base64')
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const branchCommits = await buildBranchCommits(git, BASE, BRANCH)
|
||||||
|
|
||||||
|
expect(branchCommits.length).toEqual(3)
|
||||||
|
for (let i = 0; i < 3; i++) {
|
||||||
|
expect(branchCommits[i].subject).toEqual(`Test changes ${i}`)
|
||||||
|
expect(branchCommits[i].changes.length).toEqual(2)
|
||||||
|
const untrackedFileStatus = i == 0 ? 'A' : 'M'
|
||||||
|
expect(branchCommits[i].changes).toEqual([
|
||||||
|
{mode: '100644', path: TRACKED_FILE, status: 'M'},
|
||||||
|
{mode: '100644', path: UNTRACKED_FILE, status: untrackedFileStatus}
|
||||||
])
|
])
|
||||||
expect(branchFileChanges.deletions.length).toEqual(0)
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
it('tests no changes resulting in no new branch being created', async () => {
|
it('tests no changes resulting in no new branch being created', async () => {
|
||||||
|
@@ -13,7 +13,7 @@ git daemon --verbose --enable=receive-pack --base-path=/git/remote --export-all
|
|||||||
# Give the daemon time to start
|
# Give the daemon time to start
|
||||||
sleep 2
|
sleep 2
|
||||||
|
|
||||||
# Create a local clone and make an initial commit
|
# Create a local clone and make initial commits
|
||||||
mkdir -p /git/local/repos
|
mkdir -p /git/local/repos
|
||||||
git clone git://127.0.0.1/repos/test-base.git /git/local/repos/test-base
|
git clone git://127.0.0.1/repos/test-base.git /git/local/repos/test-base
|
||||||
cd /git/local/repos/test-base
|
cd /git/local/repos/test-base
|
||||||
@@ -22,6 +22,10 @@ git config --global user.name "Your Name"
|
|||||||
echo "#test-base" > README.md
|
echo "#test-base" > README.md
|
||||||
git add .
|
git add .
|
||||||
git commit -m "initial commit"
|
git commit -m "initial commit"
|
||||||
|
echo "#test-base :sparkles:" > README.md
|
||||||
|
git add .
|
||||||
|
git commit -m "add sparkles" -m "Change description:
|
||||||
|
- updates README.md to add sparkles to the title"
|
||||||
git push -u
|
git push -u
|
||||||
git log -1 --pretty=oneline
|
git log -1 --pretty=oneline
|
||||||
git config --global --unset user.email
|
git config --global --unset user.email
|
||||||
|
26
__test__/git-command-manager.int.test.ts
Normal file
26
__test__/git-command-manager.int.test.ts
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
import {GitCommandManager, Commit} from '../lib/git-command-manager'
|
||||||
|
|
||||||
|
const REPO_PATH = '/git/local/repos/test-base'
|
||||||
|
|
||||||
|
describe('git-command-manager integration tests', () => {
|
||||||
|
let git: GitCommandManager
|
||||||
|
|
||||||
|
beforeAll(async () => {
|
||||||
|
git = await GitCommandManager.create(REPO_PATH)
|
||||||
|
await git.checkout('main')
|
||||||
|
})
|
||||||
|
|
||||||
|
it('tests getCommit', async () => {
|
||||||
|
const parent = await git.getCommit('HEAD^')
|
||||||
|
const commit = await git.getCommit('HEAD')
|
||||||
|
expect(parent.subject).toEqual('initial commit')
|
||||||
|
expect(parent.changes).toEqual([
|
||||||
|
{mode: '100644', status: 'A', path: 'README.md'}
|
||||||
|
])
|
||||||
|
expect(commit.subject).toEqual('add sparkles')
|
||||||
|
expect(commit.parents[0]).toEqual(parent.sha)
|
||||||
|
expect(commit.changes).toEqual([
|
||||||
|
{mode: '100644', status: 'M', path: 'README.md'}
|
||||||
|
])
|
||||||
|
})
|
||||||
|
})
|
@@ -7,7 +7,6 @@ const extraheaderConfigKey = 'http.https://127.0.0.1/.extraheader'
|
|||||||
|
|
||||||
describe('git-config-helper integration tests', () => {
|
describe('git-config-helper integration tests', () => {
|
||||||
let git: GitCommandManager
|
let git: GitCommandManager
|
||||||
let gitConfigHelper: GitConfigHelper
|
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
git = await GitCommandManager.create(REPO_PATH)
|
git = await GitCommandManager.create(REPO_PATH)
|
||||||
|
@@ -51,6 +51,9 @@ inputs:
|
|||||||
A fork of the checked out parent repository to which the pull request branch will be pushed.
|
A fork of the checked out parent repository to which the pull request branch will be pushed.
|
||||||
e.g. `owner/repo-fork`.
|
e.g. `owner/repo-fork`.
|
||||||
The pull request will be created to merge the fork's branch into the parent's base.
|
The pull request will be created to merge the fork's branch into the parent's base.
|
||||||
|
sign-commits:
|
||||||
|
description: 'Sign commits as `github-actions[bot]` when using `GITHUB_TOKEN`, or your own bot when using GitHub App tokens.'
|
||||||
|
default: true
|
||||||
title:
|
title:
|
||||||
description: 'The title of the pull request.'
|
description: 'The title of the pull request.'
|
||||||
default: 'Changes by create-pull-request action'
|
default: 'Changes by create-pull-request action'
|
||||||
@@ -74,9 +77,6 @@ inputs:
|
|||||||
draft:
|
draft:
|
||||||
description: 'Create a draft pull request. It is not possible to change draft status after creation except through the web interface'
|
description: 'Create a draft pull request. It is not possible to change draft status after creation except through the web interface'
|
||||||
default: false
|
default: false
|
||||||
sign-commit:
|
|
||||||
description: 'Sign the commit as github-actions bot (and as custom app if a different github-token is provided)'
|
|
||||||
default: true
|
|
||||||
outputs:
|
outputs:
|
||||||
pull-request-number:
|
pull-request-number:
|
||||||
description: 'The pull request number'
|
description: 'The pull request number'
|
||||||
|
12226
dist/index.js
vendored
12226
dist/index.js
vendored
File diff suppressed because it is too large
Load Diff
@@ -16,6 +16,8 @@ This document covers terminology, how the action works, general usage guidelines
|
|||||||
- [Push using SSH (deploy keys)](#push-using-ssh-deploy-keys)
|
- [Push using SSH (deploy keys)](#push-using-ssh-deploy-keys)
|
||||||
- [Push pull request branches to a fork](#push-pull-request-branches-to-a-fork)
|
- [Push pull request branches to a fork](#push-pull-request-branches-to-a-fork)
|
||||||
- [Authenticating with GitHub App generated tokens](#authenticating-with-github-app-generated-tokens)
|
- [Authenticating with GitHub App generated tokens](#authenticating-with-github-app-generated-tokens)
|
||||||
|
- [Commit signing](#commit-signing)
|
||||||
|
- [Commit signature verification for bots](#commit-signature-verification-for-bots)
|
||||||
- [GPG commit signature verification](#gpg-commit-signature-verification)
|
- [GPG commit signature verification](#gpg-commit-signature-verification)
|
||||||
- [Running in a container or on self-hosted runners](#running-in-a-container-or-on-self-hosted-runners)
|
- [Running in a container or on self-hosted runners](#running-in-a-container-or-on-self-hosted-runners)
|
||||||
|
|
||||||
@@ -260,17 +262,17 @@ GitHub App generated tokens are more secure than using a PAT because GitHub App
|
|||||||
|
|
||||||
4. Set secrets on your repository containing the GitHub App ID, and the private key you created in step 2. e.g. `APP_ID`, `APP_PRIVATE_KEY`.
|
4. Set secrets on your repository containing the GitHub App ID, and the private key you created in step 2. e.g. `APP_ID`, `APP_PRIVATE_KEY`.
|
||||||
|
|
||||||
5. The following example workflow shows how to use [tibdex/github-app-token](https://github.com/tibdex/github-app-token) to generate a token for use with this action.
|
5. The following example workflow shows how to use [actions/create-github-app-token](https://github.com/actions/create-github-app-token) to generate a token for use with this action.
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- uses: tibdex/github-app-token@v1
|
- uses: actions/create-github-app-token@v1
|
||||||
id: generate-token
|
id: generate-token
|
||||||
with:
|
with:
|
||||||
app_id: ${{ secrets.APP_ID }}
|
app-id: ${{ secrets.APP_ID }}
|
||||||
private_key: ${{ secrets.APP_PRIVATE_KEY }}
|
private-key: ${{ secrets.APP_PRIVATE_KEY }}
|
||||||
|
|
||||||
# Make changes to pull request here
|
# Make changes to pull request here
|
||||||
|
|
||||||
@@ -280,7 +282,54 @@ GitHub App generated tokens are more secure than using a PAT because GitHub App
|
|||||||
token: ${{ steps.generate-token.outputs.token }}
|
token: ${{ steps.generate-token.outputs.token }}
|
||||||
```
|
```
|
||||||
|
|
||||||
### GPG commit signature verification
|
### Commit signing
|
||||||
|
|
||||||
|
[Commit signature verification](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification) is a feature where GitHub will mark signed commits as "verified" to give confidence that changes are from a trusted source. Some organizations require commit signing, and enforce it with branch protection rules.
|
||||||
|
|
||||||
|
The action supports two methods to sign commits, [commit signature verification for bots](#commit-signature-verification-for-bots), and [GPG commit signature verification](#gpg-commit-signature-verification).
|
||||||
|
|
||||||
|
#### Commit signature verification for bots
|
||||||
|
|
||||||
|
The action can sign commits as `github-actions[bot]` when using the repository's default `GITHUB_TOKEN`, or your own bot when using [GitHub App tokens](#authenticating-with-github-app-generated-tokens).
|
||||||
|
|
||||||
|
> [!IMPORTANT]
|
||||||
|
> - When setting `sign-commits: true` the action will ignore the `committer` and `author` inputs.
|
||||||
|
> - If you attempt to use a [Personal Access Token (PAT)](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) the action will create the pull request, but commits will not be signed. Commit signing is only supported with bot generated tokens.
|
||||||
|
|
||||||
|
In this example the `token` input is not supplied, so the action will use the repository's default `GITHUB_TOKEN`. This will sign commits as `github-actions[bot]`.
|
||||||
|
```yaml
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
# Make changes to pull request here
|
||||||
|
|
||||||
|
- name: Create Pull Request
|
||||||
|
uses: peter-evans/create-pull-request@v6
|
||||||
|
with:
|
||||||
|
sign-commits: true
|
||||||
|
```
|
||||||
|
|
||||||
|
In this example, the `token` input is generated using a GitHub App. This will sign commits as `<application-name>[bot]`.
|
||||||
|
```yaml
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- uses: actions/create-github-app-token@v1
|
||||||
|
id: generate-token
|
||||||
|
with:
|
||||||
|
app-id: ${{ secrets.APP_ID }}
|
||||||
|
private-key: ${{ secrets.APP_PRIVATE_KEY }}
|
||||||
|
|
||||||
|
# Make changes to pull request here
|
||||||
|
|
||||||
|
- name: Create Pull Request
|
||||||
|
uses: peter-evans/create-pull-request@v6
|
||||||
|
with:
|
||||||
|
token: ${{ steps.generate-token.outputs.token }}
|
||||||
|
sign-commits: true
|
||||||
|
```
|
||||||
|
|
||||||
|
#### GPG commit signature verification
|
||||||
|
|
||||||
The action can use GPG to sign commits with a GPG key that you generate yourself.
|
The action can use GPG to sign commits with a GPG key that you generate yourself.
|
||||||
|
|
||||||
|
491
package-lock.json
generated
491
package-lock.json
generated
@@ -11,18 +11,18 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.10.1",
|
"@actions/core": "^1.10.1",
|
||||||
"@actions/exec": "^1.1.1",
|
"@actions/exec": "^1.1.1",
|
||||||
"@octokit/core": "^4.2.4",
|
"@octokit/core": "^6.1.2",
|
||||||
"@octokit/graphql": "^8.1.1",
|
"@octokit/plugin-paginate-rest": "^11.3.3",
|
||||||
"@octokit/graphql-schema": "^15.25.0",
|
"@octokit/plugin-rest-endpoint-methods": "^13.2.4",
|
||||||
"@octokit/plugin-paginate-rest": "^5.0.1",
|
"@octokit/plugin-throttling": "^9.3.1",
|
||||||
"@octokit/plugin-rest-endpoint-methods": "^6.8.1",
|
"p-limit": "^6.1.0",
|
||||||
"proxy-from-env": "^1.1.0",
|
"proxy-from-env": "^1.1.0",
|
||||||
"undici": "^6.19.4",
|
"undici": "^6.19.7",
|
||||||
"uuid": "^9.0.1"
|
"uuid": "^9.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^29.5.12",
|
"@types/jest": "^29.5.12",
|
||||||
"@types/node": "^18.19.42",
|
"@types/node": "^18.19.44",
|
||||||
"@typescript-eslint/eslint-plugin": "^7.17.0",
|
"@typescript-eslint/eslint-plugin": "^7.17.0",
|
||||||
"@typescript-eslint/parser": "^7.17.0",
|
"@typescript-eslint/parser": "^7.17.0",
|
||||||
"@vercel/ncc": "^0.38.1",
|
"@vercel/ncc": "^0.38.1",
|
||||||
@@ -37,7 +37,7 @@
|
|||||||
"jest-environment-jsdom": "^29.7.0",
|
"jest-environment-jsdom": "^29.7.0",
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"prettier": "^3.3.3",
|
"prettier": "^3.3.3",
|
||||||
"ts-jest": "^29.2.3",
|
"ts-jest": "^29.2.4",
|
||||||
"typescript": "^5.5.4"
|
"typescript": "^5.5.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -1262,54 +1262,40 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/auth-token": {
|
"node_modules/@octokit/auth-token": {
|
||||||
"version": "3.0.4",
|
"version": "5.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-3.0.4.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-5.1.1.tgz",
|
||||||
"integrity": "sha512-TWFX7cZF2LXoCvdmJWY7XVPi74aSY0+FfBZNSXEXFkMpjcqsQwDSYVv5FhRFaI0V1ECnwbz4j59T/G+rXNWaIQ==",
|
"integrity": "sha512-rh3G3wDO8J9wSjfI436JUKzHIxq8NaiL0tVeB2aXmG6p/9859aUOAjA9pmSPNGGZxfwmaJ9ozOJImuNVJdpvbA==",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 14"
|
"node": ">= 18"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/core": {
|
"node_modules/@octokit/core": {
|
||||||
"version": "4.2.4",
|
"version": "6.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-4.2.4.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-6.1.2.tgz",
|
||||||
"integrity": "sha512-rYKilwgzQ7/imScn3M9/pFfUf4I1AZEH3KhyJmtPdE2zfaXAn2mFfUy4FbKewzc2We5y/LlKLj36fWJLKC2SIQ==",
|
"integrity": "sha512-hEb7Ma4cGJGEUNOAVmyfdB/3WirWMg5hDuNFVejGEDFqupeOysLc2sG6HJxY2etBp5YQu5Wtxwi020jS9xlUwg==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/auth-token": "^3.0.0",
|
"@octokit/auth-token": "^5.0.0",
|
||||||
"@octokit/graphql": "^5.0.0",
|
"@octokit/graphql": "^8.0.0",
|
||||||
"@octokit/request": "^6.0.0",
|
"@octokit/request": "^9.0.0",
|
||||||
"@octokit/request-error": "^3.0.0",
|
"@octokit/request-error": "^6.0.1",
|
||||||
"@octokit/types": "^9.0.0",
|
"@octokit/types": "^13.0.0",
|
||||||
"before-after-hook": "^2.2.0",
|
"before-after-hook": "^3.0.2",
|
||||||
"universal-user-agent": "^6.0.0"
|
"universal-user-agent": "^7.0.0"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 14"
|
"node": ">= 18"
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/core/node_modules/@octokit/graphql": {
|
|
||||||
"version": "5.0.6",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-5.0.6.tgz",
|
|
||||||
"integrity": "sha512-Fxyxdy/JH0MnIB5h+UQ3yCoh1FG4kWXfFKkpWqjZHw/p+Kc8Y44Hu/kCgNBT6nU1shNumEchmW/sUO1JuQnPcw==",
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/request": "^6.0.0",
|
|
||||||
"@octokit/types": "^9.0.0",
|
|
||||||
"universal-user-agent": "^6.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 14"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/endpoint": {
|
"node_modules/@octokit/endpoint": {
|
||||||
"version": "7.0.6",
|
"version": "10.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-7.0.6.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-10.1.1.tgz",
|
||||||
"integrity": "sha512-5L4fseVRUsDFGR00tMWD/Trdeeihn999rTMGRMC1G/Ldi1uWlWJzI98H4Iak5DB/RVvQuyMYKqSK/R6mbSOQyg==",
|
"integrity": "sha512-JYjh5rMOwXMJyUpj028cu0Gbp7qe/ihxfJMLc8VZBMMqSwLgOxDI1911gV4Enl1QSavAQNJcwmwBF9M0VvLh6Q==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@octokit/types": "^9.0.0",
|
"@octokit/types": "^13.0.0",
|
||||||
"is-plain-object": "^5.0.0",
|
"universal-user-agent": "^7.0.2"
|
||||||
"universal-user-agent": "^6.0.0"
|
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 14"
|
"node": ">= 18"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/graphql": {
|
"node_modules/@octokit/graphql": {
|
||||||
@@ -1325,33 +1311,55 @@
|
|||||||
"node": ">= 18"
|
"node": ">= 18"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/graphql-schema": {
|
"node_modules/@octokit/openapi-types": {
|
||||||
"version": "15.25.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/graphql-schema/-/graphql-schema-15.25.0.tgz",
|
|
||||||
"integrity": "sha512-aqz9WECtdxVWSqgKroUu9uu+CRt5KnfErWs0dBPKlTdrreAeWzS5NRu22ZVcGdPP7s3XDg2Gnf5iyoZPCRZWmQ==",
|
|
||||||
"dependencies": {
|
|
||||||
"graphql": "^16.0.0",
|
|
||||||
"graphql-tag": "^2.10.3"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/graphql/node_modules/@octokit/endpoint": {
|
|
||||||
"version": "10.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-10.1.1.tgz",
|
|
||||||
"integrity": "sha512-JYjh5rMOwXMJyUpj028cu0Gbp7qe/ihxfJMLc8VZBMMqSwLgOxDI1911gV4Enl1QSavAQNJcwmwBF9M0VvLh6Q==",
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/types": "^13.0.0",
|
|
||||||
"universal-user-agent": "^7.0.2"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 18"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/graphql/node_modules/@octokit/openapi-types": {
|
|
||||||
"version": "22.2.0",
|
"version": "22.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-22.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-22.2.0.tgz",
|
||||||
"integrity": "sha512-QBhVjcUa9W7Wwhm6DBFu6ZZ+1/t/oYxqc2tp81Pi41YNuJinbFRx8B133qVOrAaBbF7D/m0Et6f9/pZt9Rc+tg=="
|
"integrity": "sha512-QBhVjcUa9W7Wwhm6DBFu6ZZ+1/t/oYxqc2tp81Pi41YNuJinbFRx8B133qVOrAaBbF7D/m0Et6f9/pZt9Rc+tg=="
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/graphql/node_modules/@octokit/request": {
|
"node_modules/@octokit/plugin-paginate-rest": {
|
||||||
|
"version": "11.3.3",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-11.3.3.tgz",
|
||||||
|
"integrity": "sha512-o4WRoOJZlKqEEgj+i9CpcmnByvtzoUYC6I8PD2SA95M+BJ2x8h7oLcVOg9qcowWXBOdcTRsMZiwvM3EyLm9AfA==",
|
||||||
|
"dependencies": {
|
||||||
|
"@octokit/types": "^13.5.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 18"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@octokit/core": ">=6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@octokit/plugin-rest-endpoint-methods": {
|
||||||
|
"version": "13.2.4",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-13.2.4.tgz",
|
||||||
|
"integrity": "sha512-gusyAVgTrPiuXOdfqOySMDztQHv6928PQ3E4dqVGEtOvRXAKRbJR4b1zQyniIT9waqaWk/UDaoJ2dyPr7Bk7Iw==",
|
||||||
|
"dependencies": {
|
||||||
|
"@octokit/types": "^13.5.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 18"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@octokit/core": ">=6"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@octokit/plugin-throttling": {
|
||||||
|
"version": "9.3.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/@octokit/plugin-throttling/-/plugin-throttling-9.3.1.tgz",
|
||||||
|
"integrity": "sha512-Qd91H4liUBhwLB2h6jZ99bsxoQdhgPk6TdwnClPyTBSDAdviGPceViEgUwj+pcQDmB/rfAXAXK7MTochpHM3yQ==",
|
||||||
|
"dependencies": {
|
||||||
|
"@octokit/types": "^13.0.0",
|
||||||
|
"bottleneck": "^2.15.3"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 18"
|
||||||
|
},
|
||||||
|
"peerDependencies": {
|
||||||
|
"@octokit/core": "^6.0.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@octokit/request": {
|
||||||
"version": "9.1.3",
|
"version": "9.1.3",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-9.1.3.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-9.1.3.tgz",
|
||||||
"integrity": "sha512-V+TFhu5fdF3K58rs1pGUJIDH5RZLbZm5BI+MNF+6o/ssFNT4vWlCh/tVpF3NxGtP15HUxTTMUbsG5llAuU2CZA==",
|
"integrity": "sha512-V+TFhu5fdF3K58rs1pGUJIDH5RZLbZm5BI+MNF+6o/ssFNT4vWlCh/tVpF3NxGtP15HUxTTMUbsG5llAuU2CZA==",
|
||||||
@@ -1365,7 +1373,7 @@
|
|||||||
"node": ">= 18"
|
"node": ">= 18"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/graphql/node_modules/@octokit/request-error": {
|
"node_modules/@octokit/request-error": {
|
||||||
"version": "6.1.4",
|
"version": "6.1.4",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-6.1.4.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-6.1.4.tgz",
|
||||||
"integrity": "sha512-VpAhIUxwhWZQImo/dWAN/NpPqqojR6PSLgLYAituLM6U+ddx9hCioFGwBr5Mi+oi5CLeJkcAs3gJ0PYYzU6wUg==",
|
"integrity": "sha512-VpAhIUxwhWZQImo/dWAN/NpPqqojR6PSLgLYAituLM6U+ddx9hCioFGwBr5Mi+oi5CLeJkcAs3gJ0PYYzU6wUg==",
|
||||||
@@ -1376,7 +1384,7 @@
|
|||||||
"node": ">= 18"
|
"node": ">= 18"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/graphql/node_modules/@octokit/types": {
|
"node_modules/@octokit/types": {
|
||||||
"version": "13.5.0",
|
"version": "13.5.0",
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.5.0.tgz",
|
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.5.0.tgz",
|
||||||
"integrity": "sha512-HdqWTf5Z3qwDVlzCrP8UJquMwunpDiMPt5er+QjGzL4hqr/vBVY/MauQgS1xWxCDT1oMx1EULyqxncdCY/NVSQ==",
|
"integrity": "sha512-HdqWTf5Z3qwDVlzCrP8UJquMwunpDiMPt5er+QjGzL4hqr/vBVY/MauQgS1xWxCDT1oMx1EULyqxncdCY/NVSQ==",
|
||||||
@@ -1384,108 +1392,6 @@
|
|||||||
"@octokit/openapi-types": "^22.2.0"
|
"@octokit/openapi-types": "^22.2.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@octokit/graphql/node_modules/universal-user-agent": {
|
|
||||||
"version": "7.0.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.2.tgz",
|
|
||||||
"integrity": "sha512-0JCqzSKnStlRRQfCdowvqy3cy0Dvtlb8xecj/H8JFZuCze4rwjPZQOgvFvn0Ws/usCHQFGpyr+pB9adaGwXn4Q=="
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/openapi-types": {
|
|
||||||
"version": "18.1.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-18.1.1.tgz",
|
|
||||||
"integrity": "sha512-VRaeH8nCDtF5aXWnjPuEMIYf1itK/s3JYyJcWFJT8X9pSNnBtriDf7wlEWsGuhPLl4QIH4xM8fqTXDwJ3Mu6sw=="
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/plugin-paginate-rest": {
|
|
||||||
"version": "5.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-5.0.1.tgz",
|
|
||||||
"integrity": "sha512-7A+rEkS70pH36Z6JivSlR7Zqepz3KVucEFVDnSrgHXzG7WLAzYwcHZbKdfTXHwuTHbkT1vKvz7dHl1+HNf6Qyw==",
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/types": "^8.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 14"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"@octokit/core": ">=4"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/openapi-types": {
|
|
||||||
"version": "14.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-14.0.0.tgz",
|
|
||||||
"integrity": "sha512-HNWisMYlR8VCnNurDU6os2ikx0s0VyEjDYHNS/h4cgb8DeOxQ0n72HyinUtdDVxJhFy3FWLGl0DJhfEWk3P5Iw=="
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/plugin-paginate-rest/node_modules/@octokit/types": {
|
|
||||||
"version": "8.2.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-8.2.1.tgz",
|
|
||||||
"integrity": "sha512-8oWMUji8be66q2B9PmEIUyQm00VPDPun07umUWSaCwxmeaquFBro4Hcc3ruVoDo3zkQyZBlRvhIMEYS3pBhanw==",
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/openapi-types": "^14.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/plugin-rest-endpoint-methods": {
|
|
||||||
"version": "6.8.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-6.8.1.tgz",
|
|
||||||
"integrity": "sha512-QrlaTm8Lyc/TbU7BL/8bO49vp+RZ6W3McxxmmQTgYxf2sWkO8ZKuj4dLhPNJD6VCUW1hetCmeIM0m6FTVpDiEg==",
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/types": "^8.1.1",
|
|
||||||
"deprecation": "^2.3.1"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 14"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"@octokit/core": ">=3"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/openapi-types": {
|
|
||||||
"version": "14.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-14.0.0.tgz",
|
|
||||||
"integrity": "sha512-HNWisMYlR8VCnNurDU6os2ikx0s0VyEjDYHNS/h4cgb8DeOxQ0n72HyinUtdDVxJhFy3FWLGl0DJhfEWk3P5Iw=="
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/plugin-rest-endpoint-methods/node_modules/@octokit/types": {
|
|
||||||
"version": "8.2.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-8.2.1.tgz",
|
|
||||||
"integrity": "sha512-8oWMUji8be66q2B9PmEIUyQm00VPDPun07umUWSaCwxmeaquFBro4Hcc3ruVoDo3zkQyZBlRvhIMEYS3pBhanw==",
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/openapi-types": "^14.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/request": {
|
|
||||||
"version": "6.2.8",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-6.2.8.tgz",
|
|
||||||
"integrity": "sha512-ow4+pkVQ+6XVVsekSYBzJC0VTVvh/FCTUUgTsboGq+DTeWdyIFV8WSCdo0RIxk6wSkBTHqIK1mYuY7nOBXOchw==",
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/endpoint": "^7.0.0",
|
|
||||||
"@octokit/request-error": "^3.0.0",
|
|
||||||
"@octokit/types": "^9.0.0",
|
|
||||||
"is-plain-object": "^5.0.0",
|
|
||||||
"node-fetch": "^2.6.7",
|
|
||||||
"universal-user-agent": "^6.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 14"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/request-error": {
|
|
||||||
"version": "3.0.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-3.0.3.tgz",
|
|
||||||
"integrity": "sha512-crqw3V5Iy2uOU5Np+8M/YexTlT8zxCfI+qu+LxUB7SZpje4Qmx3mub5DfEKSO8Ylyk0aogi6TYdf6kxzh2BguQ==",
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/types": "^9.0.0",
|
|
||||||
"deprecation": "^2.0.0",
|
|
||||||
"once": "^1.4.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">= 14"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@octokit/types": {
|
|
||||||
"version": "9.3.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-9.3.2.tgz",
|
|
||||||
"integrity": "sha512-D4iHGTdAnEEVsB8fl95m1hiz7D5YiRdQ9b/OEb3BYRVwbLsGHcRVPz+u+BgRLNk0Q0/4iZCBqDN96j2XNxfXrA==",
|
|
||||||
"dependencies": {
|
|
||||||
"@octokit/openapi-types": "^18.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/@pkgr/core": {
|
"node_modules/@pkgr/core": {
|
||||||
"version": "0.1.1",
|
"version": "0.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/@pkgr/core/-/core-0.1.1.tgz",
|
||||||
@@ -1639,9 +1545,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/@types/node": {
|
"node_modules/@types/node": {
|
||||||
"version": "18.19.42",
|
"version": "18.19.44",
|
||||||
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.42.tgz",
|
"resolved": "https://registry.npmjs.org/@types/node/-/node-18.19.44.tgz",
|
||||||
"integrity": "sha512-d2ZFc/3lnK2YCYhos8iaNIYu9Vfhr92nHiyJHRltXWjXUBjEE+A4I58Tdbnw4VhggSW+2j5y5gTrLs4biNnubg==",
|
"integrity": "sha512-ZsbGerYg72WMXUIE9fYxtvfzLEuq6q8mKERdWFnqTmOvudMxnz+CBNRoOwJ2kNpFOncrKjT1hZwxjlFgQ9qvQA==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"undici-types": "~5.26.4"
|
"undici-types": "~5.26.4"
|
||||||
@@ -2700,9 +2606,14 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/before-after-hook": {
|
"node_modules/before-after-hook": {
|
||||||
"version": "2.2.3",
|
"version": "3.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-3.0.2.tgz",
|
||||||
"integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ=="
|
"integrity": "sha512-Nik3Sc0ncrMK4UUdXQmAnRtzmNQTAAXmXIopizwZ1W1t8QmfJj+zL4OA2I7XPTPW5z5TDqv4hRo/JzouDJnX3A=="
|
||||||
|
},
|
||||||
|
"node_modules/bottleneck": {
|
||||||
|
"version": "2.19.5",
|
||||||
|
"resolved": "https://registry.npmjs.org/bottleneck/-/bottleneck-2.19.5.tgz",
|
||||||
|
"integrity": "sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw=="
|
||||||
},
|
},
|
||||||
"node_modules/brace-expansion": {
|
"node_modules/brace-expansion": {
|
||||||
"version": "1.1.11",
|
"version": "1.1.11",
|
||||||
@@ -3217,11 +3128,6 @@
|
|||||||
"node": ">=0.4.0"
|
"node": ">=0.4.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/deprecation": {
|
|
||||||
"version": "2.3.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz",
|
|
||||||
"integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ=="
|
|
||||||
},
|
|
||||||
"node_modules/dequal": {
|
"node_modules/dequal": {
|
||||||
"version": "2.0.3",
|
"version": "2.0.3",
|
||||||
"resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz",
|
"resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz",
|
||||||
@@ -4567,28 +4473,6 @@
|
|||||||
"integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==",
|
"integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/graphql": {
|
|
||||||
"version": "16.9.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/graphql/-/graphql-16.9.0.tgz",
|
|
||||||
"integrity": "sha512-GGTKBX4SD7Wdb8mqeDLni2oaRGYQWjWHGKPQ24ZMnUtKfcsVoiv4uX8+LJr1K6U5VW2Lu1BwJnj7uiori0YtRw==",
|
|
||||||
"engines": {
|
|
||||||
"node": "^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/graphql-tag": {
|
|
||||||
"version": "2.12.6",
|
|
||||||
"resolved": "https://registry.npmjs.org/graphql-tag/-/graphql-tag-2.12.6.tgz",
|
|
||||||
"integrity": "sha512-FdSNcu2QQcWnM2VNvSCCDCVS5PpPqpzgFT8+GXzqJuoDd0CBncxCY278u4mhRO7tMgo2JjgJA5aZ+nWSQ/Z+xg==",
|
|
||||||
"dependencies": {
|
|
||||||
"tslib": "^2.1.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=10"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"graphql": "^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/has-bigints": {
|
"node_modules/has-bigints": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz",
|
||||||
@@ -5081,14 +4965,6 @@
|
|||||||
"node": ">=8"
|
"node": ">=8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/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==",
|
|
||||||
"engines": {
|
|
||||||
"node": ">=0.10.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/is-potential-custom-element-name": {
|
"node_modules/is-potential-custom-element-name": {
|
||||||
"version": "1.0.1",
|
"version": "1.0.1",
|
||||||
"resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/is-potential-custom-element-name/-/is-potential-custom-element-name-1.0.1.tgz",
|
||||||
@@ -5384,6 +5260,33 @@
|
|||||||
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
|
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/jest-changed-files/node_modules/p-limit": {
|
||||||
|
"version": "3.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
|
||||||
|
"integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"yocto-queue": "^0.1.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/jest-changed-files/node_modules/yocto-queue": {
|
||||||
|
"version": "0.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
|
||||||
|
"integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
|
||||||
|
"dev": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/jest-circus": {
|
"node_modules/jest-circus": {
|
||||||
"version": "29.7.0",
|
"version": "29.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/jest-circus/-/jest-circus-29.7.0.tgz",
|
||||||
@@ -5415,6 +5318,33 @@
|
|||||||
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
|
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/jest-circus/node_modules/p-limit": {
|
||||||
|
"version": "3.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
|
||||||
|
"integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"yocto-queue": "^0.1.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/jest-circus/node_modules/yocto-queue": {
|
||||||
|
"version": "0.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
|
||||||
|
"integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
|
||||||
|
"dev": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/jest-cli": {
|
"node_modules/jest-cli": {
|
||||||
"version": "29.7.0",
|
"version": "29.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/jest-cli/-/jest-cli-29.7.0.tgz",
|
||||||
@@ -5767,6 +5697,33 @@
|
|||||||
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
|
"node": "^14.15.0 || ^16.10.0 || >=18.0.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/jest-runner/node_modules/p-limit": {
|
||||||
|
"version": "3.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
|
||||||
|
"integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"yocto-queue": "^0.1.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/jest-runner/node_modules/yocto-queue": {
|
||||||
|
"version": "0.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
|
||||||
|
"integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
|
||||||
|
"dev": true,
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/jest-runtime": {
|
"node_modules/jest-runtime": {
|
||||||
"version": "29.7.0",
|
"version": "29.7.0",
|
||||||
"resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz",
|
"resolved": "https://registry.npmjs.org/jest-runtime/-/jest-runtime-29.7.0.tgz",
|
||||||
@@ -6297,44 +6254,6 @@
|
|||||||
"integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==",
|
"integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/node-fetch": {
|
|
||||||
"version": "2.7.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz",
|
|
||||||
"integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==",
|
|
||||||
"dependencies": {
|
|
||||||
"whatwg-url": "^5.0.0"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": "4.x || >=6.0.0"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"encoding": "^0.1.0"
|
|
||||||
},
|
|
||||||
"peerDependenciesMeta": {
|
|
||||||
"encoding": {
|
|
||||||
"optional": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/node-fetch/node_modules/tr46": {
|
|
||||||
"version": "0.0.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz",
|
|
||||||
"integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="
|
|
||||||
},
|
|
||||||
"node_modules/node-fetch/node_modules/webidl-conversions": {
|
|
||||||
"version": "3.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz",
|
|
||||||
"integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="
|
|
||||||
},
|
|
||||||
"node_modules/node-fetch/node_modules/whatwg-url": {
|
|
||||||
"version": "5.0.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz",
|
|
||||||
"integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==",
|
|
||||||
"dependencies": {
|
|
||||||
"tr46": "~0.0.3",
|
|
||||||
"webidl-conversions": "^3.0.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/node-int64": {
|
"node_modules/node-int64": {
|
||||||
"version": "0.4.0",
|
"version": "0.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz",
|
||||||
@@ -6482,6 +6401,7 @@
|
|||||||
"version": "1.4.0",
|
"version": "1.4.0",
|
||||||
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
|
||||||
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
|
"integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
|
||||||
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"wrappy": "1"
|
"wrappy": "1"
|
||||||
}
|
}
|
||||||
@@ -6519,6 +6439,35 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/p-limit": {
|
"node_modules/p-limit": {
|
||||||
|
"version": "6.1.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-6.1.0.tgz",
|
||||||
|
"integrity": "sha512-H0jc0q1vOzlEk0TqAKXKZxdl7kX3OFUzCnNVUnq5Pc3DGo0kpeaMuPqxQn235HibwBEb0/pm9dgKTjXy66fBkg==",
|
||||||
|
"dependencies": {
|
||||||
|
"yocto-queue": "^1.1.1"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=18"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/p-locate": {
|
||||||
|
"version": "5.0.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
|
||||||
|
"integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
|
||||||
|
"dev": true,
|
||||||
|
"dependencies": {
|
||||||
|
"p-limit": "^3.0.2"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">=10"
|
||||||
|
},
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/p-locate/node_modules/p-limit": {
|
||||||
"version": "3.1.0",
|
"version": "3.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz",
|
||||||
"integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
|
"integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==",
|
||||||
@@ -6533,14 +6482,11 @@
|
|||||||
"url": "https://github.com/sponsors/sindresorhus"
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/p-locate": {
|
"node_modules/p-locate/node_modules/yocto-queue": {
|
||||||
"version": "5.0.0",
|
"version": "0.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
|
||||||
"integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==",
|
"integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
|
||||||
"p-limit": "^3.0.2"
|
|
||||||
},
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10"
|
"node": ">=10"
|
||||||
},
|
},
|
||||||
@@ -7553,9 +7499,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/ts-jest": {
|
"node_modules/ts-jest": {
|
||||||
"version": "29.2.3",
|
"version": "29.2.4",
|
||||||
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.2.3.tgz",
|
"resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.2.4.tgz",
|
||||||
"integrity": "sha512-yCcfVdiBFngVz9/keHin9EnsrQtQtEu3nRykNy9RVp+FiPFFbPJ3Sg6Qg4+TkmH0vMP5qsTKgXSsk80HRwvdgQ==",
|
"integrity": "sha512-3d6tgDyhCI29HlpwIq87sNuI+3Q6GLTTCeYRHCs7vDz+/3GCMwEtV9jezLyl4ZtnBgx00I7hm8PCP8cTksMGrw==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bs-logger": "0.x",
|
"bs-logger": "0.x",
|
||||||
@@ -7636,7 +7582,8 @@
|
|||||||
"node_modules/tslib": {
|
"node_modules/tslib": {
|
||||||
"version": "2.6.3",
|
"version": "2.6.3",
|
||||||
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz",
|
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.6.3.tgz",
|
||||||
"integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ=="
|
"integrity": "sha512-xNvxJEOUiWPGhUuUdQgAJPKOOJfGnIyKySOc09XkKsgdUV/3E2zvwZYdejjmRgPCgcym1juLH3226yA7sEFJKQ==",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/tsutils": {
|
"node_modules/tsutils": {
|
||||||
"version": "3.21.0",
|
"version": "3.21.0",
|
||||||
@@ -7802,9 +7749,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/undici": {
|
"node_modules/undici": {
|
||||||
"version": "6.19.4",
|
"version": "6.19.7",
|
||||||
"resolved": "https://registry.npmjs.org/undici/-/undici-6.19.4.tgz",
|
"resolved": "https://registry.npmjs.org/undici/-/undici-6.19.7.tgz",
|
||||||
"integrity": "sha512-i3uaEUwNdkRq2qtTRRJb13moW5HWqviu7Vl7oYRYz++uPtGHJj+x7TGjcEuwS5Mt2P4nA0U9dhIX3DdB6JGY0g==",
|
"integrity": "sha512-HR3W/bMGPSr90i8AAp2C4DM3wChFdJPLrWYpIS++LxS8K+W535qftjt+4MyjNYHeWabMj1nvtmLIi7l++iq91A==",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=18.17"
|
"node": ">=18.17"
|
||||||
}
|
}
|
||||||
@@ -7816,9 +7763,9 @@
|
|||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/universal-user-agent": {
|
"node_modules/universal-user-agent": {
|
||||||
"version": "6.0.1",
|
"version": "7.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.1.tgz",
|
"resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-7.0.2.tgz",
|
||||||
"integrity": "sha512-yCzhz6FN2wU1NiiQRogkTQszlQSlpWaw8SvVegAc+bDxbzHgh1vX8uIe8OYyMH6DwH+sdTJsgMl36+mSMdRJIQ=="
|
"integrity": "sha512-0JCqzSKnStlRRQfCdowvqy3cy0Dvtlb8xecj/H8JFZuCze4rwjPZQOgvFvn0Ws/usCHQFGpyr+pB9adaGwXn4Q=="
|
||||||
},
|
},
|
||||||
"node_modules/universalify": {
|
"node_modules/universalify": {
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
@@ -8091,7 +8038,8 @@
|
|||||||
"node_modules/wrappy": {
|
"node_modules/wrappy": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
|
||||||
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ=="
|
"integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
|
||||||
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/write-file-atomic": {
|
"node_modules/write-file-atomic": {
|
||||||
"version": "4.0.2",
|
"version": "4.0.2",
|
||||||
@@ -8185,12 +8133,11 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/yocto-queue": {
|
"node_modules/yocto-queue": {
|
||||||
"version": "0.1.0",
|
"version": "1.1.1",
|
||||||
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-1.1.1.tgz",
|
||||||
"integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==",
|
"integrity": "sha512-b4JR1PFR10y1mKjhHY9LaGo6tmrgjit7hxVIeAmyMw3jegXR4dhYqLaQF5zMXZxY7tLpMyJeLjr1C4rLmkVe8g==",
|
||||||
"dev": true,
|
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=10"
|
"node": ">=12.20"
|
||||||
},
|
},
|
||||||
"funding": {
|
"funding": {
|
||||||
"url": "https://github.com/sponsors/sindresorhus"
|
"url": "https://github.com/sponsors/sindresorhus"
|
||||||
|
16
package.json
16
package.json
@@ -31,18 +31,18 @@
|
|||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@actions/core": "^1.10.1",
|
"@actions/core": "^1.10.1",
|
||||||
"@actions/exec": "^1.1.1",
|
"@actions/exec": "^1.1.1",
|
||||||
"@octokit/core": "^4.2.4",
|
"@octokit/core": "^6.1.2",
|
||||||
"@octokit/graphql": "^8.1.1",
|
"@octokit/plugin-paginate-rest": "^11.3.3",
|
||||||
"@octokit/graphql-schema": "^15.25.0",
|
"@octokit/plugin-rest-endpoint-methods": "^13.2.4",
|
||||||
"@octokit/plugin-paginate-rest": "^5.0.1",
|
"@octokit/plugin-throttling": "^9.3.1",
|
||||||
"@octokit/plugin-rest-endpoint-methods": "^6.8.1",
|
"p-limit": "^6.1.0",
|
||||||
"proxy-from-env": "^1.1.0",
|
"proxy-from-env": "^1.1.0",
|
||||||
"undici": "^6.19.4",
|
"undici": "^6.19.7",
|
||||||
"uuid": "^9.0.1"
|
"uuid": "^9.0.1"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@types/jest": "^29.5.12",
|
"@types/jest": "^29.5.12",
|
||||||
"@types/node": "^18.19.42",
|
"@types/node": "^18.19.44",
|
||||||
"@typescript-eslint/eslint-plugin": "^7.17.0",
|
"@typescript-eslint/eslint-plugin": "^7.17.0",
|
||||||
"@typescript-eslint/parser": "^7.17.0",
|
"@typescript-eslint/parser": "^7.17.0",
|
||||||
"@vercel/ncc": "^0.38.1",
|
"@vercel/ncc": "^0.38.1",
|
||||||
@@ -57,7 +57,7 @@
|
|||||||
"jest-environment-jsdom": "^29.7.0",
|
"jest-environment-jsdom": "^29.7.0",
|
||||||
"js-yaml": "^4.1.0",
|
"js-yaml": "^4.1.0",
|
||||||
"prettier": "^3.3.3",
|
"prettier": "^3.3.3",
|
||||||
"ts-jest": "^29.2.3",
|
"ts-jest": "^29.2.4",
|
||||||
"typescript": "^5.5.4"
|
"typescript": "^5.5.4"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1,7 +1,6 @@
|
|||||||
import * as core from '@actions/core'
|
import * as core from '@actions/core'
|
||||||
import {GitCommandManager} from './git-command-manager'
|
import {GitCommandManager, Commit} from './git-command-manager'
|
||||||
import {v4 as uuidv4} from 'uuid'
|
import {v4 as uuidv4} from 'uuid'
|
||||||
import * as utils from './utils'
|
|
||||||
|
|
||||||
const CHERRYPICK_EMPTY =
|
const CHERRYPICK_EMPTY =
|
||||||
'The previous cherry-pick is now empty, possibly due to conflict resolution.'
|
'The previous cherry-pick is now empty, possibly due to conflict resolution.'
|
||||||
@@ -48,36 +47,22 @@ export async function tryFetch(
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function buildBranchFileChanges(
|
export async function buildBranchCommits(
|
||||||
git: GitCommandManager,
|
git: GitCommandManager,
|
||||||
base: string,
|
base: string,
|
||||||
branch: string
|
branch: string
|
||||||
): Promise<BranchFileChanges> {
|
): Promise<Commit[]> {
|
||||||
const branchFileChanges: BranchFileChanges = {
|
const output = await git.exec(['log', '--format=%H', `${base}..${branch}`])
|
||||||
additions: [],
|
const shas = output.stdout
|
||||||
deletions: []
|
.split('\n')
|
||||||
|
.filter(x => x !== '')
|
||||||
|
.reverse()
|
||||||
|
const commits: Commit[] = []
|
||||||
|
for (const sha of shas) {
|
||||||
|
const commit = await git.getCommit(sha)
|
||||||
|
commits.push(commit)
|
||||||
}
|
}
|
||||||
const changedFiles = await git.getChangedFiles([
|
return commits
|
||||||
'--diff-filter=AM',
|
|
||||||
`${base}..${branch}`
|
|
||||||
])
|
|
||||||
const deletedFiles = await git.getChangedFiles([
|
|
||||||
'--diff-filter=D',
|
|
||||||
`${base}..${branch}`
|
|
||||||
])
|
|
||||||
const repoPath = git.getWorkingDirectory()
|
|
||||||
for (const file of changedFiles) {
|
|
||||||
branchFileChanges.additions!.push({
|
|
||||||
path: file,
|
|
||||||
contents: utils.readFileBase64([repoPath, file])
|
|
||||||
})
|
|
||||||
}
|
|
||||||
for (const file of deletedFiles) {
|
|
||||||
branchFileChanges.deletions!.push({
|
|
||||||
path: file
|
|
||||||
})
|
|
||||||
}
|
|
||||||
return branchFileChanges
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return the number of commits that branch2 is ahead of branch1
|
// Return the number of commits that branch2 is ahead of branch1
|
||||||
@@ -143,22 +128,13 @@ function splitLines(multilineString: string): string[] {
|
|||||||
.filter(x => x !== '')
|
.filter(x => x !== '')
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface BranchFileChanges {
|
|
||||||
additions: {
|
|
||||||
path: string
|
|
||||||
contents: string
|
|
||||||
}[]
|
|
||||||
deletions: {
|
|
||||||
path: string
|
|
||||||
}[]
|
|
||||||
}
|
|
||||||
|
|
||||||
interface CreateOrUpdateBranchResult {
|
interface CreateOrUpdateBranchResult {
|
||||||
action: string
|
action: string
|
||||||
base: string
|
base: string
|
||||||
hasDiffWithBase: boolean
|
hasDiffWithBase: boolean
|
||||||
|
baseSha: string
|
||||||
headSha: string
|
headSha: string
|
||||||
branchFileChanges?: BranchFileChanges
|
branchCommits: Commit[]
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function createOrUpdateBranch(
|
export async function createOrUpdateBranch(
|
||||||
@@ -168,7 +144,8 @@ export async function createOrUpdateBranch(
|
|||||||
branch: string,
|
branch: string,
|
||||||
branchRemoteName: string,
|
branchRemoteName: string,
|
||||||
signoff: boolean,
|
signoff: boolean,
|
||||||
addPaths: string[]
|
addPaths: string[],
|
||||||
|
signCommits: boolean = false
|
||||||
): Promise<CreateOrUpdateBranchResult> {
|
): Promise<CreateOrUpdateBranchResult> {
|
||||||
// Get the working base.
|
// Get the working base.
|
||||||
// When a ref, it may or may not be the actual base.
|
// When a ref, it may or may not be the actual base.
|
||||||
@@ -188,7 +165,9 @@ export async function createOrUpdateBranch(
|
|||||||
action: 'none',
|
action: 'none',
|
||||||
base: base,
|
base: base,
|
||||||
hasDiffWithBase: false,
|
hasDiffWithBase: false,
|
||||||
headSha: ''
|
baseSha: '',
|
||||||
|
headSha: '',
|
||||||
|
branchCommits: []
|
||||||
}
|
}
|
||||||
|
|
||||||
// Save the working base changes to a temporary branch
|
// Save the working base changes to a temporary branch
|
||||||
@@ -333,11 +312,15 @@ export async function createOrUpdateBranch(
|
|||||||
result.hasDiffWithBase = await isAhead(git, base, branch)
|
result.hasDiffWithBase = await isAhead(git, base, branch)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Build the branch file changes
|
// Get the base and head SHAs
|
||||||
result.branchFileChanges = await buildBranchFileChanges(git, base, branch)
|
result.baseSha = await git.revParse(base)
|
||||||
|
result.headSha = await git.revParse(branch)
|
||||||
|
|
||||||
// Get the pull request branch SHA
|
// NOTE: This could always be built and returned. Maybe remove when there is confidence in buildBranchCommits.
|
||||||
result.headSha = await git.revParse('HEAD')
|
if (signCommits) {
|
||||||
|
// Build the branch commits
|
||||||
|
result.branchCommits = await buildBranchCommits(git, base, branch)
|
||||||
|
}
|
||||||
|
|
||||||
// Delete the temporary branch
|
// Delete the temporary branch
|
||||||
await git.exec(['branch', '--delete', '--force', tempBranch])
|
await git.exec(['branch', '--delete', '--force', tempBranch])
|
||||||
|
@@ -23,6 +23,7 @@ export interface Inputs {
|
|||||||
branchSuffix: string
|
branchSuffix: string
|
||||||
base: string
|
base: string
|
||||||
pushToFork: string
|
pushToFork: string
|
||||||
|
signCommits: boolean
|
||||||
title: string
|
title: string
|
||||||
body: string
|
body: string
|
||||||
bodyPath: string
|
bodyPath: string
|
||||||
@@ -32,7 +33,6 @@ export interface Inputs {
|
|||||||
teamReviewers: string[]
|
teamReviewers: string[]
|
||||||
milestone: number
|
milestone: number
|
||||||
draft: boolean
|
draft: boolean
|
||||||
signCommit: boolean
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function createPullRequest(inputs: Inputs): Promise<void> {
|
export async function createPullRequest(inputs: Inputs): Promise<void> {
|
||||||
@@ -184,7 +184,8 @@ export async function createPullRequest(inputs: Inputs): Promise<void> {
|
|||||||
inputs.branch,
|
inputs.branch,
|
||||||
branchRemoteName,
|
branchRemoteName,
|
||||||
inputs.signoff,
|
inputs.signoff,
|
||||||
inputs.addPaths
|
inputs.addPaths,
|
||||||
|
inputs.signCommits
|
||||||
)
|
)
|
||||||
// Set the base. It would have been '' if not specified as an input
|
// Set the base. It would have been '' if not specified as an input
|
||||||
inputs.base = result.base
|
inputs.base = result.base
|
||||||
@@ -195,14 +196,21 @@ export async function createPullRequest(inputs: Inputs): Promise<void> {
|
|||||||
core.startGroup(
|
core.startGroup(
|
||||||
`Pushing pull request branch to '${branchRemoteName}/${inputs.branch}'`
|
`Pushing pull request branch to '${branchRemoteName}/${inputs.branch}'`
|
||||||
)
|
)
|
||||||
if (inputs.signCommit) {
|
if (inputs.signCommits) {
|
||||||
await githubHelper.pushSignedCommit(
|
// Create signed commits via the GitHub API
|
||||||
|
const stashed = await git.stashPush(['--include-untracked'])
|
||||||
|
await git.checkout(inputs.branch)
|
||||||
|
await githubHelper.pushSignedCommits(
|
||||||
|
result.branchCommits,
|
||||||
|
result.baseSha,
|
||||||
|
repoPath,
|
||||||
branchRepository,
|
branchRepository,
|
||||||
inputs.branch,
|
inputs.branch
|
||||||
inputs.base,
|
|
||||||
inputs.commitMessage,
|
|
||||||
result.branchFileChanges
|
|
||||||
)
|
)
|
||||||
|
await git.checkout('-')
|
||||||
|
if (stashed) {
|
||||||
|
await git.stashPop()
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
await git.push([
|
await git.push([
|
||||||
'--force-with-lease',
|
'--force-with-lease',
|
||||||
|
@@ -5,6 +5,19 @@ import * as path from 'path'
|
|||||||
|
|
||||||
const tagsRefSpec = '+refs/tags/*:refs/tags/*'
|
const tagsRefSpec = '+refs/tags/*:refs/tags/*'
|
||||||
|
|
||||||
|
export type Commit = {
|
||||||
|
sha: string
|
||||||
|
tree: string
|
||||||
|
parents: string[]
|
||||||
|
subject: string
|
||||||
|
body: string
|
||||||
|
changes: {
|
||||||
|
mode: string
|
||||||
|
status: 'A' | 'M' | 'D'
|
||||||
|
path: string
|
||||||
|
}[]
|
||||||
|
}
|
||||||
|
|
||||||
export class GitCommandManager {
|
export class GitCommandManager {
|
||||||
private gitPath: string
|
private gitPath: string
|
||||||
private workingDirectory: string
|
private workingDirectory: string
|
||||||
@@ -138,6 +151,43 @@ export class GitCommandManager {
|
|||||||
await this.exec(args)
|
await this.exec(args)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
async getCommit(ref: string): Promise<Commit> {
|
||||||
|
const endOfBody = '###EOB###'
|
||||||
|
const output = await this.exec([
|
||||||
|
'show',
|
||||||
|
'--raw',
|
||||||
|
'--cc',
|
||||||
|
'--diff-filter=AMD',
|
||||||
|
`--format=%H%n%T%n%P%n%s%n%b%n${endOfBody}`,
|
||||||
|
ref
|
||||||
|
])
|
||||||
|
const lines = output.stdout.split('\n')
|
||||||
|
const endOfBodyIndex = lines.lastIndexOf(endOfBody)
|
||||||
|
const detailLines = lines.slice(0, endOfBodyIndex)
|
||||||
|
|
||||||
|
return <Commit>{
|
||||||
|
sha: detailLines[0],
|
||||||
|
tree: detailLines[1],
|
||||||
|
parents: detailLines[2].split(' '),
|
||||||
|
subject: detailLines[3],
|
||||||
|
body: detailLines.slice(4, endOfBodyIndex).join('\n'),
|
||||||
|
changes: lines.slice(endOfBodyIndex + 2, -1).map(line => {
|
||||||
|
const change = line.match(
|
||||||
|
/^:(\d{6}) (\d{6}) \w{7} \w{7} ([AMD])\s+(.*)$/
|
||||||
|
)
|
||||||
|
if (change) {
|
||||||
|
return {
|
||||||
|
mode: change[3] === 'D' ? change[1] : change[2],
|
||||||
|
status: change[3],
|
||||||
|
path: change[4]
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
throw new Error(`Unexpected line format: ${line}`)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
async getConfigValue(configKey: string, configValue = '.'): Promise<string> {
|
async getConfigValue(configKey: string, configValue = '.'): Promise<string> {
|
||||||
const output = await this.exec([
|
const output = await this.exec([
|
||||||
'config',
|
'config',
|
||||||
@@ -166,15 +216,6 @@ export class GitCommandManager {
|
|||||||
return output.exitCode === 1
|
return output.exitCode === 1
|
||||||
}
|
}
|
||||||
|
|
||||||
async getChangedFiles(options?: string[]): Promise<string[]> {
|
|
||||||
const args = ['diff', '--name-only']
|
|
||||||
if (options) {
|
|
||||||
args.push(...options)
|
|
||||||
}
|
|
||||||
const output = await this.exec(args)
|
|
||||||
return output.stdout.split('\n').filter(filename => filename != '')
|
|
||||||
}
|
|
||||||
|
|
||||||
async isDirty(untracked: boolean, pathspec?: string[]): Promise<boolean> {
|
async isDirty(untracked: boolean, pathspec?: string[]): Promise<boolean> {
|
||||||
const pathspecArgs = pathspec ? ['--', ...pathspec] : []
|
const pathspecArgs = pathspec ? ['--', ...pathspec] : []
|
||||||
// Check untracked changes
|
// Check untracked changes
|
||||||
|
@@ -1,18 +1,15 @@
|
|||||||
import * as core from '@actions/core'
|
import * as core from '@actions/core'
|
||||||
import {Inputs} from './create-pull-request'
|
import {Inputs} from './create-pull-request'
|
||||||
import {Octokit, OctokitOptions} from './octokit-client'
|
import {Commit} from './git-command-manager'
|
||||||
import type {
|
import {Octokit, OctokitOptions, throttleOptions} from './octokit-client'
|
||||||
Repository as TempRepository,
|
import pLimit from 'p-limit'
|
||||||
Ref,
|
|
||||||
Commit,
|
|
||||||
FileChanges
|
|
||||||
} from '@octokit/graphql-schema'
|
|
||||||
import {BranchFileChanges} from './create-or-update-branch'
|
|
||||||
import * as utils from './utils'
|
import * as utils from './utils'
|
||||||
|
|
||||||
const ERROR_PR_REVIEW_TOKEN_SCOPE =
|
const ERROR_PR_REVIEW_TOKEN_SCOPE =
|
||||||
'Validation Failed: "Could not resolve to a node with the global id of'
|
'Validation Failed: "Could not resolve to a node with the global id of'
|
||||||
|
|
||||||
|
const blobCreationLimit = pLimit(8)
|
||||||
|
|
||||||
interface Repository {
|
interface Repository {
|
||||||
owner: string
|
owner: string
|
||||||
repo: string
|
repo: string
|
||||||
@@ -24,6 +21,13 @@ interface Pull {
|
|||||||
created: boolean
|
created: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
|
type TreeObject = {
|
||||||
|
path: string
|
||||||
|
mode: '100644' | '100755' | '040000' | '160000' | '120000'
|
||||||
|
sha: string | null
|
||||||
|
type: 'blob'
|
||||||
|
}
|
||||||
|
|
||||||
export class GitHubHelper {
|
export class GitHubHelper {
|
||||||
private octokit: InstanceType<typeof Octokit>
|
private octokit: InstanceType<typeof Octokit>
|
||||||
|
|
||||||
@@ -37,6 +41,7 @@ export class GitHubHelper {
|
|||||||
} else {
|
} else {
|
||||||
options.baseUrl = 'https://api.github.com'
|
options.baseUrl = 'https://api.github.com'
|
||||||
}
|
}
|
||||||
|
options.throttle = throttleOptions
|
||||||
this.octokit = new Octokit(options)
|
this.octokit = new Octokit(options)
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -192,203 +197,113 @@ export class GitHubHelper {
|
|||||||
return pull
|
return pull
|
||||||
}
|
}
|
||||||
|
|
||||||
async pushSignedCommit(
|
async pushSignedCommits(
|
||||||
|
branchCommits: Commit[],
|
||||||
|
baseSha: string,
|
||||||
|
repoPath: string,
|
||||||
|
branchRepository: string,
|
||||||
|
branch: string
|
||||||
|
): Promise<void> {
|
||||||
|
let headSha = baseSha
|
||||||
|
for (const commit of branchCommits) {
|
||||||
|
headSha = await this.createCommit(
|
||||||
|
commit,
|
||||||
|
[headSha],
|
||||||
|
repoPath,
|
||||||
|
branchRepository
|
||||||
|
)
|
||||||
|
}
|
||||||
|
await this.createOrUpdateRef(branchRepository, branch, headSha)
|
||||||
|
}
|
||||||
|
|
||||||
|
private async createCommit(
|
||||||
|
commit: Commit,
|
||||||
|
parents: string[],
|
||||||
|
repoPath: string,
|
||||||
|
branchRepository: string
|
||||||
|
): Promise<string> {
|
||||||
|
const repository = this.parseRepository(branchRepository)
|
||||||
|
let treeSha = commit.tree
|
||||||
|
if (commit.changes.length > 0) {
|
||||||
|
core.info(`Creating tree objects for local commit ${commit.sha}`)
|
||||||
|
const treeObjects = await Promise.all(
|
||||||
|
commit.changes.map(async ({path, mode, status}) => {
|
||||||
|
let sha: string | null = null
|
||||||
|
if (status === 'A' || status === 'M') {
|
||||||
|
core.info(`Creating blob for file '${path}'`)
|
||||||
|
const {data: blob} = await blobCreationLimit(() =>
|
||||||
|
this.octokit.rest.git.createBlob({
|
||||||
|
...repository,
|
||||||
|
content: utils.readFileBase64([repoPath, path]),
|
||||||
|
encoding: 'base64'
|
||||||
|
})
|
||||||
|
)
|
||||||
|
sha = blob.sha
|
||||||
|
}
|
||||||
|
return <TreeObject>{
|
||||||
|
path,
|
||||||
|
mode,
|
||||||
|
sha,
|
||||||
|
type: 'blob'
|
||||||
|
}
|
||||||
|
})
|
||||||
|
)
|
||||||
|
core.info(`Creating tree for local commit ${commit.sha}`)
|
||||||
|
const {data: tree} = await this.octokit.rest.git.createTree({
|
||||||
|
...repository,
|
||||||
|
base_tree: parents[0],
|
||||||
|
tree: treeObjects
|
||||||
|
})
|
||||||
|
treeSha = tree.sha
|
||||||
|
core.info(`Created tree ${treeSha} for local commit ${commit.sha}`)
|
||||||
|
}
|
||||||
|
|
||||||
|
const {data: remoteCommit} = await this.octokit.rest.git.createCommit({
|
||||||
|
...repository,
|
||||||
|
parents: parents,
|
||||||
|
tree: treeSha,
|
||||||
|
message: `${commit.subject}\n\n${commit.body}`
|
||||||
|
})
|
||||||
|
core.info(
|
||||||
|
`Created commit ${remoteCommit.sha} for local commit ${commit.sha}`
|
||||||
|
)
|
||||||
|
core.info(
|
||||||
|
`Commit verified: ${remoteCommit.verification.verified}; reason: ${remoteCommit.verification.reason}`
|
||||||
|
)
|
||||||
|
return remoteCommit.sha
|
||||||
|
}
|
||||||
|
|
||||||
|
private async createOrUpdateRef(
|
||||||
branchRepository: string,
|
branchRepository: string,
|
||||||
branch: string,
|
branch: string,
|
||||||
base: string,
|
newHead: string
|
||||||
commitMessage: string,
|
|
||||||
branchFileChanges?: BranchFileChanges
|
|
||||||
): Promise<void> {
|
|
||||||
core.info(`Use API to push a signed commit`)
|
|
||||||
|
|
||||||
const [repoOwner, repoName] = branchRepository.split('/')
|
|
||||||
core.debug(`repoOwner: '${repoOwner}', repoName: '${repoName}'`)
|
|
||||||
const refQuery = `
|
|
||||||
query GetRefId($repoName: String!, $repoOwner: String!, $branchName: String!) {
|
|
||||||
repository(owner: $repoOwner, name: $repoName){
|
|
||||||
id
|
|
||||||
ref(qualifiedName: $branchName){
|
|
||||||
id
|
|
||||||
name
|
|
||||||
prefix
|
|
||||||
target{
|
|
||||||
id
|
|
||||||
oid
|
|
||||||
commitUrl
|
|
||||||
commitResourcePath
|
|
||||||
abbreviatedOid
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
}
|
|
||||||
`
|
|
||||||
|
|
||||||
let branchRef = await this.octokit.graphql<{repository: TempRepository}>(
|
|
||||||
refQuery,
|
|
||||||
{
|
|
||||||
repoOwner: repoOwner,
|
|
||||||
repoName: repoName,
|
|
||||||
branchName: branch
|
|
||||||
}
|
|
||||||
)
|
|
||||||
core.debug(
|
|
||||||
`Fetched information for branch '${branch}' - '${JSON.stringify(branchRef)}'`
|
|
||||||
)
|
|
||||||
|
|
||||||
const branchExists = branchRef.repository.ref != null
|
|
||||||
|
|
||||||
// if the branch does not exist, then first we need to create the branch from base
|
|
||||||
if (!branchExists) {
|
|
||||||
core.debug(`Branch does not exist - '${branch}'`)
|
|
||||||
branchRef = await this.octokit.graphql<{repository: TempRepository}>(
|
|
||||||
refQuery,
|
|
||||||
{
|
|
||||||
repoOwner: repoOwner,
|
|
||||||
repoName: repoName,
|
|
||||||
branchName: base
|
|
||||||
}
|
|
||||||
)
|
|
||||||
core.debug(
|
|
||||||
`Fetched information for base branch '${base}' - '${JSON.stringify(branchRef)}'`
|
|
||||||
)
|
|
||||||
|
|
||||||
core.info(
|
|
||||||
`Creating new branch '${branch}' from '${base}', with ref '${JSON.stringify(branchRef.repository.ref!.target!.oid)}'`
|
|
||||||
)
|
|
||||||
if (branchRef.repository.ref != null) {
|
|
||||||
core.debug(`Send request for creating new branch`)
|
|
||||||
const newBranchMutation = `
|
|
||||||
mutation CreateNewBranch($branchName: String!, $oid: GitObjectID!, $repoId: ID!) {
|
|
||||||
createRef(input: {
|
|
||||||
name: $branchName,
|
|
||||||
oid: $oid,
|
|
||||||
repositoryId: $repoId
|
|
||||||
}) {
|
|
||||||
ref {
|
|
||||||
id
|
|
||||||
name
|
|
||||||
prefix
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`
|
|
||||||
const newBranch = await this.octokit.graphql<{createRef: {ref: Ref}}>(
|
|
||||||
newBranchMutation,
|
|
||||||
{
|
|
||||||
repoId: branchRef.repository.id,
|
|
||||||
oid: branchRef.repository.ref.target!.oid,
|
|
||||||
branchName: 'refs/heads/' + branch
|
|
||||||
}
|
|
||||||
)
|
|
||||||
core.debug(
|
|
||||||
`Created new branch '${branch}': '${JSON.stringify(newBranch.createRef.ref)}'`
|
|
||||||
)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
core.info(
|
|
||||||
`Hash ref of branch '${branch}' is '${JSON.stringify(branchRef.repository.ref!.target!.oid)}'`
|
|
||||||
)
|
|
||||||
|
|
||||||
const fileChanges = <FileChanges>{
|
|
||||||
additions: branchFileChanges!.additions,
|
|
||||||
deletions: branchFileChanges!.deletions
|
|
||||||
}
|
|
||||||
|
|
||||||
const pushCommitMutation = `
|
|
||||||
mutation PushCommit(
|
|
||||||
$repoNameWithOwner: String!,
|
|
||||||
$branchName: String!,
|
|
||||||
$headOid: GitObjectID!,
|
|
||||||
$commitMessage: String!,
|
|
||||||
$fileChanges: FileChanges
|
|
||||||
) {
|
) {
|
||||||
createCommitOnBranch(input: {
|
const repository = this.parseRepository(branchRepository)
|
||||||
branch: {
|
const branchExists = await this.octokit.rest.repos
|
||||||
repositoryNameWithOwner: $repoNameWithOwner,
|
.getBranch({
|
||||||
branchName: $branchName,
|
...repository,
|
||||||
}
|
branch: branch
|
||||||
fileChanges: $fileChanges
|
|
||||||
message: {
|
|
||||||
headline: $commitMessage
|
|
||||||
}
|
|
||||||
expectedHeadOid: $headOid
|
|
||||||
}){
|
|
||||||
clientMutationId
|
|
||||||
ref{
|
|
||||||
id
|
|
||||||
name
|
|
||||||
prefix
|
|
||||||
}
|
|
||||||
commit{
|
|
||||||
id
|
|
||||||
abbreviatedOid
|
|
||||||
oid
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
`
|
|
||||||
const pushCommitVars = {
|
|
||||||
branchName: branch,
|
|
||||||
repoNameWithOwner: repoOwner + '/' + repoName,
|
|
||||||
headOid: branchRef.repository.ref!.target!.oid,
|
|
||||||
commitMessage: commitMessage,
|
|
||||||
fileChanges: fileChanges
|
|
||||||
}
|
|
||||||
|
|
||||||
const pushCommitVarsWithoutContents = {
|
|
||||||
...pushCommitVars,
|
|
||||||
fileChanges: {
|
|
||||||
...pushCommitVars.fileChanges,
|
|
||||||
additions: pushCommitVars.fileChanges.additions?.map(addition => {
|
|
||||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
||||||
const {contents, ...rest} = addition
|
|
||||||
return rest
|
|
||||||
})
|
})
|
||||||
}
|
.then(
|
||||||
}
|
() => true,
|
||||||
|
() => false
|
||||||
core.debug(
|
|
||||||
`Push commit with payload: '${JSON.stringify(pushCommitVarsWithoutContents)}'`
|
|
||||||
)
|
|
||||||
|
|
||||||
const commit = await this.octokit.graphql<{
|
|
||||||
createCommitOnBranch: {ref: Ref; commit: Commit}
|
|
||||||
}>(pushCommitMutation, pushCommitVars)
|
|
||||||
|
|
||||||
core.debug(`Pushed commit - '${JSON.stringify(commit)}'`)
|
|
||||||
core.info(
|
|
||||||
`Pushed commit with hash - '${commit.createCommitOnBranch.commit.oid}' on branch - '${commit.createCommitOnBranch.ref.name}'`
|
|
||||||
)
|
)
|
||||||
|
|
||||||
if (branchExists) {
|
if (branchExists) {
|
||||||
// The branch existed so update the branch ref to point to the new commit
|
core.info(`Branch ${branch} exists; Updating ref`)
|
||||||
// This is the same behavior as force pushing the branch
|
await this.octokit.rest.git.updateRef({
|
||||||
core.info(
|
...repository,
|
||||||
`Updating branch '${branch}' to commit '${commit.createCommitOnBranch.commit.oid}'`
|
sha: newHead,
|
||||||
)
|
ref: `heads/${branch}`,
|
||||||
const updateBranchMutation = `
|
|
||||||
mutation UpdateBranch($branchId: ID!, $commitOid: GitObjectID!) {
|
|
||||||
updateRef(input: {
|
|
||||||
refId: $branchId,
|
|
||||||
oid: $commitOid,
|
|
||||||
force: true
|
force: true
|
||||||
}) {
|
})
|
||||||
ref {
|
} else {
|
||||||
id
|
core.info(`Branch ${branch} does not exist; Creating ref`)
|
||||||
name
|
await this.octokit.rest.git.createRef({
|
||||||
prefix
|
...repository,
|
||||||
}
|
sha: newHead,
|
||||||
}
|
ref: `refs/heads/${branch}`
|
||||||
}
|
})
|
||||||
`
|
|
||||||
const updatedBranch = await this.octokit.graphql<{updateRef: {ref: Ref}}>(
|
|
||||||
updateBranchMutation,
|
|
||||||
{
|
|
||||||
branchId: branchRef.repository.ref!.id,
|
|
||||||
commitOid: commit.createCommitOnBranch.commit.oid
|
|
||||||
}
|
|
||||||
)
|
|
||||||
core.debug(`Updated branch - '${JSON.stringify(updatedBranch)}'`)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -19,6 +19,7 @@ async function run(): Promise<void> {
|
|||||||
branchSuffix: core.getInput('branch-suffix'),
|
branchSuffix: core.getInput('branch-suffix'),
|
||||||
base: core.getInput('base'),
|
base: core.getInput('base'),
|
||||||
pushToFork: core.getInput('push-to-fork'),
|
pushToFork: core.getInput('push-to-fork'),
|
||||||
|
signCommits: core.getBooleanInput('sign-commits'),
|
||||||
title: core.getInput('title'),
|
title: core.getInput('title'),
|
||||||
body: core.getInput('body'),
|
body: core.getInput('body'),
|
||||||
bodyPath: core.getInput('body-path'),
|
bodyPath: core.getInput('body-path'),
|
||||||
@@ -27,8 +28,7 @@ async function run(): Promise<void> {
|
|||||||
reviewers: utils.getInputAsArray('reviewers'),
|
reviewers: utils.getInputAsArray('reviewers'),
|
||||||
teamReviewers: utils.getInputAsArray('team-reviewers'),
|
teamReviewers: utils.getInputAsArray('team-reviewers'),
|
||||||
milestone: Number(core.getInput('milestone')),
|
milestone: Number(core.getInput('milestone')),
|
||||||
draft: core.getBooleanInput('draft'),
|
draft: core.getBooleanInput('draft')
|
||||||
signCommit: core.getBooleanInput('sign-commit')
|
|
||||||
}
|
}
|
||||||
core.debug(`Inputs: ${inspect(inputs)}`)
|
core.debug(`Inputs: ${inspect(inputs)}`)
|
||||||
|
|
||||||
|
@@ -1,17 +1,37 @@
|
|||||||
import {Octokit as Core} from '@octokit/core'
|
import * as core from '@actions/core'
|
||||||
|
import {Octokit as OctokitCore} from '@octokit/core'
|
||||||
import {paginateRest} from '@octokit/plugin-paginate-rest'
|
import {paginateRest} from '@octokit/plugin-paginate-rest'
|
||||||
import {restEndpointMethods} from '@octokit/plugin-rest-endpoint-methods'
|
import {restEndpointMethods} from '@octokit/plugin-rest-endpoint-methods'
|
||||||
|
import {throttling} from '@octokit/plugin-throttling'
|
||||||
import {getProxyForUrl} from 'proxy-from-env'
|
import {getProxyForUrl} from 'proxy-from-env'
|
||||||
import {ProxyAgent, fetch as undiciFetch} from 'undici'
|
import {ProxyAgent, fetch as undiciFetch} from 'undici'
|
||||||
export {RestEndpointMethodTypes} from '@octokit/plugin-rest-endpoint-methods'
|
export {RestEndpointMethodTypes} from '@octokit/plugin-rest-endpoint-methods'
|
||||||
|
// eslint-disable-next-line import/no-unresolved
|
||||||
export {OctokitOptions} from '@octokit/core/dist-types/types'
|
export {OctokitOptions} from '@octokit/core/dist-types/types'
|
||||||
|
|
||||||
export const Octokit = Core.plugin(
|
export const Octokit = OctokitCore.plugin(
|
||||||
paginateRest,
|
paginateRest,
|
||||||
restEndpointMethods,
|
restEndpointMethods,
|
||||||
|
throttling,
|
||||||
autoProxyAgent
|
autoProxyAgent
|
||||||
)
|
)
|
||||||
|
|
||||||
|
export const throttleOptions = {
|
||||||
|
onRateLimit: (retryAfter, options, _, retryCount) => {
|
||||||
|
core.debug(`Hit rate limit for request ${options.method} ${options.url}`)
|
||||||
|
// Retries twice for a total of three attempts
|
||||||
|
if (retryCount < 2) {
|
||||||
|
core.debug(`Retrying after ${retryAfter} seconds!`)
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
onSecondaryRateLimit: (_, options) => {
|
||||||
|
core.warning(
|
||||||
|
`Hit secondary rate limit for request ${options.method} ${options.url}`
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
const proxyFetch =
|
const proxyFetch =
|
||||||
(proxyUrl: string): typeof undiciFetch =>
|
(proxyUrl: string): typeof undiciFetch =>
|
||||||
(url, opts) => {
|
(url, opts) => {
|
||||||
@@ -24,7 +44,7 @@ const proxyFetch =
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Octokit plugin to support the standard environment variables http_proxy, https_proxy and no_proxy
|
// Octokit plugin to support the standard environment variables http_proxy, https_proxy and no_proxy
|
||||||
function autoProxyAgent(octokit: Core) {
|
function autoProxyAgent(octokit: OctokitCore) {
|
||||||
octokit.hook.before('request', options => {
|
octokit.hook.before('request', options => {
|
||||||
const proxy = getProxyForUrl(options.baseUrl)
|
const proxy = getProxyForUrl(options.baseUrl)
|
||||||
if (proxy) {
|
if (proxy) {
|
||||||
|
Reference in New Issue
Block a user