Skip to content

Commit

Permalink
Merge pull request #226 from CodinGame/stale-issues
Browse files Browse the repository at this point in the history
Mark old issues as stale
  • Loading branch information
CGNonofr authored Nov 8, 2023
2 parents 7afc32a + e09e563 commit 036aebb
Show file tree
Hide file tree
Showing 4 changed files with 37 additions and 8 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/stale_issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Close inactive issues
on:
schedule:
- cron: "30 1 * * *"

jobs:
close-issues:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v8
with:
days-before-issue-stale: 30
days-before-issue-close: 14
days-before-pr-stale: 30
days-before-pr-close: 14
stale-issue-label: "stale"
stale-pr-label: "stale"
stale-issue-message: "This issue is stale because it has been open for 30 days with no activity."
close-issue-message: "This issue was closed because it has been inactive for 14 days since being marked as stale."
stale-pr-message: "This PR is stale because it has been open for 30 days with no activity."
close-pr-message: "This PR was closed because it has been inactive for 14 days since being marked as stale."
repo-token: ${{ secrets.GITHUB_TOKEN }}
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -364,6 +364,10 @@ It includes:
From CLI run:

```bash
# build monaco-vscode-api (the demo use it as a local dependency)
npm ci
npm run build
# start demo
cd demo
npm ci
npm start
Expand All @@ -376,6 +380,8 @@ For the debug feature, also run:
npm run start:debugServer
```

⚠️ Building monaco-vscode-api is only supported on Linux or Mac. It you use Windows, have a look at [WSL](https://learn.microsoft.com/windows/wsl/install) ⚠️

#### Remote agent

To connect to a remote agent, run:
Expand Down
2 changes: 2 additions & 0 deletions rollup/rollup.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const PURE_FUNCTIONS = new Set([
'createProxyIdentifier',
'createDecorator',
'localize',
'localizeWithPath',
'Registry.as',
'Object.freeze',
'URI.parse',
Expand All @@ -45,6 +46,7 @@ const PURE_FUNCTIONS = new Set([
'ContextKeyExpr.or',
'ContextKeyExpr.equals',
'ContextKeyExpr.regex',
'ContextKeyExpr.false',
'ContextKeyNotExpr.create',
'ContextKeyDefinedExpr.create',
'notEqualsTo',
Expand Down
12 changes: 4 additions & 8 deletions src/service-override/layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ export class LayoutService implements ILayoutService, IWorkbenchLayoutService {
return viewContainerModel.activeViewDescriptors.length >= 1
}

setPartHidden (hidden: boolean, part: Exclude<Parts, Parts.STATUSBAR_PART | Parts.TITLEBAR_PART>): void {
setPartHidden (hidden: boolean, part: Parts): void {
if (hidden) {
this.hiddenParts.add(part)
} else {
Expand Down Expand Up @@ -226,14 +226,10 @@ export class LayoutService implements ILayoutService, IWorkbenchLayoutService {
void this.paneCompositeService.openPaneComposite(panelToOpen, location, true)
}
}

// The code that show or hide parts in vscode is not pulled by this library, so let's do it by hands here
// eslint-disable-next-line @typescript-eslint/no-explicit-any
if ((this.paneCompositeService as any).getPartByLocation != null) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
(this.paneCompositeService as any).getPartByLocation(location).setVisible(!hidden)
}
}

// The code that show or hide parts in vscode is not pulled by this library, so let's do it by hands here
this.getPart(part).setVisible(!hidden)
}

isVisible (part: Parts): boolean {
Expand Down

0 comments on commit 036aebb

Please sign in to comment.