git ssb

16+

Dominic / patchbay



Commit ab55d44678ee1d8dd109f6663adcc9f5568d91a5

add pull request button to the git-update message type

mix irving committed on 11/24/2016, 9:16:31 AM
Parent: 64015f26b256acb4385383829b1af1cbc9a32a0f

Files changed

modules_extra/git.jschanged
modules_extra/git.jsView
@@ -186,12 +186,10 @@
186186 h('div', h('a', {href: '#', onclick: function (e) {
187187 e.preventDefault()
188188 this.parentNode.replaceChild(issueForm(msg), this)
189189 }}, 'New Issue…')),
190- h('div', h('a', {href: '#', onclick: function (e) {
191- e.preventDefault()
192- this.parentNode.replaceChild(pullRequestForm(msg), this)
193- }}, 'New Pull Request…')))
190 + newPullRequestButton.call(this, msg)
191 + )
194192
195193 pull(getRefs(msg), pull.drain(function (ref) {
196194 var name = ref.realname || ref.name
197195 var author = ref.link && ref.link.value.author
@@ -289,9 +287,10 @@
289287 h('code', issue.object), ' ', h('q', issue.label))
290288 if (issue.open === false)
291289 return h('p', 'Closed ', message_link(issue.link), ' in ',
292290 h('code', issue.object), ' ', h('q', issue.label))
293- }) : null
291 + }) : null,
292 + newPullRequestButton.call(this, msg)
294293 ]
295294 }
296295
297296 if(c.type === 'issue-edit'
@@ -382,8 +381,21 @@
382381 }))
383382 })
384383 }
385384
385 +function newPullRequestButton(msg) {
386 + return h('div', [
387 + h('a', {
388 + href: '#',
389 + onclick: function (e) {
390 + e.preventDefault()
391 + this.parentNode.replaceChild(pullRequestForm(msg), this)
392 + }},
393 + 'New Pull Request…'
394 + )
395 + ])
396 +}
397 +
386398 function pullRequestForm(msg) {
387399 var headRepoInput
388400 var headBranchInput = branchMenu()
389401 var branchInput = branchMenu(msg)

Built with git-ssb-web