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

fix: update action #4

Merged
merged 11 commits into from
Aug 13, 2024
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"extends": ["eslint-config-unjs", "plugin:require-extensions/recommended"],
"plugins": ["require-extensions"],
"rules": {
"space-before-function-paren": 0,
"arrow-parens": 0,
"comma-dangle": 0,
"semi": 0,
"unicorn/prevent-abbreviations": 0,
"quotes": 0,
"keyword-spacing": 0,
"no-undef": 0,
"indent": 0,
"import/named": 0,
"unicorn/catch-error-name": 0,
"unicorn/no-null": 0,
"unicorn/no-useless-undefined": 0,
"unicorn/no-await-expression-member": 0,
"unicorn/no-array-push-push": 0,
"unicorn/filename-case": 0,
"@typescript-eslint/no-unused-vars": 0,
"@typescript-eslint/no-non-null-assertion": 0,
"unicorn/expiring-todo-comments": 0,
"no-unexpected-multiline": 0,
"no-useless-constructor": 0,
"unicorn/prefer-ternary": 0,
"unicorn/no-nested-ternary": 0,
},
}
4 changes: 2 additions & 2 deletions .github/cosmo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ subgraphs:
- name: 'employees'
schema: 'subgraphs/employees/schema.graphql'
routing_url: 'https://employees-api.fly.dev/graphql'

- name: 'family'
schema: 'subgraphs/family/schema.graphql'
routing_url: 'https://family-api.fly.dev/graphql'
Expand All @@ -20,4 +20,4 @@ subgraphs:

- name: 'hobbies'
schema: 'subgraphs/hobbies/schema.graphql'
routing_url: 'https://hobbies-api.fly.dev/graphql'
routing_url: 'https://hobbies-api.fly.dev/graphql'
26 changes: 0 additions & 26 deletions .github/dependabot.yml

This file was deleted.

13 changes: 5 additions & 8 deletions .github/linters/.eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ extends:
- plugin:github/recommended
- plugin:jest/recommended

rules:
{
rules: {
'camelcase': 'off',
'eslint-comments/no-use': 'off',
'eslint-comments/no-unused-disable': 'off',
Expand All @@ -44,15 +43,13 @@ rules:
'no-console': 'off',
'no-unused-vars': 'off',
'prettier/prettier': 'error',
'semi': 'off',
# '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/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',
Expand All @@ -79,5 +76,5 @@ rules:
'@typescript-eslint/semi': ['error', 'never'],
'@typescript-eslint/space-before-function-paren': 'off',
'@typescript-eslint/type-annotation-spacing': 'error',
'@typescript-eslint/unbound-method': 'error'
'@typescript-eslint/unbound-method': 'error',
}
72 changes: 0 additions & 72 deletions .github/workflows/check-dist.yml

This file was deleted.

18 changes: 11 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,20 @@ on:
- 'subgraphs/family/schema.graphql'
- 'subgraphs/products/schema.graphql'
- 'subgraphs/hobbies/schema.graphql'
types: [opened, synchronize, closed, reopened]
types:
- opened
- reopened
- closed
- synchronize

jobs:
create:
runs-on: ubuntu-latest
if: github.event.pull_request.opened == 'true' || github.event.pull_request.reopened == 'true'
if: github.event.action == 'opened' || github.event.action == 'reopened'
steps:
# 1. Create & Publish feature subgraph based on cosmo.yaml
# 2. Create a new feature flag
- uses: ./
- uses: ./action.yml
id: ff
with:
config_path: .github/cosmo.yaml
Expand All @@ -31,9 +35,9 @@ jobs:

update:
runs-on: ubuntu-latest
if: github.event.pull_request.synchronize == 'true'
if: github.event.action == 'synchronize'
steps:
- uses: ./
- uses: ./action.yml
with:
config_path: .github/cosmo.yaml
update: true # Only update the feature subgraphs from cosmo.yaml
Expand All @@ -43,9 +47,9 @@ jobs:

destroy:
runs-on: ubuntu-latest
if: github.event.pull_request.closed == 'true'
if: github.event.action == 'closed'
steps:
- uses: ./
- uses: ./action.yml
id: ff
with:
config_path: .github/cosmo.yaml
Expand Down
48 changes: 0 additions & 48 deletions .github/workflows/codeql-analysis.yml

This file was deleted.

50 changes: 0 additions & 50 deletions .github/workflows/linter.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.6.0
20.10.0
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
# cosmo-previews
# cosmo-previews
17 changes: 0 additions & 17 deletions __tests__/index.test.ts

This file was deleted.

Loading