Skip to content

Commit 2d56fe0

Browse files
committed
Allow PRs to be linked to sass/sass PRs
1 parent 4379462 commit 2d56fe0

File tree

4 files changed

+12
-66
lines changed

4 files changed

+12
-66
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,9 @@ jobs:
3636
- uses: dart-lang/setup-dart@v1
3737
with: {sdk: "${{ matrix.dart_channel }}"}
3838
- run: dart pub get
39-
- name: Set up sass-spec
40-
run: tool/github-action/check-out-sass-spec.sh
41-
env:
42-
PR_BRANCH: "${{ github.base_ref }}"
43-
CURRENT_REF: "${{ github.ref }}"
44-
PR_BODY: "${{ github.event.pull_request.body }}"
39+
- name: Check out sass-spec
40+
uses: sass/clone-linked-repo@v1
41+
with: {repo: sass/sass-spec}
4542
- uses: actions/setup-node@v2
4643
with: {node-version: "${{ env.DEFAULT_NODE_VERSION }}"}
4744
- run: npm install
@@ -86,11 +83,8 @@ jobs:
8683
- run: npm install
8784

8885
- name: Check out sass-spec
89-
run: tool/github-action/check-out-sass-spec.sh
90-
env:
91-
PR_BRANCH: "${{ github.base_ref }}"
92-
CURRENT_REF: "${{ github.ref }}"
93-
PR_BODY: "${{ github.event.pull_request.body }}"
86+
uses: sass/clone-linked-repo@v1
87+
with: {repo: sass/sass-spec}
9488

9589
- name: Build JS
9690
run: dart pub run grinder pkg-npm-dev
@@ -100,7 +94,10 @@ jobs:
10094
working-directory: sass-spec
10195

10296
- name: Check out Sass specification
103-
run: git clone https://github.com/sass/sass.git language --depth 1
97+
uses: sass/clone-linked-repo@v1
98+
with:
99+
repo: sass/sass
100+
path: language
104101

105102
- name: Run tests
106103
run: npm run js-api-spec -- --sassSassRepo ../language

lib/src/importer/node_to_dart/async_file.dart

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,7 @@ class NodeToDartAsyncFileImporter extends AsyncImporter {
4747
'"$url".'));
4848
}
4949

50-
var canonical = _filesystemImporter.canonicalize(resultUrl);
51-
if (canonical == null) return null;
52-
return canonical;
50+
return _filesystemImporter.canonicalize(resultUrl);
5351
}
5452

5553
ImporterResult? load(Uri url) => _filesystemImporter.load(url);

lib/src/importer/node_to_dart/file.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class NodeToDartFileImporter extends Importer {
3535

3636
if (isPromise(result)) {
3737
jsThrow(JsError(
38-
"The canonicalize() function can't return a Promise for synchronous "
38+
"The findFileUrl() function can't return a Promise for synchron "
3939
"compile functions."));
4040
} else if (!isJSUrl(result)) {
4141
jsThrow(JsError("The findFileUrl() method must return a URL."));
@@ -48,9 +48,7 @@ class NodeToDartFileImporter extends Importer {
4848
'"$url".'));
4949
}
5050

51-
var canonical = _filesystemImporter.canonicalize(resultUrl);
52-
if (canonical == null) return null;
53-
return canonical;
51+
return _filesystemImporter.canonicalize(resultUrl);
5452
}
5553

5654
ImporterResult? load(Uri url) => _filesystemImporter.load(url);

tool/github-action/check-out-sass-spec.sh

Lines changed: 0 additions & 47 deletions
This file was deleted.

0 commit comments

Comments
 (0)