Skip to content

Commit

Permalink
Merge pull request #59 from yasuking0304/development
Browse files Browse the repository at this point in the history
Version 3.4.1 based
  • Loading branch information
yasuking0304 authored Jun 6, 2024
2 parents 11432b3 + 1eb2461 commit 883ff0b
Show file tree
Hide file tree
Showing 89 changed files with 974 additions and 1,136 deletions.
12 changes: 2 additions & 10 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,5 @@ updates:
directory: /
schedule:
interval: weekly

- package-ecosystem: 'npm'
directory: '/'
open-pull-requests-limit: 5
schedule:
interval: 'weekly'
allow:
- dependency-name: 'electron-builder'
- dependency-name: 'electron-packager'
- dependency-name: 'electron-installer-*'
# Disable version updates and keep only security updates
open-pull-requests-limit: 0
44 changes: 34 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,40 @@ on:
tags:
- 'release-*.*.*-linux*'
pull_request:
branches:
- linux
- 'linux-release-*'
workflow_call:
inputs:
repository:
default: desktop/desktop
required: false
type: string
ref:
required: true
type: string
upload-artifacts:
default: false
required: false
type: boolean
environment:
type: string
required: true
sign:
type: boolean
default: true
required: false
secrets:
AZURE_CODE_SIGNING_TENANT_ID:
AZURE_CODE_SIGNING_CLIENT_ID:
AZURE_CODE_SIGNING_CLIENT_SECRET:
DESKTOP_OAUTH_CLIENT_ID:
DESKTOP_OAUTH_CLIENT_SECRET:
APPLE_ID:
APPLE_ID_PASSWORD:
APPLE_TEAM_ID:
APPLE_APPLICATION_CERT:
APPLE_APPLICATION_CERT_PASSWORD:

env:
NODE_VERSION: 20.11.1

jobs:
build:
Expand Down Expand Up @@ -45,13 +76,6 @@ jobs:
with:
node-version: ${{ matrix.node }}
cache: yarn

# This step can be removed as soon as official Windows arm64 builds are published:
# https://github.com/nodejs/build/issues/2450#issuecomment-705853342
- name: Get NodeJS node-gyp lib for Windows arm64
if: ${{ matrix.os == 'windows-2019' && matrix.arch == 'arm64' }}
run: .\script\download-nodejs-win-arm64.ps1 ${{ matrix.node }}

- name: Install and build dependencies
run: yarn
env:
Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.16.1
20.11.1
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v18.16.1
v20.11.1
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
python 3.9.5
nodejs 18.16.1
nodejs 20.11.1
4 changes: 2 additions & 2 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"productName": "GitHub Desktop",
"bundleID": "com.github.GitHubClient",
"companyName": "GitHub, Inc.",
"version": "3.3.18",
"version": "3.4.1",
"main": "./main.js",
"repository": {
"type": "git",
Expand Down Expand Up @@ -32,7 +32,7 @@
"desktop-trampoline": "desktop/desktop-trampoline#v0.9.8",
"dexie": "^3.2.2",
"dompurify": "^2.3.3",
"dugite": "^2.7.0",
"dugite": "3.0.0-rc3",
"electron-window-state": "^5.0.3",
"event-kit": "^2.0.0",
"focus-trap-react": "^8.1.0",
Expand Down
3 changes: 3 additions & 0 deletions app/src/lib/app-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,9 @@ export interface IAppState {
/** The currently applied appearance (aka theme) */
readonly currentTheme: ApplicableTheme

/** The selected tab size preference */
readonly selectedTabSize: number

/**
* A map keyed on a user account (GitHub.com or GitHub Enterprise)
* containing an object with repositories that the authenticated
Expand Down
14 changes: 7 additions & 7 deletions app/src/lib/ci-checks/ci-checks.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { Account } from '../../models/account'
import { GitHubRepository } from '../../models/github-repository'
import {
APICheckStatus,
API,
APICheckConclusion,
IAPIWorkflowJobStep,
APICheckStatus,
IAPIRefCheckRun,
IAPIRefStatusItem,
API,
IAPIWorkflowJobStep,
IAPIWorkflowJobs,
IAPIWorkflowRun,
} from '../api'
import { GitHubRepository } from '../../models/github-repository'
import { Account } from '../../models/account'
import { supportsRetrieveActionWorkflowByCheckSuiteId } from '../endpoint-capabilities'
import {
formatLongPreciseDuration,
Expand Down Expand Up @@ -286,7 +286,7 @@ export function isSuccess(check: IRefCheck) {
* We use the check suite id as a proxy for determining what's
* the "latest" of two check runs with the same name.
*/
export function getLatestCheckRunsByName(
export function getLatestCheckRunsById(
checkRuns: ReadonlyArray<IAPIRefCheckRun>
): ReadonlyArray<IAPIRefCheckRun> {
const latestCheckRunsByName = new Map<string, IAPIRefCheckRun>()
Expand All @@ -301,7 +301,7 @@ export function getLatestCheckRunsByName(
// feels hacky... but we don't have any other meta data on a check run that
// differieates these.
const nameAndHasPRs =
checkRun.name +
checkRun.id +
(checkRun.pull_requests.length > 0
? 'isPullRequestCheckRun'
: 'isPushCheckRun')
Expand Down
35 changes: 24 additions & 11 deletions app/src/lib/editors/launch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,8 @@ export async function launchExternalEditor(
): Promise<void> {
const editorPath = editor.path
const exists = await pathExists(editorPath)
const label = __DARWIN__ ? 'Settings' : 'Options'
if (!exists) {
const label = __DARWIN__
? t('common.settings', 'Settings')
: t('common.options', 'Options')
throw new ExternalEditorError(
t(
'launch.error.could-not-find-executable',
Expand All @@ -37,13 +35,28 @@ export async function launchExternalEditor(
detached: true,
}

if (editor.usesShell) {
spawn(`"${editorPath}"`, [`"${fullPath}"`], { ...opts, shell: true })
} else if (__DARWIN__) {
// In macOS we can use `open`, which will open the right executable file
// for us, we only need the path to the editor .app folder.
spawn('open', ['-a', editorPath, fullPath], opts)
} else {
spawn(editorPath, [fullPath], opts)
try {
if (editor.usesShell) {
spawn(`"${editorPath}"`, [`"${fullPath}"`], { ...opts, shell: true })
} else if (__DARWIN__) {
// In macOS we can use `open`, which will open the right executable file
// for us, we only need the path to the editor .app folder.
spawn('open', ['-a', editorPath, fullPath], opts)
} else {
spawn(editorPath, [fullPath], opts)
}
} catch (error) {
log.error(`Error while launching ${editor.editor}`, error)
if (error?.code === 'EACCES') {
throw new ExternalEditorError(
`GitHub Desktop doesn't have the proper permissions to start '${editor.editor}'. Please open ${label} and try another editor.`,
{ openPreferences: true }
)
} else {
throw new ExternalEditorError(
`Something went wrong while trying to start '${editor.editor}'. Please open ${label} and try another editor.`,
{ openPreferences: true }
)
}
}
}
40 changes: 34 additions & 6 deletions app/src/lib/editors/linux.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,33 @@ const editors: ILinuxExternalEditor[] = [
'/snap/bin/code',
'/usr/bin/code',
'/mnt/c/Program Files/Microsoft VS Code/bin/code',
'/var/lib/flatpak/app/com.visualstudio.code/current/active/export/bin/com.visualstudio.code',
'.local/share/flatpak/app/com.visualstudio.code/current/active/export/bin/com.visualstudio.code',
],
},
{
name: 'Visual Studio Code (Insiders)',
paths: ['/snap/bin/code-insiders', '/usr/bin/code-insiders'],
paths: [
'/snap/bin/code-insiders',
'/usr/bin/code-insiders',
'/var/lib/flatpak/app/com.visualstudio.code.insiders/current/active/export/bin/com.visualstudio.code.insiders',
'.local/share/flatpak/app/com.visualstudio.code.insiders/current/active/export/bin/com.visualstudio.code.insiders',
],
},
{
name: 'VSCodium',
paths: [
'/usr/bin/codium',
'/var/lib/flatpak/app/com.vscodium.codium',
'/var/lib/flatpak/app/com.vscodium.codium/current/active/export/bin/com.vscodium.codium',
'/usr/share/vscodium-bin/bin/codium',
'.local/share/flatpak/app/com.vscodium.codium/current/active/export/bin/com.vscodium.codium',
'/snap/bin/codium',
],
},
{
name: 'VSCodium (Insiders)',
paths: ['/usr/bin/codium-insiders'],
},
{
name: 'Sublime Text',
paths: ['/usr/bin/subl'],
Expand Down Expand Up @@ -101,10 +114,25 @@ const editors: ILinuxExternalEditor[] = [
name: 'IntelliJ IDEA',
paths: ['/snap/bin/idea', '.local/share/JetBrains/Toolbox/scripts/idea'],
},
{
name: 'IntelliJ IDEA Ultimate Edition',
paths: [
'/snap/bin/intellij-idea-ultimate',
'.local/share/JetBrains/Toolbox/scripts/intellij-idea-ultimate',
],
},
{
name: 'IntelliJ Goland',
paths: [
'/snap/bin/goland',
'.local/share/JetBrains/Toolbox/scripts/goland',
],
},
{
name: 'JetBrains PyCharm',
paths: [
'/snap/bin/pycharm',
'/snap/bin/pycharm-professional',
'.local/share/JetBrains/Toolbox/scripts/pycharm',
],
},
Expand Down Expand Up @@ -139,10 +167,6 @@ const editors: ILinuxExternalEditor[] = [
name: 'Notepadqq',
paths: ['/usr/bin/notepadqq'],
},
{
name: 'Geany',
paths: ['/usr/bin/geany'],
},
{
name: 'Mousepad',
paths: ['/usr/bin/mousepad'],
Expand All @@ -151,6 +175,10 @@ const editors: ILinuxExternalEditor[] = [
name: 'Pulsar',
paths: ['/usr/bin/pulsar'],
},
{
name: 'Pluma',
paths: ['/usr/bin/pluma'],
},
]

async function getAvailablePath(paths: string[]): Promise<string | null> {
Expand Down
4 changes: 2 additions & 2 deletions app/src/lib/feature-flag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export function enableUpdateFromEmulatedX64ToARM64(): boolean {

/** Should we allow resetting to a previous commit? */
export function enableResetToCommit(): boolean {
return enableBetaFeatures()
return true
}

/** Should we allow checking out a single commit? */
Expand Down Expand Up @@ -98,7 +98,7 @@ export const enableRepoRulesBeta = () => true

export const enableCommitDetailsHeaderExpansion = () => true

export const enableDiffCheckMarksAndLinkUnderlines = enableBetaFeatures
export const enableDiffCheckMarksAndLinkUnderlines = () => true

export const enableDiffCheckMarks = enableDiffCheckMarksAndLinkUnderlines
export const enableGroupDiffCheckmarks = enableDiffCheckMarksAndLinkUnderlines
Expand Down
Loading

0 comments on commit 883ff0b

Please sign in to comment.