Skip to content

Commit

Permalink
Merge branch 'master' into changelog-production-avoid-duplication
Browse files Browse the repository at this point in the history
  • Loading branch information
Brendan Forster committed Jul 30, 2018
2 parents 98ba69a + bdf2123 commit 2b5c55c
Show file tree
Hide file tree
Showing 8 changed files with 59 additions and 14 deletions.
2 changes: 2 additions & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
python 2.7
nodejs 8.11.2
2 changes: 1 addition & 1 deletion 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": "1.3.0-beta5",
"version": "1.3.0",
"main": "./main.js",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion app/src/lib/stores/git-store.ts
Original file line number Diff line number Diff line change
Expand Up @@ -722,7 +722,7 @@ export class GitStore extends BaseStore {
}

/**
* The commit message to use based on the contex of the repository, e.g., the
* The commit message to use based on the context of the repository, e.g., the
* message from a recently undone commit.
*/
public get contextualCommitMessage(): ICommitMessage | null {
Expand Down
2 changes: 1 addition & 1 deletion app/src/ui/changes/changes-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ interface IChangesListProps {
summary: string,
description: string | null,
trailers?: ReadonlyArray<ITrailer>
) => Promise<void>
) => Promise<boolean>
readonly onDiscardChanges: (file: WorkingDirectoryFileChange) => void
readonly askForConfirmationOnDiscardChanges: boolean
readonly onDiscardAllChanges: (
Expand Down
16 changes: 14 additions & 2 deletions app/src/ui/changes/commit-message.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ interface ICommitMessageProps {
summary: string,
description: string | null,
trailers?: ReadonlyArray<ITrailer>
) => Promise<void>
) => Promise<boolean>
readonly branch: string | null
readonly commitAuthor: CommitIdentity | null
readonly gitHubUser: IGitHubUser | null
Expand Down Expand Up @@ -216,6 +216,10 @@ export class CommitMessage extends React.Component<
}
}

private clearCommitMessage() {
this.setState({ summary: '', description: null })
}

private onSummaryChanged = (summary: string) => {
this.setState({ summary })
}
Expand Down Expand Up @@ -248,7 +252,15 @@ export class CommitMessage extends React.Component<

const trailers = this.getCoAuthorTrailers()

await this.props.onCreateCommit(summary, description, trailers)
const commitCreated = await this.props.onCreateCommit(
summary,
description,
trailers
)

if (commitCreated) {
this.clearCommitMessage()
}
}

private canCommit(): boolean {
Expand Down
10 changes: 3 additions & 7 deletions app/src/ui/changes/sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -112,21 +112,17 @@ export class ChangesSidebar extends React.Component<IChangesSidebarProps, {}> {
}
}

private onCreateCommit = async (
private onCreateCommit = (
summary: string,
description: string | null,
trailers?: ReadonlyArray<ITrailer>
): Promise<void> => {
const commitCreated = await this.props.dispatcher.commitIncludedChanges(
): Promise<boolean> => {
return this.props.dispatcher.commitIncludedChanges(
this.props.repository,
summary,
description,
trailers
)

if (commitCreated) {
this.props.dispatcher.setCommitMessage(this.props.repository, null)
}
}

private onFileSelectionChanged = (rows: ReadonlyArray<number>) => {
Expand Down
28 changes: 28 additions & 0 deletions changelog.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,33 @@
{
"releases": {
"1.3.0": [
"[New] Notification displayed in History tab when the base branch moves ahead of the current branch - #4768",
"[New] Repository list displays uncommitted changes count and ahead/behind information - #2259 #5095",
"[Added] Option to move repository to trash when removing from app - #2108. Thanks @say25!",
"[Added] Syntax highlighting for PowerShell files - #5081. Thanks @say25!",
"[Fixed] \"Discard Changes\" context menu discards correct file when entry is not part of selected group - #4788",
"[Fixed] Display local path of selected repository as tooltip - #4922. Thanks @yongdamsh!",
"[Fixed] Display root directory name when repository is located at drive root - #4924",
"[Fixed] Handle legacy macOS right click gesture - #4942",
"[Fixed] History omits latest commit from list - #5243",
"[Fixed] Markdown header elements hard to read in dark mode - #5133. Thanks @agisilaos!",
"[Fixed] Only perform ahead/behind comparisons when branch selector is open - #5142",
"[Fixed] Relax checks for merge commits for GitHub Enterprise repositories - #4329",
"[Fixed] Render clickable link in \"squash and merge\" commit message - #5203. Thanks @1pete!",
"[Fixed] Return key disabled when no matches found in Compare branch list - #4458",
"[Fixed] Selected commit not remembered when switching between History and Changes tabs - #4985",
"[Fixed] Selected commit when comparing is reset to latest when Desktop regains focus - #5069",
"[Fixed] Support default branch detection for non-GitHub repositories - #4937",
"[Improved] Change primary button color to blue for dark theme - #5074",
"[Improved] Diff gutter elements should be considered button elements when interacting - #5158",
"[Improved] Status parsing significantly more performant when handling thousands of changed files - #2449 #5186"
],
"1.3.0-beta7": [

],
"1.3.0-beta6": [

],
"1.3.0-beta5": [
"[Fixed] Ensure commit message is cleared after successful commit - #4046",
"[Fixed] History omits latest commit from list - #5243"
Expand Down
11 changes: 9 additions & 2 deletions docs/contributing/tooling.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,19 @@ Recommended packages:

* [atom-typescript](https://atom.io/packages/atom-typescript) - syntax
highlighting and intellisense for TypeScript
* [atom-build-npm-apm](https://atom.io/packages/build-npm-apm) - invoke
* [build-npm-apm](https://atom.io/packages/build-npm-apm) - invoke
all npm scripts straight from the editor by pressing F7 (requires
[atom-build](https://atom.io/packages/build))
[build](https://atom.io/packages/build))
* [linter](https://atom.io/packages/linter) and
[linter-tslint](https://atom.io/packages/linter-tslint) - shows linter errors and warning in the editor

You can install them all at once with:

```shellsession
apm i atom-typescript build-npm build busy-signal linter-tslint linter linter-ui-default intentions
```
If atom prompts you to install any additional dependencies for these packages, be sure to say yes.

### [Visual Studio Code](https://code.visualstudio.com/)

The Desktop repository includes a list of recommended extensions:
Expand Down

0 comments on commit 2b5c55c

Please sign in to comment.