Skip to content

Commit

Permalink
Merge pull request #2 from jaychang99/feature/openapi-diff
Browse files Browse the repository at this point in the history
Features for diffing openapi-compatible json specs.
  • Loading branch information
jaychang99 authored May 26, 2024
2 parents 4fbb4fd + 228414d commit 8007455
Show file tree
Hide file tree
Showing 25 changed files with 9,839 additions and 11 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ lib/
dist/
node_modules/
coverage/
openapi.json
83 changes: 83 additions & 0 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
env:
node: true
es6: true
jest: true

globals:
Atomics: readonly
SharedArrayBuffer: readonly

ignorePatterns:
- '!.*'
- '**/node_modules/.*'
- '**/dist/.*'
- '**/coverage/.*'
- '*.json'

parser: '@typescript-eslint/parser'

parserOptions:
ecmaVersion: 2023
sourceType: module
project:
- './.github/linters/tsconfig.json'
- './tsconfig.json'

plugins:
- jest
- '@typescript-eslint'

extends:
- eslint:recommended
- plugin:@typescript-eslint/eslint-recommended
- plugin:@typescript-eslint/recommended
- plugin:github/recommended
- plugin:jest/recommended

rules:
{
'camelcase': 'off',
'eslint-comments/no-use': 'off',
'eslint-comments/no-unused-disable': 'off',
'i18n-text/no-en': 'off',
'import/no-namespace': 'off',
'no-console': 'off',
'no-unused-vars': 'off',
'prettier/prettier': 'error',
'semi': 'off',
'@typescript-eslint/array-type': 'error',
'@typescript-eslint/await-thenable': 'error',
'@typescript-eslint/ban-ts-comment': 'error',
'@typescript-eslint/consistent-type-assertions': 'error',
'@typescript-eslint/explicit-member-accessibility':
['error', { 'accessibility': 'no-public' }],
'@typescript-eslint/explicit-function-return-type':
['error', { 'allowExpressions': true }],
'@typescript-eslint/func-call-spacing': ['error', 'never'],
'@typescript-eslint/no-array-constructor': 'error',
'@typescript-eslint/no-empty-interface': 'error',
'@typescript-eslint/no-explicit-any': 'error',
'@typescript-eslint/no-extraneous-class': 'error',
'@typescript-eslint/no-for-in-array': 'error',
'@typescript-eslint/no-inferrable-types': 'error',
'@typescript-eslint/no-misused-new': 'error',
'@typescript-eslint/no-namespace': 'error',
'@typescript-eslint/no-non-null-assertion': 'warn',
'@typescript-eslint/no-require-imports': 'error',
'@typescript-eslint/no-unnecessary-qualifier': 'error',
'@typescript-eslint/no-unnecessary-type-assertion': 'error',
'@typescript-eslint/no-unused-vars': '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-string-starts-ends-with': 'error',
'@typescript-eslint/promise-function-async': 'error',
'@typescript-eslint/require-array-sort-compare': 'error',
'@typescript-eslint/restrict-plus-operands': 'error',
'@typescript-eslint/semi': ['error', 'never'],
'@typescript-eslint/space-before-function-paren': 'off',
'@typescript-eslint/type-annotation-spacing': 'error',
'@typescript-eslint/unbound-method': 'error'
}
19 changes: 18 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,18 +47,35 @@ jobs:
test-action:
name: GitHub Actions Test
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
repository-projects: write

steps:
- name: Checkout
id: checkout
uses: actions/checkout@v4

- name: Test Local Action
- name: Test Local Action And Capture Output
id: test-action
uses: ./
with:
milliseconds: 2000

# echo outputs from test-action's stdout
- name: Echo Output
id: echo-output
run: echo "${{ steps.test-action.outputs.result }})"

- name: Post comment on PR
uses: peter-evans/create-or-update-comment@v4
with:
issue-number: ${{ github.event.pull_request.number }}

body: |
${{ steps.test-action.outputs.result }}
- name: Print Output
id: output
run: echo "${{ steps.test-action.outputs.time }}"
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -101,3 +101,5 @@ __tests__/runner/*
.idea
.vscode
*.code-workspace

.local/*
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
dist/
node_modules/
coverage/
openapi.json
2 changes: 1 addition & 1 deletion CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# Repository CODEOWNERS

* @actions/actions-oss-maintainers
* @jaychang99
2 changes: 2 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ inputs:
outputs:
time:
description: 'Your output description here'
result:
description: 'The result of the Typescript test'

runs:
using: node20
Expand Down
2 changes: 1 addition & 1 deletion badges/coverage.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
34 changes: 34 additions & 0 deletions debug/markdown-stylesheet.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
* {
all: revert;

table {
border-spacing: 0 !important;
border-collapse: collapse !important;
border-color: inherit !important;
display: block !important;
width: max-content !important;
max-width: 100% !important;
overflow: auto !important;
}

tbody,
td,
tfoot,
th,
thead,
tr {
border-color: inherit !important;
border-style: solid !important;
border-width: 1px !important;
/* fix width of column depending on the longest cell */
padding: 0.5em 1em !important;
border-spacing: 0 !important;
border-collapse: collapse !important;
}

th {
font-weight: bold !important;
color: black;
background-color: white;
}
}
Loading

0 comments on commit 8007455

Please sign in to comment.