Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Fix for Atom Issue #8794 Remove 'null' text from front-facing messages #57

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions lib/github-file.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,22 @@ class GitHubFile
# Public
validationErrors: ->
unless @repo
return ["No repository found for path: #{@filePath}."]
if @filePath
return ["No repository found for path: #{@filePath}"]
else
return ["No repository found for path"]

unless @gitUrl()
return ["No URL defined for remote: #{@remoteName()}"]
if @remoteName()
return ["No URL defined for remote filepath: #{@remoteName()}"]
else
return ["No URL defined for remote filepath"]

unless @githubRepoUrl()
return ["Remote URL is not hosted on GitHub: #{@gitUrl()}"]
if @gitUrl()
return ["Remote URL is not hosted on GitHub: #{@gitUrl()}"]
else
return ["Remote URL is not hosted on GitHub"]

[]

Expand Down
5 changes: 5 additions & 0 deletions marking.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
We changed the way that the validation errors returned so that if the filePath
was null, it would not show "null" on the user interface. We also changed some of
the wording of errors.
Implementation: 'validationErrors: ->' function
File: lib/github-file.coffee