Skip to content

Commit edbec90

Browse files
authored
feat: update graphql-config to fix loading schema via url (#1005)
1 parent 3e821de commit edbec90

File tree

13 files changed

+289
-218
lines changed

13 files changed

+289
-218
lines changed

.changeset/tricky-pans-know.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@graphql-eslint/eslint-plugin': minor
3+
---
4+
5+
feat: update `graphql-config` to fix loading schema via url

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ about: Create a bug report to help us improve
44
---
55

66
**Describe the bug**
7+
78
<!-- A clear and concise description of what the bug is. -->
89

910
**To Reproduce**
@@ -12,6 +13,7 @@ Steps to reproduce the behavior:
1213
<!-- Adding a codesandbox can help us understand the bug better and speed up things -->
1314

1415
**Expected behavior**
16+
1517
<!-- A clear and concise description of what you expected to happen. -->
1618

1719
**Environment:**
@@ -21,4 +23,5 @@ Steps to reproduce the behavior:
2123
- NodeJS:
2224

2325
**Additional context**
26+
2427
<!-- Add any other context about the problem here. -->
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
---
22
name: Feature Request
33
about: Suggest an idea for the core of this project
4-
54
---
65

76
**Is your feature request related to a problem? Please describe.**
87

98
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
109

1110
**Describe the solution you'd like**
11+
1212
<!-- A clear and concise description of what you want to happen. -->
1313

1414
**Describe alternatives you've considered**
15+
1516
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
1617

1718
**Additional context**
19+
1820
<!-- Add any other context or screenshots about the feature request here. -->

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
🚨 **IMPORTANT: Please do not create a Pull Request without creating an issue first.**
22

3-
*Any change needs to be discussed before proceeding. Failure to do so may result in the rejection of the pull request.*
3+
_Any change needs to be discussed before proceeding. Failure to do so may result in the rejection of the pull request._
44

55
## Description
66

@@ -29,6 +29,7 @@ Please describe the tests that you ran to verify your changes. Provide instructi
2929
- [ ] Test B
3030

3131
**Test Environment**:
32+
3233
- OS:
3334
- `@graphql-eslint/...`:
3435
- NodeJS:

.github/labels.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
description: Something isn't working
33
name: bug
44
- color: e5c420
5-
description: ""
5+
description: ''
66
name: core
77
- color: 0366d6
88
description: Pull requests that update a dependency file
@@ -19,21 +19,21 @@
1919
- color: 7057ff
2020
description: Good for newcomers
2121
name: good first issue
22-
- color: "008672"
22+
- color: '008672'
2323
description: Extra attention is needed
2424
name: help wanted
2525
- color: e4e669
2626
description: This doesn't seem right
2727
name: invalid
2828
- color: 50e087
29-
description: ""
29+
description: ''
3030
name: new-rule
3131
- color: d876e3
3232
description: Further information is requested
3333
name: question
3434
- color: f78ff0
35-
description: ""
35+
description: ''
3636
name: waiting-for-release
3737
- color: ffffff
3838
description: This will not be worked on
39-
name: wontfix
39+
name: wontfix

.github/workflows/canary.yml

Lines changed: 42 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,68 +2,89 @@ name: Canary Release
22

33
on:
44
pull_request:
5-
branches:
6-
- master
5+
branches: [master]
76

87
jobs:
8+
changes:
9+
name: Check Changeset
10+
runs-on: ubuntu-latest
11+
outputs:
12+
# Set job outputs to value from filter step
13+
wasChangesetChanged: ${{steps.filter.outputs.changeset}}
14+
steps:
15+
- name: Check if changeset has been modified
16+
uses: dorny/paths-filter@v2
17+
id: filter
18+
with:
19+
filters: |
20+
changeset:
21+
- added|modified: .changeset/*.md
922
publish-canary:
1023
name: Publish Canary
1124
runs-on: ubuntu-latest
12-
if: github.event.pull_request.head.repo.full_name == github.repository
25+
needs: changes
26+
if: github.event.pull_request.head.repo.full_name == github.repository && needs.changes.outputs.wasChangesetChanged == 'true'
1327
steps:
1428
- name: Checkout Master
1529
uses: actions/checkout@v3
1630
with:
1731
fetch-depth: 0
32+
1833
- name: Use Node
1934
uses: actions/setup-node@v3
2035
with:
21-
node-version: '16.x'
36+
node-version: 16
37+
2238
- name: Configure Git Credentials
2339
run: |
2440
git config --global user.email "[email protected]"
2541
git config --global user.name "theguild-bot"
2642
echo "machine github.com login theguild-bot password ${{secrets.GH_API_TOKEN}}" > ~/.netrc
43+
2744
- name: Setup NPM credentials
2845
run: echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" >> ~/.npmrc
2946
env:
30-
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
47+
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
48+
3149
- name: Cache Yarn
3250
uses: actions/cache@v3
3351
with:
3452
path: '**/node_modules'
35-
key: ${{ runner.os }}-16-8-16-node-modules-${{ hashFiles('yarn.lock') }}
53+
key: ${{runner.os}}-16-8-16-node-modules-${{hashFiles('yarn.lock')}}
3654
restore-keys: |
37-
${{ runner.os }}-16-8-16-node-modules-${{ hashFiles('yarn.lock') }}
38-
${{ runner.os }}-16-8-16-node-modules-
39-
- name: Install Dependencies using Yarn
40-
run: yarn install && git checkout yarn.lock && yarn patch-package
55+
${{runner.os}}-16-8-16-node-modules-${{hashFiles('yarn.lock')}}
56+
${{runner.os}}-16-8-16-node-modules-
57+
58+
- name: Install Dependencies
59+
run: yarn
60+
4161
- name: Release Canary
4262
id: canary
4363
uses: 'kamilkisiela/release-canary@master'
4464
if: github.repository == 'B2o5T/graphql-eslint'
4565
with:
46-
npm-token: ${{ secrets.NODE_AUTH_TOKEN }}
66+
npm-token: ${{secrets.NODE_AUTH_TOKEN}}
4767
npm-script: 'yarn release:canary'
4868
changesets: true
69+
4970
- name: Publish a message
5071
if: steps.canary.outputs.released
5172
uses: 'kamilkisiela/pr-comment@master'
5273
with:
5374
message: |
5475
The latest changes of this PR are available as alpha in npm (based on the declared `changesets`):
5576
```
56-
${{ steps.canary.outputs.changesetsPublishedPackages}}
77+
${{steps.canary.outputs.changesetsPublishedPackages}}
5778
```
58-
bot-token: ${{ secrets.GH_API_TOKEN }}
59-
bot: 'theguild-bot'
60-
github-token: ${{ secrets.GITHUB_TOKEN }}
61-
- name: Publish a empty message
79+
bot-token: ${{secrets.GH_API_TOKEN}}
80+
bot: theguild-bot
81+
github-token: ${{secrets.GITHUB_TOKEN}}
82+
83+
- name: Publish an empty message
6284
if: steps.canary.outputs.released == 'false'
6385
uses: 'kamilkisiela/pr-comment@master'
6486
with:
65-
message: |
66-
The latest changes of this PR are not available as alpha, since there are no linked `changesets` for this PR.
67-
bot-token: ${{ secrets.GH_API_TOKEN }}
68-
bot: 'theguild-bot'
69-
github-token: ${{ secrets.GITHUB_TOKEN }}
87+
message: The latest changes of this PR are not available as alpha, since there are no linked `changesets` for this PR.
88+
bot-token: ${{secrets.GH_API_TOKEN}}
89+
bot: theguild-bot
90+
github-token: ${{secrets.GITHUB_TOKEN}}

.github/workflows/github.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
name: Sync labels
22
on:
33
push:
4-
branches:
5-
- master
6-
paths:
7-
- .github/labels.yml
4+
branches: [master]
5+
paths: [.github/labels.yml]
6+
87
jobs:
98
build:
109
runs-on: ubuntu-latest
1110
steps:
1211
- uses: actions/checkout@v3
1312
- uses: micnncim/action-label-syncer@v1
1413
env:
15-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
14+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
1615
with:
1716
manifest: .github/labels.yml
1817
prune: false

.github/workflows/release.yml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,43 +11,50 @@ jobs:
1111
uses: actions/checkout@v3
1212
with:
1313
fetch-depth: 0
14+
1415
- name: Configure Git Credentials
1516
run: |
1617
git config --global user.email "[email protected]"
1718
git config --global user.name "theguild-bot"
1819
echo "machine github.com login theguild-bot password ${{secrets.GH_API_TOKEN}}" > ~/.netrc
20+
1921
- name: Add origin remote and refetch master
2022
run: |
2123
git remote rm origin
2224
git remote add origin "https://github.com/${{github.repository}}"
2325
git fetch
2426
git checkout master
2527
git reset --hard
28+
2629
- name: Use Node
2730
uses: actions/setup-node@v3
2831
with:
29-
node-version: '16.x'
32+
node-version: 16
33+
3034
- name: Setup NPM credentials
3135
run: echo "//registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN" >> ~/.npmrc
3236
env:
33-
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
37+
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
38+
3439
- name: Cache Yarn
3540
uses: actions/cache@v3
3641
with:
3742
path: '**/node_modules'
38-
key: ${{ runner.os }}-16-8-16-node-modules-${{ hashFiles('yarn.lock') }}
43+
key: ${{runner.os}}-16-8-16-node-modules-${{hashFiles('yarn.lock')}}
3944
restore-keys: |
40-
${{ runner.os }}-16-8-16-node-modules-${{ hashFiles('yarn.lock') }}
41-
${{ runner.os }}-16-8-16-node-modules-
42-
- name: Install Dependencies using Yarn
43-
run: yarn install && git checkout yarn.lock && yarn patch-package
45+
${{runner.os}}-16-8-16-node-modules-${{hashFiles('yarn.lock')}}
46+
${{runner.os}}-16-8-16-node-modules-
47+
48+
- name: Install Dependencies
49+
run: yarn
50+
4451
- name: Create Release Pull Request or Publish to npm
4552
id: changesets
4653
uses: changesets/action@master
4754
with:
4855
publish: yarn release
4956
commit: 'chore(release): update monorepo packages versions'
50-
title: 'Upcoming Release Changes'
57+
title: Upcoming Release Changes
5158
env:
52-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
53-
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
59+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
60+
NPM_TOKEN: ${{secrets.NPM_TOKEN}}

0 commit comments

Comments
 (0)