Skip to content

Commit

Permalink
Merge pull request #285 from CodinGame/fix-release-changelog
Browse files Browse the repository at this point in the history
Make changelog manual (and minor fixes)
  • Loading branch information
CGNonofr authored Dec 6, 2023
2 parents 1bcdd57 + 5466a53 commit aba07d3
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 11 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
name: Release

on: workflow_dispatch
on:
workflow_dispatch:
inputs:
changes:
description: 'Changes in the releases'
required: true
type: string
env:
RELEASE_CHANGES: ${{ github.event.inputs.changes }}

permissions:
contents: write # to be able to publish a GitHub release
Expand Down
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -271,11 +271,8 @@ You will then be able to import it as if you were in a VSCode extension:

```typescript
import * as vscode from 'vscode'
import { initialize } from 'vscode/extensions'
import 'vscode/localExtensionHost'

await initialize()

const range = new vscode.Range(...)
vscode.languages.registerCompletionItemProvider(...)
```
Expand Down
6 changes: 3 additions & 3 deletions release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ async function getRepoInformations (): Promise<RepositoryInfos> {
}
}

async function generateReleaseNotes (repoInfos: RepositoryInfos, version: string, lastTag?: string) {
async function generateReleaseNotes (repoInfos: RepositoryInfos, changes: string, version: string, lastTag?: string) {
const tag = `v${version}`

const newCommits = (lastTag != null
Expand All @@ -110,7 +110,7 @@ async function generateReleaseNotes (repoInfos: RepositoryInfos, version: string

const releaseDetails = newCommits.map(({ hash, subj, short }) => `* ${subj} ([${short}](${repoInfos.publicUrl}/commit/${hash}))`).join('\n')

const releaseNotes = releaseDiffRef + '\n' + releaseDetails + '\n'
const releaseNotes = `${releaseDiffRef}\n${changes}\n### commits: ${releaseDetails}\n`

return releaseNotes
}
Expand Down Expand Up @@ -162,7 +162,7 @@ async function run () {
const repoInfos = await getRepoInformations()
const lastTag = await getLastTag()
const nextVersion = await getNextVersion(lastTag)
const releaseNotes = await generateReleaseNotes(repoInfos, nextVersion, lastTag)
const releaseNotes = await generateReleaseNotes(repoInfos, nextVersion, process.env.RELEASE_CHANGES ?? 'Unknown', lastTag)

await releaseGithub(repoInfos, nextVersion, releaseNotes)
await publishNpm(nextVersion)
Expand Down
6 changes: 4 additions & 2 deletions src/localExtensionHost.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import * as platform from 'vs/base/common/platform'
import { IMessagePassingProtocol } from 'vs/base/parts/ipc/common/ipc'
import { LocalProcessRunningLocation } from 'vs/workbench/services/extensions/common/extensionRunningLocation'
import { IExtHostExtensionService, IHostUtils } from 'vs/workbench/api/common/extHostExtensionService'
import { ExtensionHostExtensions, ExtensionHostStartup, IExtensionHost, nullExtensionDescription } from 'vs/workbench/services/extensions/common/extensions'
import { ExtensionHostExtensions, ExtensionHostStartup, IExtensionHost, IExtensionService, nullExtensionDescription } from 'vs/workbench/services/extensions/common/extensions'
import { IWebWorkerExtensionHostDataProvider } from 'vs/workbench/services/extensions/browser/webWorkerExtensionHost'
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry'
import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace'
Expand Down Expand Up @@ -240,6 +240,8 @@ async function createLocalApi (extensionId?: string): Promise<typeof vscode> {
setLocalExtensionHost(LocalExtensionHost)
registerLocalApiFactory(createLocalApi)

registerServiceInitializePostParticipant(async () => {
registerServiceInitializePostParticipant(async (accessor) => {
// Make sure the extension service is loaded
accessor.get(IExtensionService)
setDefaultApi(await createLocalApi())
})
6 changes: 4 additions & 2 deletions src/service-override/configuration.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { IEditorOverrideServices, StandaloneServices } from 'vs/editor/standalone/browser/standaloneServices'
import { WorkspaceService } from 'vs/workbench/services/configuration/browser/configurationService'
import { IConfigurationService } from 'vs/platform/configuration/common/configuration'
import { ITextResourceConfigurationService } from 'vs/editor/common/services/textResourceConfiguration'
import { ITextResourceConfigurationService, ITextResourcePropertiesService } from 'vs/editor/common/services/textResourceConfiguration'
import { TextResourceConfigurationService } from 'vs/editor/common/services/textResourceConfigurationService'
import { SyncDescriptor } from 'vs/platform/instantiation/common/descriptors'
import { ConfigurationScope } from 'vscode/src/vs/platform/configuration/common/configurationRegistry'
Expand Down Expand Up @@ -32,6 +32,7 @@ import { URI } from 'vs/base/common/uri'
import 'vs/workbench/api/common/configurationExtensionPoint'
import { IBrowserWorkbenchEnvironmentService } from 'vs/workbench/services/environment/browser/environmentService'
import { IDisposable } from 'vs/base/common/lifecycle'
import { TextResourcePropertiesService } from 'vs/workbench/services/textresourceProperties/common/textResourcePropertiesService'
import getFileServiceOverride, { initFile } from './files'
import { memoizedConstructor, unsupported } from '../tools'
import { registerServiceInitializePreParticipant } from '../lifecycle'
Expand Down Expand Up @@ -150,7 +151,8 @@ function getServiceOverride (defaultWorkspace?: URI | IAnyWorkspaceIdentifier):
[IWorkspaceContextService.toString()]: new SyncDescriptor(MemoizedInjectedConfigurationService, [], true),
[ITextResourceConfigurationService.toString()]: new SyncDescriptor(TextResourceConfigurationService, [], true),
[IWorkspaceEditingService.toString()]: new SyncDescriptor(MonacoWorkspaceEditingService, [], true),
[IWorkspacesService.toString()]: new SyncDescriptor(BrowserWorkspacesService, undefined, true)
[IWorkspacesService.toString()]: new SyncDescriptor(BrowserWorkspacesService, undefined, true),
[ITextResourcePropertiesService.toString()]: new SyncDescriptor(TextResourcePropertiesService, undefined, true)
}
}

Expand Down

0 comments on commit aba07d3

Please sign in to comment.