This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const token = 'token'; | |
var parse = require('parse-diff'); | |
const octokit = require('@octokit/rest')(); | |
octokit.authenticate({ | |
type: 'oauth', | |
token: token | |
}); | |
async function getFiles(org, repo, prNumber) { | |
let result = {}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# clean repo of any unstaged, uncomiited data | |
cd {repoPath} && git reset --hard && git clean -d -x -f | |
# fetch all remote branches | |
cd {repoPath} && git fetch --all | |
# fetch pr head from remote and create a new branch named {prNumber}-{uuid}, you can generate any uuid lib or simply use date.getTime() | |
cd {repoPath} && git fetch origin pull/{prNumber}/head:{prNumber}-{uuid} | |
# checkout baseRef of the Pull Request | |
cd {repoPath} && git checkout {baseRef} | |
# fetch and merge remote data | |
cd {repoPath} && git pull origin {baseRef} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public abstract class TransactionAspectSupport implements BeanFactoryAware, InitializingBean { | |
... | |
... | |
/** | |
* General delegate for around-advice-based subclasses, delegating to several other template | |
* methods on this class. Able to handle {@link CallbackPreferringPlatformTransactionManager} | |
* as well as regular {@link PlatformTransactionManager} implementations. | |
* @param method the Method being invoked | |
* @param targetClass the target class that we're invoking the method on | |
* @param invocation the callback to use for proceeding with the target invocation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.springframework.stereotype.Service; | |
import org.springframework.transaction.annotation.Propagation; | |
import org.springframework.transaction.annotation.Transactional; | |
@Service | |
public class ExceptionService { | |
public void throwException() throws Exception { | |
throw new Exception("Throw me!"); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Use the following templates for IntelliJ 2016.1.4 | |
Boolean isFoo; | |
public void getIsFoo() { | |
return foo; | |
} | |
public void setIsFoo(Boolean isFoo) { | |
this.isFoo = isFoo; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var React = require('react'); | |
var $NAME$ = React.createClass({ | |
getInitialState: function() { | |
return { | |
}; | |
}, | |
componentWillMount: function() { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Warning: React can't find the root component node for data-reactid value `.0.2.0`. If you're seeing this message, it probably means that you've loaded two copies of React on the page. At this time, only a single copy of React can be loaded at a time. | |
I was rendering a jsx server side. | |
In my componentWillMount I was resolving a promise, which was in turn changing the state and | |
adding children into the render method. | |
Solved this by making server side componentWillMount code run synchronously. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
t.Identifier: Too many arguments passed. Received 3 but can receive no more than 1 while parsing | |
Solution: | |
Update to following or latest: | |
"babel-plugin-transform-react-jsx": "6.0.18", | |
"babelify": "7.2.0", | |
"browserify": "12.0.1", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The MIT License (MIT) | |
* | |
* Copyright (c) 2015 Circle Internet Financial | |
* | |
* Permission is hereby granted, free of charge, to any person obtaining a copy | |
* of this software and associated documentation files (the "Software"), to deal | |
* in the Software without restriction, including without limitation the rights | |
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
* copies of the Software, and to permit persons to whom the Software is |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-header-panel/core-header-panel.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; |