Skip to content

Functionality to edit repo remote settings - #801

Merged
shiftkey merged 17 commits into
masterfrom
mo-da-luv
Jan 18, 2017
Merged

shiftkey merged 17 commits into
masterfrom
mo-da-luv

Conversation

@iAmWillShepherd

@iAmWillShepherd iAmWillShepherd commented Jan 14, 2017 •

Copy link
Copy Markdown
Contributor

This PR fixes number 1 in issue #663.

Adds new Repository Settings menu item and functionality to allow remote URL to be updated.

Current State of UI

Menu Item

repository settings

Remote Settings

remote

@joshaber joshaber changed the title Functionality to edit repo settings [WIP] Functionality to edit repo settings Jan 14, 2017
@haacked

haacked commented Jan 14, 2017

Copy link
Copy Markdown
Contributor

I see you're diving right into the thick of things! 😄 👍

@iAmWillShepherd iAmWillShepherd changed the title [WIP] Functionality to edit repo settings Functionality to edit repo settings Jan 17, 2017
@iAmWillShepherd iAmWillShepherd changed the title Functionality to edit repo settings Functionality to edit repo remote settings Jan 17, 2017
@iAmWillShepherd

Copy link
Copy Markdown
Contributor Author

This PR is ready for review.

@joshaber

Copy link
Copy Markdown
Contributor

@niik @shiftkey One of you guys should do the review since Will and I both worked on this.

@shiftkey shiftkey self-assigned this Jan 17, 2017

@shiftkey shiftkey left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good, was able to view and change the remote on my repository. Most of the stuff I've called out is for consistency with the rest of the codebase.

return this._refreshRepository(repository)
}

public _setRemoteURL(repository: Repository, name: string, url: string): Promise<void> {

This comment was marked as spam.

Comment thread app/src/lib/dispatcher/dispatcher.ts Outdated
return this.statsStore.reportStats()
}

/** Changes the URl for the remote that matches the given name */

This comment was marked as spam.

Comment thread app/src/lib/dispatcher/git-store.ts Outdated
return this.performFailableOperation(() => merge(this.repository, branch))
}

/** Changes the URl for the remote that matches the given name */

This comment was marked as spam.

Comment thread app/src/lib/git/remote.ts Outdated
const remotes = lines
.map(x => x.split(/\s+/))
.map(x => ({ name: x[0], url: x[1] }))
.filter((x, i) => i % 2 !== 0)

This comment was marked as spam.

This comment was marked as spam.

Comment thread app/src/models/remote.ts
@@ -0,0 +1,4 @@
export interface IRemote {
readonly name: string

This comment was marked as spam.

This comment was marked as spam.


interface IRepositorySettingsProps {
readonly dispatcher: Dispatcher

This comment was marked as spam.


interface IRemoteProps {
readonly dispatcher: Dispatcher

This comment was marked as spam.

Comment thread app/src/lib/git/remote.ts Outdated
await git([ 'remote', 'add', name, url ], path, 'addRemote')
}

/** Changes the URl for the remote that matches the given name */

This comment was marked as spam.

Comment thread app/src/lib/app-state.ts Outdated

/** The name of the remote. */
readonly remoteName: string | null
/** The remote. */

This comment was marked as spam.

public render() {
const remote = this.props.remote
if (!remote) {
return <div>Nope</div>

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@iAmWillShepherd

Copy link
Copy Markdown
Contributor Author

Made all requested changes 🥇

@shiftkey
shiftkey merged commit b79365c into master Jan 18, 2017
@shiftkey
shiftkey deleted the mo-da-luv branch January 18, 2017 17:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants