Skip to content

Commit 0469427

Browse files
author
Lucas Bento
committed
Fix workflow not running correctly when there's no react-native specified
1 parent 057e7b3 commit 0469427

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

dist/index.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11336,14 +11336,13 @@ const getVersionFromIssueBody = (issueBody) => {
1133611336
continue;
1133711337
}
1133811338

11339-
const [rnInfoOutputWithVersion] =
11340-
rnInfoOutput.text.match(/react-native(.*)=>/);
11339+
const rnInfoRNPart = rnInfoOutput.text.match(/react-native(.*)=>/);
1134111340

11342-
if (!rnInfoOutputWithVersion) {
11341+
if (!rnInfoRNPart || rnInfoRNPart.length === 0) {
1134311342
continue;
1134411343
}
1134511344

11346-
const foundVersions = findVersions(rnInfoOutputWithVersion, {
11345+
const foundVersions = findVersions(rnInfoRNPart[0], {
1134711346
loose: true,
1134811347
});
1134911348

index.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,13 @@ const getVersionFromIssueBody = (issueBody) => {
4848
continue;
4949
}
5050

51-
const [rnInfoOutputWithVersion] =
52-
rnInfoOutput.text.match(/react-native(.*)=>/);
51+
const rnInfoRNPart = rnInfoOutput.text.match(/react-native(.*)=>/);
5352

54-
if (!rnInfoOutputWithVersion) {
53+
if (!rnInfoRNPart || rnInfoRNPart.length === 0) {
5554
continue;
5655
}
5756

58-
const foundVersions = findVersions(rnInfoOutputWithVersion, {
57+
const foundVersions = findVersions(rnInfoRNPart[0], {
5958
loose: true,
6059
});
6160

0 commit comments

Comments
 (0)