Skip to content

Commit

Permalink
Merge branch 'development' into releases/3.0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiou87 authored Jun 13, 2022
2 parents 11fd584 + 501c29c commit 7975b5b
Show file tree
Hide file tree
Showing 66 changed files with 1,248 additions and 314 deletions.
16 changes: 0 additions & 16 deletions .github/no-response.yml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/workflows/no-response.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: No Response

# Both `issue_comment` and `scheduled` event types are required for this Action
# to work properly.
on:
issue_comment:
types: [created]
schedule:
# Schedule for five minutes after the hour, every hour
- cron: '5 * * * *'

permissions:
issues: write

jobs:
noResponse:
runs-on: ubuntu-latest
steps:
- uses: lee-dohm/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
closeComment: >
Thank you for your issue!
We haven’t gotten a response to our questions above. With only the
information that is currently in the issue, we don’t have enough
information to take action. We’re going to close this but don’t
hesitate to reach out if you have or find the answers we need. If
you answer our questions above, this issue will automatically
reopen.
daysUntilClose: 7
responseRequiredLabel: more-info-needed
2 changes: 1 addition & 1 deletion app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"deep-equal": "^1.0.1",
"desktop-notifications": "^0.2.2",
"desktop-trampoline": "desktop/desktop-trampoline#v0.9.8",
"dexie": "^2.0.0",
"dexie": "^3.2.2",
"dompurify": "^2.3.3",
"dugite": "^1.109.0",
"electron-window-state": "^5.0.3",
Expand Down
1 change: 1 addition & 0 deletions app/src/highlighter/globals.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ declare namespace CodeMirror {
interface StringStreamContext {
lines: string[]
line: number
lookAhead: (n: number) => string
}

/**
Expand Down
6 changes: 5 additions & 1 deletion app/src/highlighter/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -635,7 +635,11 @@ onmessage = async (ev: MessageEvent) => {
continue
}

const lineCtx = { lines, line: ix }
const lineCtx = {
lines,
line: ix,
lookAhead: (n: number) => lines[ix + n],
}
const lineStream = new StringStream(line, tabSize, lineCtx)

while (!lineStream.eol()) {
Expand Down
14 changes: 14 additions & 0 deletions app/src/lib/app-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,20 @@ export interface ICommitSelection {
/** The commits currently selected in the app */
readonly shas: ReadonlyArray<string>

/**
* Whether the a selection of commits are group of adjacent to each other.
* Example: Given these are indexes of sha's in history, 3, 4, 5, 6 is contiguous as
* opposed to 3, 5, 8.
*
* Technically order does not matter, but shas are stored in order.
*
* Contiguous selections can be diffed. Non-contiguous selections can be
* cherry-picked, reordered, or squashed.
*
* Assumed that a selections of zero or one commit are contiguous.
* */
readonly isContiguous: boolean

/** The changeset data associated with the selected commit */
readonly changesetData: IChangesetData

Expand Down
4 changes: 2 additions & 2 deletions app/src/lib/databases/base-database.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Dexie from 'dexie'
import Dexie, { Transaction } from 'dexie'

export abstract class BaseDatabase extends Dexie {
private schemaVersion: number | undefined
Expand All @@ -23,7 +23,7 @@ export abstract class BaseDatabase extends Dexie {
protected async conditionalVersion(
version: number,
schema: { [key: string]: string | null },
upgrade?: (t: Dexie.Transaction) => Promise<void>
upgrade?: (t: Transaction) => Promise<void>
) {
if (this.schemaVersion != null && this.schemaVersion < version) {
return
Expand Down
4 changes: 2 additions & 2 deletions app/src/lib/databases/issues-database.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Dexie from 'dexie'
import Dexie, { Transaction } from 'dexie'
import { BaseDatabase } from './base-database'

export interface IIssue {
Expand Down Expand Up @@ -37,7 +37,7 @@ export class IssuesDatabase extends BaseDatabase {
}
}

function clearIssues(transaction: Dexie.Transaction) {
function clearIssues(transaction: Transaction) {
// Clear deprecated localStorage keys, we compute the since parameter
// using the database now.
clearDeprecatedKeys()
Expand Down
8 changes: 4 additions & 4 deletions app/src/lib/databases/repositories-database.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import Dexie from 'dexie'
import Dexie, { Transaction } from 'dexie'
import { BaseDatabase } from './base-database'
import { WorkflowPreferences } from '../../models/workflow-preferences'
import { assertNonNullable } from '../fatal-error'
Expand Down Expand Up @@ -144,7 +144,7 @@ export class RepositoriesDatabase extends BaseDatabase {
/**
* Remove any duplicate GitHub repositories that have the same owner and name.
*/
function removeDuplicateGitHubRepositories(transaction: Dexie.Transaction) {
function removeDuplicateGitHubRepositories(transaction: Transaction) {
const table = transaction.table<IDatabaseGitHubRepository, number>(
'gitHubRepositories'
)
Expand All @@ -164,7 +164,7 @@ function removeDuplicateGitHubRepositories(transaction: Dexie.Transaction) {
})
}

async function ensureNoUndefinedParentID(tx: Dexie.Transaction) {
async function ensureNoUndefinedParentID(tx: Transaction) {
return tx
.table<IDatabaseGitHubRepository, number>('gitHubRepositories')
.toCollection()
Expand All @@ -185,7 +185,7 @@ async function ensureNoUndefinedParentID(tx: Dexie.Transaction) {
* (https://github.com/desktop/desktop/pull/1242). This scenario ought to be
* incredibly unlikely.
*/
async function createOwnerKey(tx: Dexie.Transaction) {
async function createOwnerKey(tx: Transaction) {
const ownersTable = tx.table<IDatabaseOwner, number>('owners')
const ghReposTable = tx.table<IDatabaseGitHubRepository, number>(
'gitHubRepositories'
Expand Down
4 changes: 4 additions & 0 deletions app/src/lib/editors/darwin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ const editors: IDarwinExternalEditor[] = [
name: 'Atom',
bundleIdentifiers: ['com.github.atom'],
},
{
name: 'Aptana Studio',
bundleIdentifiers: ['aptana.studio'],
},
{
name: 'MacVim',
bundleIdentifiers: ['org.vim.MacVim'],
Expand Down
9 changes: 9 additions & 0 deletions app/src/lib/editors/win32.ts
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,15 @@ const editors: WindowsExternalEditor[] = [
displayNamePrefix: 'SlickEdit',
publisher: 'SlickEdit Inc.',
},
{
name: 'Aptana Studio 3',
registryKeys: [
Wow64LocalMachineUninstallKey('{2D6C1116-78C6-469C-9923-3E549218773F}'),
],
executableShimPaths: [['AptanaStudio3.exe']],
displayNamePrefix: 'Aptana Studio',
publisher: 'Appcelerator',
},
{
name: 'JetBrains Webstorm',
registryKeys: registryKeysForJetBrainsIDE('WebStorm'),
Expand Down
5 changes: 5 additions & 0 deletions app/src/lib/feature-flag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -172,3 +172,8 @@ export function enablePullRequestReviewNotifications(): boolean {
export function enableReRunFailedAndSingleCheckJobs(): boolean {
return true
}

/** Should we enable displaying multi commit diffs. This also switches diff logic from one commit */
export function enableMultiCommitDiffs(): boolean {
return enableDevelopmentFeatures()
}
2 changes: 1 addition & 1 deletion app/src/lib/git/diff-index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ function getNoRenameIndexStatus(status: string): NoRenameIndexStatus {
}

/** The SHA for the null tree. */
const NullTreeSHA = '4b825dc642cb6eb9a060e54bf8d69288fbee4904'
export const NullTreeSHA = '4b825dc642cb6eb9a060e54bf8d69288fbee4904'

/**
* Get a list of files which have recorded changes in the index as compared to
Expand Down
Loading

0 comments on commit 7975b5b

Please sign in to comment.