Permalink
Browse files

fix(committer-name): fix texts related to commiter and author name

  • Loading branch information...
jkuri committed Sep 6, 2017
1 parent d2929a5 commit cc1281ed28f55c739b9c9ccd3c38839460db3d89
@@ -76,7 +76,7 @@ <h1 class="bold">
<img *ngIf="!build?.data?.sender?.avatar_url && !build?.data?.actor?.links?.avatar?.href && build?.data?.user_avatar" [src]="build?.data?.user_avatar" class="avatar-img">
<img *ngIf="!build?.data?.sender?.avatar_url && !build?.data?.actor?.links?.avatar?.href && !build?.data?.user_avatar && build?.data?.user?.avatar_url" class="avatar-img" [src]="build?.data?.user?.avatar_url">
</span>
<span *ngIf="(build?.data?.pull_request || build?.data?.head_commit) && !tag">{{ nameAuthor }} commited</span>
<span *ngIf="(build?.data?.pull_request || build?.data?.head_commit) && !tag && build?.data.head_commit.author.username === build?.data.head_commit.committer.username">{{ nameAuthor }} commited</span>
<span *ngIf="!build?.data?.pull_request && build?.data?.head_commit && !tag && build?.data.head_commit.author.username !== build?.data.head_commit.committer.username">
{{ nameAuthor }} committed with {{ nameCommitter }}
</span>
@@ -81,7 +81,7 @@ <h2 *ngIf="tag">{{ job?.build?.data?.head_commit?.message }}</h2>
<img *ngIf="!job?.build?.data?.sender?.avatar_url && !job?.build?.data?.actor?.links?.avatar?.href && job?.build?.data?.user_avatar" [src]="job?.build?.data?.user_avatar" class="avatar-img">
<img *ngIf="!job?.build?.data?.sender?.avatar_url && !job?.build?.data?.actor?.links?.avatar?.href && !job?.build?.data?.user_avatar && job?.build?.data?.user?.avatar_url" class="avatar-img" [src]="job?.build?.data?.user?.avatar_url">
</span>
<span *ngIf="(job?.build?.data?.pull_request || job?.build?.data?.head_commit) && !tag">{{ nameAuthor }} commited</span>
<span *ngIf="(job?.build?.data?.pull_request || job?.build?.data?.head_commit) && !tag && job?.build?.data.head_commit.author.username === job?.build?.data.head_commit.committer.username">{{ nameAuthor }} commited</span>
<span *ngIf="!job?.build?.data?.pull_request && job?.build?.data?.head_commit && !tag && job?.build?.data.head_commit.author.username !== job?.build?.data.head_commit.committer.username">
{{ nameAuthor }} committed with {{ nameCommitter }}
</span>
@@ -0,0 +1,238 @@
{
"ref": "refs/heads/master",
"before": "5f3ed0aedf8a467c326bb792677f99e98fa71603",
"after": "d2929a50bb5000e5d2df3385566c9183d39dbb39",
"created": false,
"deleted": false,
"forced": false,
"base_ref": null,
"compare": "https://github.com/bleenco/abstruse/compare/5f3ed0aedf8a...d2929a50bb50",
"commits": [
{
"id": "32af36a7d05903fc59d916d69d705c2991dcbe19",
"tree_id": "2f649376dfdb9ded1f73eb870ebd388c60514ac1",
"distinct": true,
"message": "feat(logs): system logs",
"timestamp": "2017-09-06T14:24:39+02:00",
"url": "https://github.com/bleenco/abstruse/commit/32af36a7d05903fc59d916d69d705c2991dcbe19",
"author": {
"name": "Jan Kuri",
"email": "jkuri88@gmail.com",
"username": "jkuri"
},
"committer": {
"name": "Izak Lipnik",
"email": "izak.lipnik@gmail.com",
"username": "Izak88"
},
"added": [
"src/app/components/app-logs/app-logs.component.html",
"src/app/components/app-logs/app-logs.component.ts",
"src/app/components/app-logs/index.ts",
"src/app/styles/logs.sass"
],
"removed": [

],
"modified": [
"src/api/db/log.ts",
"src/api/server-routes.ts",
"src/api/server.ts",
"src/api/socket.ts",
"src/app/app.module.ts",
"src/app/components/app-header/app-header.component.html",
"src/app/services/api.service.ts",
"src/app/styles/app.sass",
"src/app/styles/terminal/dracula-ansi.scss"
]
},
{
"id": "d2929a50bb5000e5d2df3385566c9183d39dbb39",
"tree_id": "165d7dea56c9607232985beccee3be4520548709",
"distinct": true,
"message": "chore(logs): make logs sortable",
"timestamp": "2017-09-06T14:24:39+02:00",
"url": "https://github.com/bleenco/abstruse/commit/d2929a50bb5000e5d2df3385566c9183d39dbb39",
"author": {
"name": "Jan Kuri",
"email": "jkuri88@gmail.com",
"username": "jkuri"
},
"committer": {
"name": "Izak Lipnik",
"email": "izak.lipnik@gmail.com",
"username": "Izak88"
},
"added": [

],
"removed": [

],
"modified": [
"src/app/components/app-logs/app-logs.component.html",
"src/app/components/app-logs/app-logs.component.ts",
"src/app/styles/logs.sass"
]
}
],
"head_commit": {
"id": "d2929a50bb5000e5d2df3385566c9183d39dbb39",
"tree_id": "165d7dea56c9607232985beccee3be4520548709",
"distinct": true,
"message": "chore(logs): make logs sortable",
"timestamp": "2017-09-06T14:24:39+02:00",
"url": "https://github.com/bleenco/abstruse/commit/d2929a50bb5000e5d2df3385566c9183d39dbb39",
"author": {
"name": "Jan Kuri",
"email": "jkuri88@gmail.com",
"username": "jkuri"
},
"committer": {
"name": "Izak Lipnik",
"email": "izak.lipnik@gmail.com",
"username": "Izak88"
},
"added": [

],
"removed": [

],
"modified": [
"src/app/components/app-logs/app-logs.component.html",
"src/app/components/app-logs/app-logs.component.ts",
"src/app/styles/logs.sass"
]
},
"repository": {
"id": 84880847,
"name": "abstruse",
"full_name": "bleenco/abstruse",
"owner": {
"name": "bleenco",
"email": "oss@bleenco.com",
"login": "bleenco",
"id": 26046537,
"avatar_url": "https://avatars2.githubusercontent.com/u/26046537?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/bleenco",
"html_url": "https://github.com/bleenco",
"followers_url": "https://api.github.com/users/bleenco/followers",
"following_url": "https://api.github.com/users/bleenco/following{/other_user}",
"gists_url": "https://api.github.com/users/bleenco/gists{/gist_id}",
"starred_url": "https://api.github.com/users/bleenco/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/bleenco/subscriptions",
"organizations_url": "https://api.github.com/users/bleenco/orgs",
"repos_url": "https://api.github.com/users/bleenco/repos",
"events_url": "https://api.github.com/users/bleenco/events{/privacy}",
"received_events_url": "https://api.github.com/users/bleenco/received_events",
"type": "Organization",
"site_admin": false
},
"private": false,
"html_url": "https://github.com/bleenco/abstruse",
"description": "open source continuous integration platform",
"fork": false,
"url": "https://github.com/bleenco/abstruse",
"forks_url": "https://api.github.com/repos/bleenco/abstruse/forks",
"keys_url": "https://api.github.com/repos/bleenco/abstruse/keys{/key_id}",
"collaborators_url": "https://api.github.com/repos/bleenco/abstruse/collaborators{/collaborator}",
"teams_url": "https://api.github.com/repos/bleenco/abstruse/teams",
"hooks_url": "https://api.github.com/repos/bleenco/abstruse/hooks",
"issue_events_url": "https://api.github.com/repos/bleenco/abstruse/issues/events{/number}",
"events_url": "https://api.github.com/repos/bleenco/abstruse/events",
"assignees_url": "https://api.github.com/repos/bleenco/abstruse/assignees{/user}",
"branches_url": "https://api.github.com/repos/bleenco/abstruse/branches{/branch}",
"tags_url": "https://api.github.com/repos/bleenco/abstruse/tags",
"blobs_url": "https://api.github.com/repos/bleenco/abstruse/git/blobs{/sha}",
"git_tags_url": "https://api.github.com/repos/bleenco/abstruse/git/tags{/sha}",
"git_refs_url": "https://api.github.com/repos/bleenco/abstruse/git/refs{/sha}",
"trees_url": "https://api.github.com/repos/bleenco/abstruse/git/trees{/sha}",
"statuses_url": "https://api.github.com/repos/bleenco/abstruse/statuses/{sha}",
"languages_url": "https://api.github.com/repos/bleenco/abstruse/languages",
"stargazers_url": "https://api.github.com/repos/bleenco/abstruse/stargazers",
"contributors_url": "https://api.github.com/repos/bleenco/abstruse/contributors",
"subscribers_url": "https://api.github.com/repos/bleenco/abstruse/subscribers",
"subscription_url": "https://api.github.com/repos/bleenco/abstruse/subscription",
"commits_url": "https://api.github.com/repos/bleenco/abstruse/commits{/sha}",
"git_commits_url": "https://api.github.com/repos/bleenco/abstruse/git/commits{/sha}",
"comments_url": "https://api.github.com/repos/bleenco/abstruse/comments{/number}",
"issue_comment_url": "https://api.github.com/repos/bleenco/abstruse/issues/comments{/number}",
"contents_url": "https://api.github.com/repos/bleenco/abstruse/contents/{+path}",
"compare_url": "https://api.github.com/repos/bleenco/abstruse/compare/{base}...{head}",
"merges_url": "https://api.github.com/repos/bleenco/abstruse/merges",
"archive_url": "https://api.github.com/repos/bleenco/abstruse/{archive_format}{/ref}",
"downloads_url": "https://api.github.com/repos/bleenco/abstruse/downloads",
"issues_url": "https://api.github.com/repos/bleenco/abstruse/issues{/number}",
"pulls_url": "https://api.github.com/repos/bleenco/abstruse/pulls{/number}",
"milestones_url": "https://api.github.com/repos/bleenco/abstruse/milestones{/number}",
"notifications_url": "https://api.github.com/repos/bleenco/abstruse/notifications{?since,all,participating}",
"labels_url": "https://api.github.com/repos/bleenco/abstruse/labels{/name}",
"releases_url": "https://api.github.com/repos/bleenco/abstruse/releases{/id}",
"deployments_url": "https://api.github.com/repos/bleenco/abstruse/deployments",
"created_at": 1489444318,
"updated_at": "2017-09-02T10:44:54Z",
"pushed_at": 1504700680,
"git_url": "git://github.com/bleenco/abstruse.git",
"ssh_url": "git@github.com:bleenco/abstruse.git",
"clone_url": "https://github.com/bleenco/abstruse.git",
"svn_url": "https://github.com/bleenco/abstruse",
"homepage": "http://abstruse.bleenco.com",
"size": 3966,
"stargazers_count": 14,
"watchers_count": 14,
"language": "TypeScript",
"has_issues": true,
"has_projects": true,
"has_downloads": true,
"has_wiki": true,
"has_pages": false,
"forks_count": 5,
"mirror_url": null,
"open_issues_count": 13,
"forks": 5,
"open_issues": 13,
"watchers": 14,
"default_branch": "master",
"stargazers": 14,
"master_branch": "master",
"organization": "bleenco"
},
"pusher": {
"name": "Izak88",
"email": "izak.lipnik@gmail.com"
},
"organization": {
"login": "bleenco",
"id": 26046537,
"url": "https://api.github.com/orgs/bleenco",
"repos_url": "https://api.github.com/orgs/bleenco/repos",
"events_url": "https://api.github.com/orgs/bleenco/events",
"hooks_url": "https://api.github.com/orgs/bleenco/hooks",
"issues_url": "https://api.github.com/orgs/bleenco/issues",
"members_url": "https://api.github.com/orgs/bleenco/members{/member}",
"public_members_url": "https://api.github.com/orgs/bleenco/public_members{/member}",
"avatar_url": "https://avatars2.githubusercontent.com/u/26046537?v=4",
"description": ""
},
"sender": {
"login": "Izak88",
"id": 8555269,
"avatar_url": "https://avatars0.githubusercontent.com/u/8555269?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/Izak88",
"html_url": "https://github.com/Izak88",
"followers_url": "https://api.github.com/users/Izak88/followers",
"following_url": "https://api.github.com/users/Izak88/following{/other_user}",
"gists_url": "https://api.github.com/users/Izak88/gists{/gist_id}",
"starred_url": "https://api.github.com/users/Izak88/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/Izak88/subscriptions",
"organizations_url": "https://api.github.com/users/Izak88/orgs",
"repos_url": "https://api.github.com/users/Izak88/repos",
"events_url": "https://api.github.com/users/Izak88/events{/privacy}",
"received_events_url": "https://api.github.com/users/Izak88/received_events",
"type": "User",
"site_admin": false
}
}
@@ -0,0 +1,23 @@
const request = require('request');
const crypto = require('crypto');
const data = require('./data/push-merge-pr.json');
const headers = require('./data/push-request-headers.json');

const secret = 'thisIsSecret';
const sig = crypto.createHmac('sha1', secret).update(JSON.stringify(data)).digest('hex');
headers['X-Hub-Signature'] = `sha1=${sig}`;

const options = {
url: 'http://localhost:6500/webhooks/github',
method: 'POST',
headers: headers,
json: data
};

request(options, (err, response, body) => {
if (err) {
console.error(err);
} else {
console.log('Done.');
}
});

0 comments on commit cc1281e

Please sign in to comment.