Skip to content

Commit

Permalink
Merge branch 'develop' into mute-notifications
Browse files Browse the repository at this point in the history
# Conflicts:
#	HISTORY.md
#	packages/rocketchat-i18n/i18n/en.i18n.json
#	packages/rocketchat-ui-sidenav/client/channels.coffee
#	packages/rocketchat-ui-sidenav/client/chatRoomItem.coffee
#	packages/rocketchat-ui-sidenav/client/combined.coffee
#	packages/rocketchat-ui-sidenav/client/directMessages.coffee
#	packages/rocketchat-ui-sidenav/client/privateGroups.coffee
#	packages/rocketchat-ui-sidenav/client/starredRooms.coffee
#	packages/rocketchat-ui-sidenav/client/unreadRooms.coffee
  • Loading branch information
marceloschmidt committed Apr 17, 2017
2 parents 6dfab4a + 092534d commit e47a2eb
Show file tree
Hide file tree
Showing 883 changed files with 18,108 additions and 9,918 deletions.
4 changes: 3 additions & 1 deletion .docker/develop/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ VOLUME /app/uploads
WORKDIR /app/bundle

# needs a mongoinstance - defaults to container linking with alias 'mongo'
ENV MONGO_URL=mongodb://mongo:27017/rocketchat \
ENV DEPLOY_METHOD=docker \
NODE_ENV=production \
MONGO_URL=mongodb://mongo:27017/rocketchat \
MONGO_OPLOG_URL=mongodb://mongo:27017/local \
HOME=/tmp \
PORT=3000 \
Expand Down
4 changes: 3 additions & 1 deletion .docker/latest/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ VOLUME /app/uploads
WORKDIR /app/bundle

# needs a mongoinstance - defaults to container linking with alias 'mongo'
ENV MONGO_URL=mongodb://mongo:27017/rocketchat \
ENV DEPLOY_METHOD=docker \
NODE_ENV=production \
MONGO_URL=mongodb://mongo:27017/rocketchat \
HOME=/tmp \
PORT=3000 \
ROOT_URL=http://localhost:3000 \
Expand Down
37 changes: 37 additions & 0 deletions .docker/release-candidate/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
FROM rocketchat/base:4

ENV RC_VERSION release-candidate

MAINTAINER buildmaster@rocket.chat

RUN set -x \
&& curl -SLf "https://rocket.chat/releases/${RC_VERSION}/download" -o rocket.chat.tgz \
&& curl -SLf "https://rocket.chat/releases/${RC_VERSION}/asc" -o rocket.chat.tgz.asc \
&& mkdir /app \
&& gpg --verify rocket.chat.tgz.asc \
&& mkdir -p /app \
&& tar -zxf rocket.chat.tgz -C /app \
&& rm rocket.chat.tgz rocket.chat.tgz.asc \
&& cd /app/bundle/programs/server \
&& npm install \
&& npm cache clear \
&& chown -R rocketchat:rocketchat /app

USER rocketchat

VOLUME /app/uploads

WORKDIR /app/bundle

# needs a mongoinstance - defaults to container linking with alias 'mongo'
ENV DEPLOY_METHOD=docker \
NODE_ENV=production \
MONGO_URL=mongodb://mongo:27017/rocketchat \
HOME=/tmp \
PORT=3000 \
ROOT_URL=http://localhost:3000 \
Accounts_AvatarStorePath=/app/uploads

EXPOSE 3000

CMD ["node", "main.js"]
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ packages/rocketchat-favico/favico.js
packages/rocketchat-katex/client/katex/katex.min.js
packages/rocketchat-livechat/app/node_modules
packages/rocketchat-livechat/assets/rocketchat-livechat.min.js
packages/rocketchat-livechat/assets/rocket-livechat.js
packages/rocketchat-migrations/
packages/rocketchat-theme/client/minicolors/jquery.minicolors.js
packages/rocketchat-ui/client/lib/customEventPolyfill.js
Expand Down
14 changes: 11 additions & 3 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,9 @@
"vars": "all",
"args": "after-used"
}],
"no-void": 2,
"no-var": 2,
"one-var": [2, "never"],
"no-lonely-if": 2,
"no-trailing-spaces": 2,
"complexity": [1, 31],
Expand All @@ -69,14 +72,17 @@
"curly": [2, "all"],
"eqeqeq": [2, "allow-null"],
"new-cap": [2, {
"capIsNewExceptions": ["Match.Optional", "Match.Maybe", "Match.ObjectIncluding", "Push.Configure"]
"capIsNewExceptions": ["Match.Optional", "Match.Maybe", "Match.ObjectIncluding", "Push.Configure", "SHA256"]
}],
"use-isnan": 2,
"valid-typeof": 2,
"linebreak-style": [2, "unix"],
"prefer-template": 2,
"template-curly-spacing": [2, "always"],
"quotes": [2, "single"],
"semi": [2, "always"],
"prefer-const": 2
"prefer-const": 2,
"object-shorthand": 2
},
"globals": {
"_" : false,
Expand Down Expand Up @@ -143,6 +149,8 @@
"Triggers" : false,
"UAParser" : false,
"visitor" : false,
"WebApp" : false
"WebApp" : false,
"VideoRecorder" : false,
"VRecDialog" : false
}
}
5 changes: 5 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
<!-- INSTRUCTION: Your Pull Request name should start with one of the following tags -->
<!-- [NEW] For new features -->
<!-- [FIX] For bug fixes -->
<!-- [BREAK] For pull requests including breaking changes -->

<!-- INSTRUCTION: Keep the line below to notify all core developers about this new PR -->
@RocketChat/core

Expand Down
116 changes: 116 additions & 0 deletions .github/changelog.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
/* eslint no-var: 0, object-shorthand: 0, prefer-template: 0 */

'use strict';
var readFile = require('fs').readFileSync;
var resolve = require('path').resolve;
var gitUrl = 'https://github.com/RocketChat/Rocket.Chat';

var parserOpts = {
headerPattern: /^(\[([A-z]+)\] )?(.*)$/m,
headerCorrespondence: [
'stype',
'type',
'subject'
],
mergePattern: /^Merge pull request #(.*) from .*$/,
mergeCorrespondence: ['pr']
// noteKeywords: ['BREAKING CHANGE', 'BREAKING CHANGES'],
// revertPattern: /^revert:\s([\s\S]*?)\s*This reverts commit (\w*)\./,
// revertCorrespondence: ['header', 'hash'],
// mergePattern: /^Merge pull request #(\d+) from (.*)$/,
// mergeCorrespondence: ['id', 'source']
};

var LABELS = {
BREAK: {
title: 'BREAKING CHANGES',
collapse: false
},
NEW: {
title: 'New Features',
collapse: false
},
FIX: {
title: 'Bug Fixes',
collapse: false
},
DOC: {
title: 'Documentation',
collapse: true
},
OTHER: {
title: 'Others',
collapse: true
}
};

var sort = Object.keys(LABELS);

var writerOpts = {
transform: function(commit) {
if (!commit.pr) {
return;
}

// console.log(commit);
commit.type = (commit.type || 'OTHER').toUpperCase();
if (LABELS[commit.type] == null) {
return;
}

commit.pr_url = gitUrl + '/pull/' + commit.pr;

var issues = [];

if (typeof commit.hash === 'string') {
commit.hash = commit.hash.substring(0, 7);
}

if (typeof commit.subject === 'string') {
// GitHub issue URLs.
commit.subject = commit.subject.replace(/#([0-9]+)/g, function(_, issue) {
issues.push(issue);
return '[#' + issue + '](' + gitUrl + '/issue/' + issue + ')';
});
// GitHub user URLs.
commit.subject = commit.subject.replace(/@([a-zA-Z0-9_]+)/g, '[@$1](https://github.com/$1)');
}

// remove references that already appear in the subject
commit.references = commit.references.filter(function(reference) {
if (issues.indexOf(reference.issue) === -1) {
return true;
}

return false;
});

return commit;
},
groupBy: 'type',
commitGroupsSort: function(a, b) {
return sort.indexOf(a.title) > sort.indexOf(b.title);
},
finalizeContext: function(context) {
context.commitGroups.forEach(function(group) {
Object.assign(group, LABELS[group.title.toUpperCase()]);
});

// console.log(context);
return context;
},
commitsSort: ['subject']
};

writerOpts.mainTemplate = readFile(resolve(__dirname, 'templates/template.hbs'), 'utf-8');
writerOpts.headerPartial = readFile(resolve(__dirname, 'templates/header.hbs'), 'utf-8');
writerOpts.commitPartial = readFile(resolve(__dirname, 'templates/commit.hbs'), 'utf-8');
writerOpts.footerPartial = readFile(resolve(__dirname, 'templates/footer.hbs'), 'utf-8');

module.exports = {
gitRawCommitsOpts: {
merges: null
},
parserOpts: parserOpts,
writerOpts: writerOpts
};
40 changes: 40 additions & 0 deletions .github/templates/commit.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{{!-- pr reference --}}- {{#if pr}}[#{{pr}}]({{pr_url}}){{/if}}

{{~!-- subject --}} {{subject}}

{{~!-- commit references --}}
{{~#if references~}}
, closes
{{~#each references}} {{#if @root.linkReferences~}}
[
{{~#if this.owner}}
{{~this.owner}}/
{{~/if}}
{{~this.repository}}#{{this.issue}}](
{{~#if @root.repository}}
{{~#if @root.host}}
{{~@root.host}}/
{{~/if}}
{{~#if this.repository}}
{{~#if this.owner}}
{{~this.owner}}/
{{~/if}}
{{~this.repository}}
{{~else}}
{{~#if @root.owner}}
{{~@root.owner}}/
{{~/if}}
{{~@root.repository}}
{{~/if}}
{{~else}}
{{~@root.repoUrl}}
{{~/if}}/
{{~@root.issue}}/{{this.issue}})
{{~else}}
{{~#if this.owner}}
{{~this.owner}}/
{{~/if}}
{{~this.repository}}#{{this.issue}}
{{~/if}}{{/each}}
{{~/if}}

11 changes: 11 additions & 0 deletions .github/templates/footer.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{{#if noteGroups}}
{{#each noteGroups}}

### {{title}}

{{#each notes}}
* {{#if commit.scope}}**{{commit.scope}}:** {{/if}}{{text}}
{{/each}}
{{/each}}

{{/if}}
26 changes: 26 additions & 0 deletions .github/templates/header.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<a name="{{version}}"></a>
{{#if isPatch~}}
##
{{~else~}}
#
{{~/if}} {{#if @root.linkCompare~}}
[{{version}}](
{{~#if @root.repository~}}
{{~#if @root.host}}
{{~@root.host}}/
{{~/if}}
{{~#if @root.owner}}
{{~@root.owner}}/
{{~/if}}
{{~@root.repository}}
{{~else}}
{{~@root.repoUrl}}
{{~/if~}}
/compare/{{previousTag}}...{{currentTag}})
{{~else}}
{{~version}}
{{~/if}}
{{~#if title}} "{{title}}"
{{~/if}}
{{~#if date}} ({{date}})
{{/if}}
22 changes: 22 additions & 0 deletions .github/templates/template.hbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{{> header}}

{{#each commitGroups}}

{{#if collapse}}
<details>
<summary>{{title}}</summary>
{{else}}
### {{title}}
{{/if}}

{{#each commits}}
{{> commit root=@root}}
{{/each}}
{{#if collapse}}
</details>
{{/if}}

{{/each}}
{{> footer}}


Loading

0 comments on commit e47a2eb

Please sign in to comment.