File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -25,9 +25,14 @@ export class ReleaseTracker {
25
25
}
26
26
27
27
async fetchAllTags ( ) : Promise < string [ ] > {
28
- const response = await this . octokit . request (
29
- `GET /repos/${ this . config . repository } /git/ref/tags`
30
- )
28
+ const owner = this . config . repository . split ( '/' ) [ 0 ]
29
+ const repoName = this . config . repository . split ( '/' ) . slice ( 1 ) . join ( '/' )
30
+
31
+ const response = await this . octokit . rest . git . listMatchingRefs ( {
32
+ owner : owner ,
33
+ repo : repoName ,
34
+ ref : 'tags'
35
+ } )
31
36
32
37
const tags = ( response . data as { ref : string } [ ] ) . map ( tag =>
33
38
tag . ref . replace ( 'refs/tags/' , '' )
Original file line number Diff line number Diff line change @@ -58,6 +58,11 @@ export class LinearChangesetSdk {
58
58
59
59
const json = ( await response . json ( ) ) as GetProjectVersionsResponse
60
60
61
+ if ( ! json . releases ) {
62
+ core . info ( `No tags found` )
63
+ return [ ]
64
+ }
65
+
61
66
json . releases . forEach ( r => {
62
67
core . info ( `Found tag: ${ r . appName } ${ r . version } ` )
63
68
} )
You can’t perform that action at this time.
0 commit comments