Skip to content

Commit fc04c9a

Browse files
authored
Merge pull request #20 from qt-creator/releases/v3.0
Add is_latest if publish is true
2 parents 50b1347 + 70b5fdd commit fc04c9a

File tree

3 files changed

+7
-9
lines changed

3 files changed

+7
-9
lines changed

dist/index.js

Lines changed: 3 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/extensionstore.ts

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ function createPluginRequest(
5555
display_name: pluginMetaData.Name,
5656
license: 'open-source',
5757
status: publish ? 'published' : 'unpublished',
58+
is_latest: publish,
5859
tags: pluginMetaData.Tags,
5960
plugin: {
6061
metadata: pluginMetaData,
@@ -105,11 +106,6 @@ export async function createOrUpdateExtension(
105106
const pluginRequest = JSON.stringify(
106107
createPluginRequest(pluginMetaData, publish, downloadUrl)
107108
)
108-
109-
await request(
110-
'POST',
111-
`${apiUrl}api/v1/management/plugins`,
112-
apiToken,
113-
pluginRequest
114-
)
109+
const url = new URL('/api/v1/management/plugins', apiUrl)
110+
await request('POST', url.toString(), apiToken, pluginRequest)
115111
}

0 commit comments

Comments
 (0)