Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update vendor and package dependencies #120

Merged
merged 1 commit into from Oct 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2,511 changes: 1,454 additions & 1,057 deletions dist/index.js

Large diffs are not rendered by default.

37,624 changes: 10,031 additions & 27,593 deletions package-lock.json

Large diffs are not rendered by default.

12 changes: 6 additions & 6 deletions package.json
Expand Up @@ -5,9 +5,9 @@
"description": "Rebase pull requests in a repository",
"main": "lib/main.js",
"scripts": {
"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",
"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",
"clean": "rm -rf node_modules package-lock.json",
"build-checkout": "npm run build --prefix src/vendor/checkout",
"build-checkout": "tsc -p src/vendor/checkout",
"build": "tsc && ncc build",
"format": "prettier --write '**/*.ts'",
"format-check": "prettier --check '**/*.ts'",
Expand All @@ -30,11 +30,11 @@
},
"homepage": "https://github.com/peter-evans/rebase",
"dependencies": {
"@actions/core": "^1.9.1",
"@actions/io": "^1.1.0",
"@octokit/graphql": "^4.6.2",
"@actions/core": "^1.10.0",
"@actions/io": "^1.1.2",
"@octokit/graphql": "^4.8.0",
"checkout": "file:src/vendor/checkout",
"uuid": "^8.3.2"
"uuid": "^9.0.0"
},
"devDependencies": {
"@types/jest": "^26.0.23",
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
Expand Up @@ -44,7 +44,7 @@ async function run(): Promise<void> {
process.env['INPUT_PATH'] = path
process.env['INPUT_FETCH-DEPTH'] = '0'
process.env['INPUT_PERSIST-CREDENTIALS'] = 'true'
const sourceSettings = inputHelper.getInputs()
const sourceSettings = await inputHelper.getInputs()
core.debug(`sourceSettings: ${inspect(sourceSettings)}`)
await gitSourceProvider.getSource(sourceSettings)

Expand Down
3 changes: 1 addition & 2 deletions src/pulls-helper.ts
@@ -1,11 +1,10 @@
import * as core from '@actions/core'
import {graphql} from '@octokit/graphql'
import {graphql as Graphql} from '@octokit/graphql/dist-types/types'
import * as OctokitTypes from '@octokit/types'
import {inspect} from 'util'

export class PullsHelper {
graphqlClient: Graphql
graphqlClient: typeof graphql

constructor(token: string) {
this.graphqlClient = graphql.defaults({
Expand Down
8 changes: 1 addition & 7 deletions src/vendor/checkout/.eslintrc.json
@@ -1,6 +1,6 @@
{
"plugins": ["jest", "@typescript-eslint"],
"extends": ["plugin:github/es6"],
"extends": ["plugin:github/recommended"],
"parser": "@typescript-eslint/parser",
"parserOptions": {
"ecmaVersion": 9,
Expand All @@ -16,13 +16,9 @@
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/array-type": "error",
"@typescript-eslint/await-thenable": "error",
"@typescript-eslint/ban-ts-ignore": "error",
"camelcase": "off",
"@typescript-eslint/camelcase": "error",
"@typescript-eslint/class-name-casing": "error",
"@typescript-eslint/explicit-function-return-type": ["error", {"allowExpressions": true}],
"@typescript-eslint/func-call-spacing": ["error", "never"],
"@typescript-eslint/generic-type-naming": ["error", "^[A-Z][A-Za-z]*$"],
"@typescript-eslint/no-array-constructor": "error",
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-explicit-any": "error",
Expand All @@ -33,15 +29,13 @@
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-non-null-assertion": "warn",
"@typescript-eslint/no-object-literal-type-assertion": "error",
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-unnecessary-type-assertion": "error",
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/no-var-requires": "error",
"@typescript-eslint/prefer-for-of": "warn",
"@typescript-eslint/prefer-function-type": "warn",
"@typescript-eslint/prefer-includes": "error",
"@typescript-eslint/prefer-interface": "error",
"@typescript-eslint/prefer-string-starts-ends-with": "error",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/require-array-sort-compare": "error",
Expand Down
51 changes: 51 additions & 0 deletions src/vendor/checkout/.github/workflows/check-dist.yml
@@ -0,0 +1,51 @@
# `dist/index.js` is a special file in Actions.
# When you reference an action with `uses:` in a workflow,
# `index.js` is the code that will run.
# For our project, we generate this file through a build process
# from other source files.
# We need to make sure the checked-in `index.js` actually matches what we expect it to be.
name: Check dist

on:
push:
branches:
- main
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
workflow_dispatch:

jobs:
check-dist:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.x

- name: Install dependencies
run: npm ci

- name: Rebuild the index.js file
run: npm run build

- name: Compare the expected and actual dist/ directories
run: |
if [ "$(git diff --ignore-space-at-eol dist/ | wc -l)" -gt "0" ]; then
echo "Detected uncommitted changes after build. See status below:"
git diff
exit 1
fi

# If dist/ was different than expected, upload the expected version as an artifact
- uses: actions/upload-artifact@v2
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
with:
name: dist
path: dist/
58 changes: 58 additions & 0 deletions src/vendor/checkout/.github/workflows/codeql-analysis.yml
@@ -0,0 +1,58 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL"

on:
push:
branches: [ main ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ main ]
schedule:
- cron: '28 9 * * 0'

jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
actions: read
contents: read
security-events: write

strategy:
fail-fast: false
matrix:
language: [ 'javascript' ]
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
# Learn more:
# 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

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Initialize CodeQL
uses: github/codeql-action/init@v1
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.
# queries: ./path/to/local/query, your-org/your-repo/queries@main

- run: npm ci
- run: npm run build
- run: rm -rf dist # We want code scanning to analyze lib instead (individual .js files)

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
8 changes: 1 addition & 7 deletions src/vendor/checkout/.github/workflows/licensed.yml
Expand Up @@ -11,10 +11,4 @@ jobs:
steps:
- uses: actions/checkout@v2
- run: npm ci
- name: Install licensed
run: |
cd $RUNNER_TEMP
curl -Lfs -o licensed.tar.gz https://github.com/github/licensed/releases/download/2.12.2/licensed-2.12.2-linux-x64.tar.gz
sudo tar -xzf licensed.tar.gz
sudo mv licensed /usr/local/bin/licensed
- run: licensed status
- run: npm run licensed-check
38 changes: 38 additions & 0 deletions src/vendor/checkout/.github/workflows/test.yml
Expand Up @@ -205,3 +205,41 @@ jobs:
path: basic
- name: Verify basic
run: __test__/verify-basic.sh --archive

test-git-container:
runs-on: ubuntu-latest
container: bitnami/git:latest
steps:
# Clone this repo
- name: Checkout
uses: actions/checkout@v3
with:
path: v3

# Basic checkout using git
- name: Checkout basic
uses: ./v3
with:
ref: test-data/v2/basic
- name: Verify basic
run: |
if [ ! -f "./basic-file.txt" ]; then
echo "Expected basic file does not exist"
exit 1
fi

# Verify .git folder
if [ ! -d "./.git" ]; then
echo "Expected ./.git folder to exist"
exit 1
fi

# Verify auth token
git config --global --add safe.directory "*"
git fetch --no-tags --depth=1 origin +refs/heads/main:refs/remotes/origin/main

# needed to make checkout post cleanup succeed
- name: Fix Checkout v3
uses: actions/checkout@v3
with:
path: v3
1 change: 1 addition & 0 deletions src/vendor/checkout/.gitignore
@@ -1,3 +1,4 @@
__test__/_temp
_temp/
lib/
node_modules/
32 changes: 11 additions & 21 deletions src/vendor/checkout/.licenses/npm/@actions/core.dep.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

32 changes: 32 additions & 0 deletions src/vendor/checkout/.licenses/npm/call-bind.dep.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 31 additions & 0 deletions src/vendor/checkout/.licenses/npm/function-bind.dep.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.