Skip to content

Commit

Permalink
merge upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieudutour committed Jul 26, 2019
2 parents 911eec9 + e71e497 commit b530338
Show file tree
Hide file tree
Showing 124 changed files with 2,546 additions and 1,538 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2
defaults: &defaults
working_directory: ~/kactus-io/kactus
macos:
xcode: '9.3.1'
xcode: '9.4.1'

jobs:
build:
Expand Down
6 changes: 4 additions & 2 deletions .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ plugins:
- react
- json

settings:
react:
version: '16.3'

extends:
- prettier
- prettier/react
Expand Down Expand Up @@ -36,8 +40,6 @@ rules:
# this rule now works but generates a lot of issues with the codebase
# '@typescript-eslint/member-ordering': error

'@typescript-eslint/type-annotation-spacing': error

# Babel
babel/no-invalid-this: error

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ If the issue involves a specific public repository, including the information ab
<!--
Attach your log file (You can simply drag your file here to insert it) to this issue. Please make sure the generated link to your log file is **below** this comment section otherwise it will not appear when you submit your issue.
macOS logs location: `~/Library/Application Support/Kactus/logs/*.kactus.production.log`
macOS logs accessible from the Help menu or location: `~/Library/Application Support/Kactus/logs/*.kactus.production.log`
The log files are organized by date, so see if anything was generated for today's date.
-->
9 changes: 9 additions & 0 deletions .github/ISSUE_TEMPLATE/problem-to-raise.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@ about: Surface a problem that you think should be solved

---

<!--
First and foremost, we’d like to thank you for taking the time to contribute to our project. Before submitting your issue, please follow these steps:
1. Familiarize yourself with our contributing guide:
* https://github.com/kactus-io/kactus/blob/development/.github/CONTRIBUTING.md#contributing-to-kactus
2. Make sure your issue isn’t a duplicate of another issue
3. If you have made it to this step, go ahead and fill out the template below
-->

**Please describe the problem you think should be solved**
A clear and concise description of what the problem is and who else might be impacted. Screenshots are encouraged.

Expand Down
2 changes: 1 addition & 1 deletion .github/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ requestInfoReplyComment: >
Thanks for understanding and meeting us halfway 😀
requestInfoLabelToAdd: more-information-needed
requestInfoLabelToAdd: more-info-needed

requestInfoOn:
pullRequest: false
Expand Down
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
8.12.0
10.16.0
5 changes: 2 additions & 3 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
"recommendations": [
"ms-vscode.vscode-typescript-tslint-plugin",
"msjsdiag.debugger-for-chrome",
"samverschueren.final-newline",
"DmitryDorofeev.empty-indent",
"esbenp.prettier-vscode"
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint"
]
}
12 changes: 11 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,15 @@
"prettier.trailingComma": "es5",
"editor.formatOnSave": true,
"prettier.ignorePath": ".prettierignore",
"tslint.ignoreDefinitionFiles": true
"tslint.ignoreDefinitionFiles": true,
"eslint.options": {
"configFile": ".eslintrc.yml",
"rulePaths": ["eslint-rules"]
},
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact"
]
}
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
<strong>A proper version control tool for designers</strong>
</div>


[![CircleCI](https://circleci.com/gh/kactus-io/kactus/tree/master.svg?style=svg)](https://circleci.com/gh/kactus-io/kactus/tree/master)
![Sketch.app](https://img.shields.io/badge/Sketch.app-43-brightgreen.svg)
[![license](https://img.shields.io/github/license/kactus-io/kactus.svg?style=flat-square)](https://github.com/kactus-io/kactus/blob/master/LICENSE)
Expand All @@ -17,11 +16,11 @@
Kactus is a tool to bring proper version control _(as in git)_ to designers _(only sketch users for now, but we need to start somewhere, right?)_.

This new tool is on the next level:

- it brings the entire git flow to sketch: branches, pull requests, team collaboration (you can work on the same file and automatically merge the changes), etc
- you can share pages across multiple sketch files
- you can publish pages on the internet and import them in another project _(soon)_!


![Kactus screenshot - macOS](https://user-images.githubusercontent.com/3254314/27239695-4615f8f2-52d2-11e7-99df-48867813a49c.png)

## :cactus: Where can I get it?
Expand Down
2 changes: 1 addition & 1 deletion app/.npmrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
runtime = electron
disturl = https://atom.io/download/electron
target = 3.1.6
target = 5.0.6
arch = x64
17 changes: 9 additions & 8 deletions app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"productName": "Kactus",
"bundleID": "io.kactus.KactusClient",
"companyName": "Kactus.io",
"version": "0.3.20",
"version": "0.3.21",
"main": "./main.js",
"repository": {
"type": "git",
Expand Down Expand Up @@ -31,7 +31,7 @@
"event-kit": "^2.0.0",
"file-uri-to-path": "0.0.2",
"file-url": "^2.0.2",
"fs-admin": "^0.3.0",
"fs-admin": "^0.3.1",
"fs-extra": "^6.0.0",
"fuzzaldrin-plus": "^0.6.0",
"kactus-cli": "^0.5.7",
Expand All @@ -52,7 +52,7 @@
"react-stripe-checkout": "^2.4.0",
"react-transition-group": "^1.2.0",
"react-virtualized": "^9.20.0",
"registry-js": "^1.0.7",
"registry-js": "^1.4.0",
"rimraf": "^2.6.1",
"semver": "^5.3.0",
"source-map-support": "^0.4.15",
Expand Down
120 changes: 120 additions & 0 deletions app/src/highlighter/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,126 @@ const extensionModes: ReadonlyArray<IModeDefinition> = [
'.jl': 'text/x-julia',
},
},
{
install: () => import('codemirror/mode/stex/stex'),
mappings: {
'.tex': 'text/x-stex',
},
},
{
install: () => import('codemirror/mode/sparql/sparql'),
mappings: {
'.rq': 'application/sparql-query',
},
},
{
install: () => import('codemirror/mode/stylus/stylus'),
mappings: {
'.styl': 'text/x-styl',
},
},
{
install: () => import('codemirror/mode/soy/soy'),
mappings: {
'.soy': 'text/x-soy',
},
},
{
install: () => import('codemirror/mode/smalltalk/smalltalk'),
mappings: {
'.st': 'text/x-stsrc',
},
},
{
install: () => import('codemirror/mode/slim/slim'),
mappings: {
'.slim': 'application/x-slim',
},
},
{
install: () => import('codemirror/mode/sieve/sieve'),
mappings: {
'.sieve': 'application/sieve',
},
},
{
install: () => import('codemirror/mode/scheme/scheme'),
mappings: {
'.ss': 'text/x-scheme',
'.sls': 'text/x-scheme',
'.scm': 'text/x-scheme',
},
},
{
install: () => import('codemirror/mode/rst/rst'),
mappings: {
'.rst': 'text/x-rst',
},
},
{
install: () => import('codemirror/mode/rpm/rpm'),
mappings: {
'.rpm': 'text/x-rpm-spec',
},
},
{
install: () => import('codemirror/mode/q/q'),
mappings: {
'.q': 'text/x-q',
},
},
{
install: () => import('codemirror/mode/puppet/puppet'),
mappings: {
'.pp': 'text/x-puppet',
},
},
{
install: () => import('codemirror/mode/pug/pug'),
mappings: {
'.pug': 'text/x-pug',
},
},
{
install: () => import('codemirror/mode/protobuf/protobuf'),
mappings: {
'.proto': 'text/x-protobuf',
},
},
{
install: () => import('codemirror/mode/properties/properties'),
mappings: {
'.properties': 'text/x-properties',
'.gitattributes': 'text/x-properties',
'.gitignore': 'text/x-properties',
'.editorconfig': 'text/x-properties',
'.ini': 'text/x-ini',
},
},
{
install: () => import('codemirror/mode/pig/pig'),
mappings: {
'.pig': 'text/x-pig',
},
},
{
install: () => import('codemirror/mode/asciiarmor/asciiarmor'),
mappings: {
'.pgp': 'application/pgp',
},
},
{
install: () => import('codemirror/mode/oz/oz'),
mappings: {
'.oz': 'text/x-oz',
},
},
{
install: () => import('codemirror/mode/pascal/pascal'),
mappings: {
'.pas': 'text/x-pascal',
},
},
]

/**
Expand Down
14 changes: 11 additions & 3 deletions app/src/lib/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -765,8 +765,16 @@ export class API {
name: string
): Promise<ReadonlyArray<IAPIBranch>> {
const path = `repos/${owner}/${name}/branches?protected=true`
const response = await this.request('GET', path)
return await parsedResponse<IAPIBranch[]>(response)
try {
const response = await this.request('GET', path)
return await parsedResponse<IAPIBranch[]>(response)
} catch (err) {
log.info(
`[fetchProtectedBranches] unable to list protected branches`,
err
)
return new Array<IAPIBranch>()
}
}

/**
Expand Down Expand Up @@ -1156,7 +1164,7 @@ export function getHTMLURL(endpoint: string): string {
// In the case of GitHub.com, the HTML site lives on the parent domain.
// E.g., https://api.github.com -> https://github.com
//
// Whereas with Enterprise, it lives on the same domain but without the
// Whereas with Enterprise Server, it lives on the same domain but without the
// API path:
// E.g., https://github.mycompany.com/api/v3 -> https://github.mycompany.com
//
Expand Down
15 changes: 14 additions & 1 deletion app/src/lib/app-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -266,10 +266,20 @@ export type AppMenuFoldout = {
openedWithAccessKey?: boolean
}

export type BranchFoldout = {
type: FoldoutType.Branch

/**
* A flag to indicate the user clicked the "switch branch" link when they
* saw the prompt about the current branch being protected.
*/
handleProtectedBranchWarning?: boolean
}

export type Foldout =
| { type: FoldoutType.Repository }
| { type: FoldoutType.Branch }
| { type: FoldoutType.AddMenu }
| BranchFoldout
| AppMenuFoldout

export enum RepositorySectionTab {
Expand Down Expand Up @@ -619,6 +629,9 @@ export interface IChangesState {
* for more information about the differences between the two.
*/
readonly selection: ChangesSelection

/** `true` if the GitHub API reports that the branch is protected */
readonly currentBranchProtected: boolean
}

/**
Expand Down
2 changes: 1 addition & 1 deletion app/src/lib/email.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export function lookupPreferredEmail(
*/
function isEmailPublic(email: IAPIEmail): boolean {
// If an email doesn't have a visibility setting it means it's coming from an
// older Enterprise server which doesn't have the concept of visiblity.
// older Enterprise Server which doesn't have the concept of visiblity.
return email.visibility === 'public' || !email.visibility
}

Expand Down
2 changes: 1 addition & 1 deletion app/src/lib/enterprise.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/**
* The oldest officially supported version of GitHub Enterprise.
* The oldest officially supported version of GitHub Enterprise Server.
* This information is used in user-facing text and shouldn't be
* considered a hard limit, i.e. older versions of GitHub Enterprise
* might (and probably do) work just fine but this should be a fairly
Expand Down
Loading

0 comments on commit b530338

Please sign in to comment.