Skip to content

Commit fd1ebd6

Browse files
authored
Merge pull request #120 from peter-evans/update-deps
Update vendor and package dependencies
2 parents f48d826 + 6b88159 commit fd1ebd6

File tree

100 files changed

+62392
-68687
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

100 files changed

+62392
-68687
lines changed

dist/index.js

Lines changed: 1454 additions & 1057 deletions
Large diffs are not rendered by default.

package-lock.json

Lines changed: 10031 additions & 27593 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
"description": "Rebase pull requests in a repository",
66
"main": "lib/main.js",
77
"scripts": {
8-
"vendor": "rm -rf src/vendor/checkout && git clone --depth=1 --branch=v2.3.4 http://github.com/actions/checkout src/vendor/checkout && rm -rf src/vendor/checkout/.git",
8+
"vendor": "rm -rf src/vendor/checkout && git clone --depth=1 --branch=v2.5.0 http://github.com/actions/checkout src/vendor/checkout && rm -rf src/vendor/checkout/.git",
99
"clean": "rm -rf node_modules package-lock.json",
10-
"build-checkout": "npm run build --prefix src/vendor/checkout",
10+
"build-checkout": "tsc -p src/vendor/checkout",
1111
"build": "tsc && ncc build",
1212
"format": "prettier --write '**/*.ts'",
1313
"format-check": "prettier --check '**/*.ts'",
@@ -30,11 +30,11 @@
3030
},
3131
"homepage": "https://github.com/peter-evans/rebase",
3232
"dependencies": {
33-
"@actions/core": "^1.9.1",
34-
"@actions/io": "^1.1.0",
35-
"@octokit/graphql": "^4.6.2",
33+
"@actions/core": "^1.10.0",
34+
"@actions/io": "^1.1.2",
35+
"@octokit/graphql": "^4.8.0",
3636
"checkout": "file:src/vendor/checkout",
37-
"uuid": "^8.3.2"
37+
"uuid": "^9.0.0"
3838
},
3939
"devDependencies": {
4040
"@types/jest": "^26.0.23",

src/main.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ async function run(): Promise<void> {
4444
process.env['INPUT_PATH'] = path
4545
process.env['INPUT_FETCH-DEPTH'] = '0'
4646
process.env['INPUT_PERSIST-CREDENTIALS'] = 'true'
47-
const sourceSettings = inputHelper.getInputs()
47+
const sourceSettings = await inputHelper.getInputs()
4848
core.debug(`sourceSettings: ${inspect(sourceSettings)}`)
4949
await gitSourceProvider.getSource(sourceSettings)
5050

src/pulls-helper.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,10 @@
11
import * as core from '@actions/core'
22
import {graphql} from '@octokit/graphql'
3-
import {graphql as Graphql} from '@octokit/graphql/dist-types/types'
43
import * as OctokitTypes from '@octokit/types'
54
import {inspect} from 'util'
65

76
export class PullsHelper {
8-
graphqlClient: Graphql
7+
graphqlClient: typeof graphql
98

109
constructor(token: string) {
1110
this.graphqlClient = graphql.defaults({

src/vendor/checkout/.eslintrc.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"plugins": ["jest", "@typescript-eslint"],
3-
"extends": ["plugin:github/es6"],
3+
"extends": ["plugin:github/recommended"],
44
"parser": "@typescript-eslint/parser",
55
"parserOptions": {
66
"ecmaVersion": 9,
@@ -16,13 +16,9 @@
1616
"@typescript-eslint/no-require-imports": "error",
1717
"@typescript-eslint/array-type": "error",
1818
"@typescript-eslint/await-thenable": "error",
19-
"@typescript-eslint/ban-ts-ignore": "error",
2019
"camelcase": "off",
21-
"@typescript-eslint/camelcase": "error",
22-
"@typescript-eslint/class-name-casing": "error",
2320
"@typescript-eslint/explicit-function-return-type": ["error", {"allowExpressions": true}],
2421
"@typescript-eslint/func-call-spacing": ["error", "never"],
25-
"@typescript-eslint/generic-type-naming": ["error", "^[A-Z][A-Za-z]*$"],
2622
"@typescript-eslint/no-array-constructor": "error",
2723
"@typescript-eslint/no-empty-interface": "error",
2824
"@typescript-eslint/no-explicit-any": "error",
@@ -33,15 +29,13 @@
3329
"@typescript-eslint/no-misused-new": "error",
3430
"@typescript-eslint/no-namespace": "error",
3531
"@typescript-eslint/no-non-null-assertion": "warn",
36-
"@typescript-eslint/no-object-literal-type-assertion": "error",
3732
"@typescript-eslint/no-unnecessary-qualifier": "error",
3833
"@typescript-eslint/no-unnecessary-type-assertion": "error",
3934
"@typescript-eslint/no-useless-constructor": "error",
4035
"@typescript-eslint/no-var-requires": "error",
4136
"@typescript-eslint/prefer-for-of": "warn",
4237
"@typescript-eslint/prefer-function-type": "warn",
4338
"@typescript-eslint/prefer-includes": "error",
44-
"@typescript-eslint/prefer-interface": "error",
4539
"@typescript-eslint/prefer-string-starts-ends-with": "error",
4640
"@typescript-eslint/promise-function-async": "error",
4741
"@typescript-eslint/require-array-sort-compare": "error",
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# `dist/index.js` is a special file in Actions.
2+
# When you reference an action with `uses:` in a workflow,
3+
# `index.js` is the code that will run.
4+
# For our project, we generate this file through a build process
5+
# from other source files.
6+
# We need to make sure the checked-in `index.js` actually matches what we expect it to be.
7+
name: Check dist
8+
9+
on:
10+
push:
11+
branches:
12+
- main
13+
paths-ignore:
14+
- '**.md'
15+
pull_request:
16+
paths-ignore:
17+
- '**.md'
18+
workflow_dispatch:
19+
20+
jobs:
21+
check-dist:
22+
runs-on: ubuntu-latest
23+
24+
steps:
25+
- uses: actions/checkout@v2
26+
27+
- name: Set Node.js 12.x
28+
uses: actions/setup-node@v1
29+
with:
30+
node-version: 12.x
31+
32+
- name: Install dependencies
33+
run: npm ci
34+
35+
- name: Rebuild the index.js file
36+
run: npm run build
37+
38+
- name: Compare the expected and actual dist/ directories
39+
run: |
40+
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
41+
echo "Detected uncommitted changes after build. See status below:"
42+
git diff
43+
exit 1
44+
fi
45+
46+
# If dist/ was different than expected, upload the expected version as an artifact
47+
- uses: actions/upload-artifact@v2
48+
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
49+
with:
50+
name: dist
51+
path: dist/
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
# For most projects, this workflow file will not need changing; you simply need
2+
# to commit it to your repository.
3+
#
4+
# You may wish to alter this file to override the set of languages analyzed,
5+
# or to provide custom queries or build logic.
6+
#
7+
# ******** NOTE ********
8+
# We have attempted to detect the languages in your repository. Please check
9+
# the `language` matrix defined below to confirm you have the correct set of
10+
# supported CodeQL languages.
11+
#
12+
name: "CodeQL"
13+
14+
on:
15+
push:
16+
branches: [ main ]
17+
pull_request:
18+
# The branches below must be a subset of the branches above
19+
branches: [ main ]
20+
schedule:
21+
- cron: '28 9 * * 0'
22+
23+
jobs:
24+
analyze:
25+
name: Analyze
26+
runs-on: ubuntu-latest
27+
permissions:
28+
actions: read
29+
contents: read
30+
security-events: write
31+
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
language: [ 'javascript' ]
36+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
37+
# Learn more:
38+
# https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
39+
40+
steps:
41+
- name: Checkout repository
42+
uses: actions/checkout@v2
43+
44+
- name: Initialize CodeQL
45+
uses: github/codeql-action/init@v1
46+
with:
47+
languages: ${{ matrix.language }}
48+
# If you wish to specify custom queries, you can do so here or in a config file.
49+
# By default, queries listed here will override any specified in a config file.
50+
# Prefix the list here with "+" to use these queries and those in the config file.
51+
# queries: ./path/to/local/query, your-org/your-repo/queries@main
52+
53+
- run: npm ci
54+
- run: npm run build
55+
- run: rm -rf dist # We want code scanning to analyze lib instead (individual .js files)
56+
57+
- name: Perform CodeQL Analysis
58+
uses: github/codeql-action/analyze@v1

src/vendor/checkout/.github/workflows/licensed.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,4 @@ jobs:
1111
steps:
1212
- uses: actions/checkout@v2
1313
- run: npm ci
14-
- name: Install licensed
15-
run: |
16-
cd $RUNNER_TEMP
17-
curl -Lfs -o licensed.tar.gz https://github.com/github/licensed/releases/download/2.12.2/licensed-2.12.2-linux-x64.tar.gz
18-
sudo tar -xzf licensed.tar.gz
19-
sudo mv licensed /usr/local/bin/licensed
20-
- run: licensed status
14+
- run: npm run licensed-check

src/vendor/checkout/.github/workflows/test.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,3 +205,41 @@ jobs:
205205
path: basic
206206
- name: Verify basic
207207
run: __test__/verify-basic.sh --archive
208+
209+
test-git-container:
210+
runs-on: ubuntu-latest
211+
container: bitnami/git:latest
212+
steps:
213+
# Clone this repo
214+
- name: Checkout
215+
uses: actions/checkout@v3
216+
with:
217+
path: v3
218+
219+
# Basic checkout using git
220+
- name: Checkout basic
221+
uses: ./v3
222+
with:
223+
ref: test-data/v2/basic
224+
- name: Verify basic
225+
run: |
226+
if [ ! -f "./basic-file.txt" ]; then
227+
echo "Expected basic file does not exist"
228+
exit 1
229+
fi
230+
231+
# Verify .git folder
232+
if [ ! -d "./.git" ]; then
233+
echo "Expected ./.git folder to exist"
234+
exit 1
235+
fi
236+
237+
# Verify auth token
238+
git config --global --add safe.directory "*"
239+
git fetch --no-tags --depth=1 origin +refs/heads/main:refs/remotes/origin/main
240+
241+
# needed to make checkout post cleanup succeed
242+
- name: Fix Checkout v3
243+
uses: actions/checkout@v3
244+
with:
245+
path: v3

src/vendor/checkout/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
__test__/_temp
2+
_temp/
23
lib/
34
node_modules/

src/vendor/checkout/.licenses/npm/@actions/core.dep.yml

Lines changed: 11 additions & 21 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/vendor/checkout/.licenses/npm/call-bind.dep.yml

Lines changed: 32 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/vendor/checkout/.licenses/npm/function-bind.dep.yml

Lines changed: 31 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)