hash
stringlengths 40
40
| diff
stringlengths 172
2.63k
| message
stringlengths 12
593
| project
stringlengths 7
65
| split
stringclasses 1
value | diff_languages
stringclasses 54
values |
|---|---|---|---|---|---|
352dd71aa3d3db6219f65f2a1f4879c2450c6a9e
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -293,6 +293,7 @@ function getPathValue(obj, path) {
function setPathValue(obj, path, val) {
var parsed = parsePath(path);
internalSetPathValue(obj, val, parsed);
+ return obj;
}
module.exports = {
diff --git a/test/index.js b/test/index.js
index <HASH>..<HASH> 100644
--- a/test/index.js
+++ b/test/index.js
@@ -208,4 +208,10 @@ describe('setPathValue', function () {
assert(obj.hello[1] === 2);
assert(obj.hello[2] === 3);
});
+
+ it('returns the object in which the value was set', function () {
+ var obj = { hello: [ 1, 2, 4 ] };
+ var valueReturned = pathval.setPathValue(obj, 'hello[2]', 3);
+ assert(obj === valueReturned);
+ });
});
|
feat: returns the object in which the value was set. Closes #6
|
chaijs_pathval
|
train
|
js,js
|
542e86c22870cc8ddcc3c6a2c328654e00a7775f
|
diff --git a/sessions.js b/sessions.js
index <HASH>..<HASH> 100644
--- a/sessions.js
+++ b/sessions.js
@@ -49,10 +49,11 @@ class ClientSession {
this.topology.command(
'admin.$cmd',
{ endSessions: 1, ids: [this.id] },
- { readPreference: ReadPreference.primaryPreferred }
+ { readPreference: ReadPreference.primaryPreferred },
+ () => {
+ // intentionally ignored, per spec
+ }
);
-
- return;
}
this.hasEnded = true;
|
refactor(endSession): don't return if topology command is run
NODE-<I>
|
mongodb_node-mongodb-native
|
train
|
js
|
89c209a5a559b0032e6a8e1916ccf47c7c66bb32
|
diff --git a/actor-apps/app-web/src/app/components/Login.react.js b/actor-apps/app-web/src/app/components/Login.react.js
index <HASH>..<HASH> 100644
--- a/actor-apps/app-web/src/app/components/Login.react.js
+++ b/actor-apps/app-web/src/app/components/Login.react.js
@@ -163,6 +163,7 @@ class Login extends React.Component {
Actor Messenger © 2015
</div>
<div className="pull-right">
+ <a href="//actorapp.ghost.io/desktop-apps">Desktop</a>
<a href="//actor.im/ios">iPhone</a>
<a href="//actor.im/android">Android</a>
</div>
|
feat(web): add links to desktop app to login page
|
actorapp_actor-platform
|
train
|
js
|
d510b9c912734b4cee1afefbea332747af4ca22e
|
diff --git a/views/js/layout/actions/common.js b/views/js/layout/actions/common.js
index <HASH>..<HASH> 100644
--- a/views/js/layout/actions/common.js
+++ b/views/js/layout/actions/common.js
@@ -377,7 +377,12 @@ define([
.then(function(response) {
var message;
var i;
- if (response && response.status === 'diff') {
+
+ if (response && response.status === true) {
+ return
+ }
+
+ else if (response && response.status === 'diff') {
message = __("Moving this element will replace the properties of the previous class by those of the destination class :");
message += "\n";
for (i = 0; i < response.data.length; i++) {
@@ -392,12 +397,6 @@ define([
data.confirmed = true;
return _moveNode(url, data);
}
- } else if (response && response.status === true) {
- //open the destination branch
- $(actionContext.tree).trigger('openbranch.taotree', [{
- id : actionContext.destinationClassUri
- }]);
- return;
}
//ask to rollback the tree
|
fix: Remove unnecessary openbranch event trigger
|
oat-sa_tao-core
|
train
|
js
|
ecd1ccdb6f9267ee865bfc054297181f94f162c1
|
diff --git a/peerdiversity/filter.go b/peerdiversity/filter.go
index <HASH>..<HASH> 100644
--- a/peerdiversity/filter.go
+++ b/peerdiversity/filter.go
@@ -174,7 +174,7 @@ func (f *Filter) TryAdd(p peer.ID) bool {
return false
}
if len(key) == 0 {
- dfLog.Debugw("group key is empty", "appKey", f.logKey, "ip", ip.String(), "peer", p)
+ dfLog.Errorw("group key is empty", "appKey", f.logKey, "ip", ip.String(), "peer", p)
return false
}
group := PeerGroupInfo{Id: p, Cpl: cpl, IPGroupKey: key}
@@ -220,6 +220,13 @@ func (f *Filter) ipGroupKey(ip net.IP) (PeerIPGroupKey, error) {
if err != nil {
return "", fmt.Errorf("failed to fetch ASN for IPv6 addr %s: %w", ip.String(), err)
}
+
+ // if no ASN found then fallback on using the /32 prefix
+ if len(s) == 0 {
+ dfLog.Debugw("ASN not known", "appKey", f.logKey, "ip", ip)
+ s = fmt.Sprintf("unknown ASN: %s", net.CIDRMask(32, 128).String())
+ }
+
return PeerIPGroupKey(s), nil
default:
// If it belongs to a legacy Class 8, we return the /8 prefix as the key
|
feat: when using the diversity filter for ipv6 addresses if the ASN cannot be found for a particular address then fallback on using the /<I> mask of the address as the group name instead of simply rejecting the peer from routing table
|
libp2p_go-libp2p-kbucket
|
train
|
go
|
600bc2b16eb9fe1e7b3bee757fa80a5fa177d5fd
|
diff --git a/lib/inspectors/res.js b/lib/inspectors/res.js
index <HASH>..<HASH> 100644
--- a/lib/inspectors/res.js
+++ b/lib/inspectors/res.js
@@ -263,10 +263,15 @@ module.exports = function(req, res, next) {
var maxRetryCount = 1;
var retryCount = 0;
var retryXHost = 0;
+ var resetCount = 0;
var retryReq = function(err) {
if (retryCount >= maxRetryCount) {
- res.response(util.wrapGatewayError(util.getErrorStack(err || new Error('socket connect timeout'))));
- return;
+ var code = err && err.code;
+ if (resetCount > 1 || code !== 'ECONNRESET') {
+ var stack = util.getErrorStack(err || new Error('socket connect timeout'));
+ return res.response(util.wrapGatewayError(stack));
+ }
+ ++resetCount;
}
++retryCount;
if (proxyUrl) {
|
refactor: retry ECONNRESET
|
avwo_whistle
|
train
|
js
|
b0f136f57304e24f46f8ed91d4c652b0f5a99973
|
diff --git a/src/main/java/com/synopsys/integration/blackduck/codelocation/bdio2legacy/UploadBdio2Callable.java b/src/main/java/com/synopsys/integration/blackduck/codelocation/bdio2legacy/UploadBdio2Callable.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/synopsys/integration/blackduck/codelocation/bdio2legacy/UploadBdio2Callable.java
+++ b/src/main/java/com/synopsys/integration/blackduck/codelocation/bdio2legacy/UploadBdio2Callable.java
@@ -44,7 +44,9 @@ public class UploadBdio2Callable implements Callable<UploadOutput> {
HttpUrl url = apiDiscovery.metaSingleResponse(BlackDuckApiClient.SCAN_DATA_PATH).getUrl();
BlackDuckResponseRequest request = new BlackDuckRequestBuilder()
.postFile(uploadTarget.getUploadFile(), ContentType.create(uploadTarget.getMediaType(), StandardCharsets.UTF_8))
- .buildBlackDuckResponseRequest(url);
+ .addHeader("X-BD-PROJECT-NAME", projectAndVersion.getName())
+ .addHeader("X-BD-VERSION-NAME", projectAndVersion.getVersion())
+ .buildBlackDuckResponseRequest(url);
try (Response response = blackDuckApiClient.execute(request)) {
String responseString = response.getContentString();
|
feat: UploadBdio2Callable: set project and version headers
|
blackducksoftware_blackduck-common
|
train
|
java
|
bb5a3b1e75d4162e532e4aea6abd28d8b70be907
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -1,4 +1,3 @@
-import assign from "core-js/library/fn/object/assign";
import joi from "joi";
import optionsSchema from "./utils/optionsSchema";
@@ -32,15 +31,12 @@ function remarkGenericExtensions(options = {}) {
return false;
}
- const settings = Object::assign(
- {},
- {
- debug: false,
- placeholderAffix: "::",
- elements: {}
- },
- options
- );
+ const settings = {
+ debug: false,
+ placeholderAffix: "::",
+ elements: {},
+ ...options
+ };
// Escape the user provided placeholder affix for use in regex
settings.placeholderAffix = settings.placeholderAffix::escapeRegExp();
|
chore(module): replace `Object::assign` by es6 spread operator
|
medfreeman_remark-generic-extensions
|
train
|
js
|
809c78afc78597a7355ba2e3962518ebca8a89d7
|
diff --git a/scripts/build.js b/scripts/build.js
index <HASH>..<HASH> 100644
--- a/scripts/build.js
+++ b/scripts/build.js
@@ -31,13 +31,20 @@ shell.config.verbose = true;
shell.cd(`${env.sourceFolder}`);
if (env.isWindows) {
- exec(`cmake -DWANT_SYNCAPI=OFF -DCMAKE_GENERATOR_PLATFORM=${process.arch} .`);
- exec('cmake --build .');
+ let flags = '-DWANT_SYNCAPI=OFF ';
+ let output = '';
+
+ if (!env.isVerbose) {
+ flags = '';
+ output = ' > NUL';
+ }
+ exec(`cmake ${flags}-DCMAKE_GENERATOR_PLATFORM=${process.arch} .${output}`);
+ exec(`cmake --build .${output}`);
} else {
const flags = '-w';
let configureCmd = `./configure CFLAGS='${flags}' --without-syncapi --disable-shared --with-pic --without-cppunit`;
let makeCmd = 'make';
- if (!process.env.ZK_INSTALL_VERBOSE) {
+ if (!env.isVerbose) {
configureCmd += ' --enable-silent-rules --quiet';
makeCmd += ' --no-print-directory --quiet';
}
|
fix: less verbose Windows builds
|
yfinkelstein_node-zookeeper
|
train
|
js
|
d9e6da2a8e41337285e2f3d3d6b6f040d446a9e2
|
diff --git a/checkList/checkList.go b/checkList/checkList.go
index <HASH>..<HASH> 100644
--- a/checkList/checkList.go
+++ b/checkList/checkList.go
@@ -1,7 +1,7 @@
package checkList
import (
- "errors"
+ "log"
"os/exec"
"sync"
@@ -109,7 +109,7 @@ func hasLicense(taskName string) (message string, success bool) {
hasLicense, err := util.FileExists("license", "licensing")
if err != nil {
- errors.New("There was a problem with finding the file")
+ log.Fatal(err)
}
if hasLicense {
@@ -122,7 +122,7 @@ func hasLicense(taskName string) (message string, success bool) {
func hasReadme(taskName string) (message string, success bool) {
hasReadme, err := util.FileExists("readme")
if err != nil {
- errors.New("There was a problem with finding the file")
+ log.Fatal(err)
}
if hasReadme {
@@ -135,7 +135,7 @@ func hasReadme(taskName string) (message string, success bool) {
func hasContribution(taskName string) (message string, success bool) {
hasContribution, err := util.FileExists("contribution", "contribute", "contributing")
if err != nil {
- errors.New("There was a problem with finding the file")
+ log.Fatal(err)
}
if hasContribution {
|
chore: Make it pass through gometalinter
|
karolgorecki_goprove
|
train
|
go
|
2aa71112a6c8c01c6b26ac942aea0d7de6a7dd00
|
diff --git a/packages/node_modules/@webex/plugin-meetings/src/meeting/index.js b/packages/node_modules/@webex/plugin-meetings/src/meeting/index.js
index <HASH>..<HASH> 100644
--- a/packages/node_modules/@webex/plugin-meetings/src/meeting/index.js
+++ b/packages/node_modules/@webex/plugin-meetings/src/meeting/index.js
@@ -1093,6 +1093,15 @@ export default class Meeting extends StatelessWebexPlugin {
};
}
+ const getTotalJmt = this.getTotalJmt();
+
+ if (getTotalJmt) {
+ options.joinTimes = {
+ ...options.joinTimes,
+ getTotalJmt
+ };
+ }
+
if (options.type === MQA_STATS.CA_TYPE) {
payload = Metrics.initMediaPayload(options.event, identifiers, options);
}
@@ -5396,4 +5405,15 @@ export default class Meeting extends StatelessWebexPlugin {
return undefined;
}
+
+ /**
+ *
+ * @returns {string} duration between call initiate and successful locus join (even if it is in lobby)
+ */
+ getTotalJmt() {
+ const start = this.startCallInitiateJoinReq;
+ const end = this.endJoinReqResp;
+
+ return (start && end) ? end - start : undefined;
+ }
}
|
feat(meetings): add totalJmt joinTime metric
|
webex_spark-js-sdk
|
train
|
js
|
8e1bba92715ff05af39817d00e293d408c3074dd
|
diff --git a/test/mp/helpers/entry-runtime-with-compiler.js b/test/mp/helpers/entry-runtime-with-compiler.js
index <HASH>..<HASH> 100644
--- a/test/mp/helpers/entry-runtime-with-compiler.js
+++ b/test/mp/helpers/entry-runtime-with-compiler.js
@@ -31,7 +31,8 @@ Vue.prototype.$mount = function (
imports: {
test: { name: 'test' },
test2: { name: 'test2' },
- test3: { name: 'test3' }
+ test3: { name: 'test3' },
+ child: { name: 'child' }
},
transformAssetUrls: {
img: 'src'
|
test: fix entry runtime, add components: "child"
|
kaola-fed_megalo
|
train
|
js
|
ac9b223c51a51a7d09e294cf1d331b6607043a94
|
diff --git a/scripts/config.js b/scripts/config.js
index <HASH>..<HASH> 100644
--- a/scripts/config.js
+++ b/scripts/config.js
@@ -8,6 +8,7 @@ const flow = require('rollup-plugin-flow-no-whitespace')
const version = process.env.VERSION || require('../package.json').version
const weexVersion = process.env.WEEX_VERSION || require('../packages/weex-vue-framework/package.json').version
const featureFlags = require('./feature-flags')
+const vueCoreVersion = '2.6.6'
// const banner =
// '/*!\n' +
@@ -260,7 +261,8 @@ function genConfig (name) {
const vars = {
__WEEX__: !!opts.weex,
__WEEX_VERSION__: weexVersion,
- __VERSION__: version
+ __VERSION__: vueCoreVersion,
+ __MEGALO_VERSION__: version
}
// feature flags
Object.keys(featureFlags).forEach(key => {
diff --git a/src/platforms/mp/entry-runtime.js b/src/platforms/mp/entry-runtime.js
index <HASH>..<HASH> 100644
--- a/src/platforms/mp/entry-runtime.js
+++ b/src/platforms/mp/entry-runtime.js
@@ -2,4 +2,6 @@
import Vue from './runtime/index'
+Vue.megaloVersion = '__MEGALO_VERSION__'
+
export default Vue
|
feat: use Vue core as Vue.version and add Vue.megaloVersion #<I>
|
kaola-fed_megalo
|
train
|
js,js
|
b227fe7e2afd438c134e9d4b600f1f5e882483c2
|
diff --git a/test/test_controller.go b/test/test_controller.go
index <HASH>..<HASH> 100644
--- a/test/test_controller.go
+++ b/test/test_controller.go
@@ -114,7 +114,11 @@ func unmarshalControllerExample(data []byte) (map[string]interface{}, error) {
}
func (s *ControllerSuite) generateControllerExamples(t *c.C) map[string]interface{} {
- cmd := exec.Command(exec.DockerImage(imageURIs["controller-examples"]), "/bin/flynn-controller-examples")
+ cmd := exec.CommandUsingCluster(
+ s.clusterClient(t),
+ exec.DockerImage(imageURIs["controller-examples"]),
+ "/bin/flynn-controller-examples",
+ )
cmd.Env = map[string]string{
"CONTROLLER_KEY": s.clusterConf(t).Key,
"SKIP_MIGRATE_DOMAIN": "true",
|
test: Use explicit cluster client in controller examples test
|
flynn_flynn
|
train
|
go
|
d7914adfa8269a49e82aa7bd87b504376af90ee2
|
diff --git a/tests/integration/utils/get-server.js b/tests/integration/utils/get-server.js
index <HASH>..<HASH> 100644
--- a/tests/integration/utils/get-server.js
+++ b/tests/integration/utils/get-server.js
@@ -26,12 +26,22 @@ function getServer (options, callback) {
nock('http://localhost:5984')
// PouchDB sends a request to see if db exists
.get('/_users/')
- .reply(200, {})
- // mocks for bootstrapping design dock
- .put('/_users')
- .reply(201, {})
- .put('/_users/_design/byId')
- .reply(201)
+ .query({})
+ .reply(200, {db_name: '_users'})
+ // design docs
+ .post('/_users/_bulk_docs')
+ .reply(201, [
+ {
+ ok: true,
+ id: '_design/byId',
+ rev: '1-234'
+ },
+ {
+ ok: true,
+ id: '_design/byToken',
+ rev: '1-234'
+ }
+ ])
server.register({
register: hapiAccount,
|
test: adaptions for @hoodie/account-server-api@3
|
hoodiehq_hoodie-account-server
|
train
|
js
|
ed548e70eb7973684db9208ba3895c87a4d5f28e
|
diff --git a/views/cypress/tests/manage-schema.spec.js b/views/cypress/tests/manage-schema.spec.js
index <HASH>..<HASH> 100644
--- a/views/cypress/tests/manage-schema.spec.js
+++ b/views/cypress/tests/manage-schema.spec.js
@@ -126,4 +126,4 @@
cy.removePropertyFromClass(className, newPropertyName, selectors.itemClassForm, selectors.editClass, selectors.classOptions, selectors.editClassUrl);
});
});
-});
\ No newline at end of file
+});
|
chore: add new line at eof
|
oat-sa_extension-tao-item
|
train
|
js
|
9382b47750f9fb31cf795d5db79078e411e603fa
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -79,7 +79,6 @@ export default {
* true value
*/
const chainCans = (metas, to, from) => {
- // store most recent fail
let fail = null
const chain = metas.reduce((chain, meta) => {
return chain
@@ -94,23 +93,15 @@ export default {
? meta.can(to, from, canNavigate)
: Promise.resovle(canNavigate(...metaToStatementPair(meta)))
- if (nextPromise instanceof Promise) {
- return nextPromise;
- }
-
- if (options.strict) {
+ if (options.strict && !(nextPromise instanceof Promise)) {
throw new Error('$route.meta.can must return a promise in strict mode')
}
- return Boolean(nextPromise)
+
+ return nextPromise
})
.catch(error => false) // convert errors to false
}, Promise.resolve(true))
-
- /* getter to access fail route later */
- chain.getFail = () => {
- return fail
- }
-
+ chain.getFail = () => fail
return chain
}
|
refactor: shorten and simplify chain impl.
|
mblarsen_vue-browser-acl
|
train
|
js
|
5272cec6c8c3a24a79ced409a625d998ea7e289a
|
diff --git a/src/client/ClientDataResolver.js b/src/client/ClientDataResolver.js
index <HASH>..<HASH> 100644
--- a/src/client/ClientDataResolver.js
+++ b/src/client/ClientDataResolver.js
@@ -307,6 +307,7 @@ class ClientDataResolver {
* ```
* [
* 'DEFAULT',
+ * 'WHITE',
* 'AQUA',
* 'GREEN',
* 'BLUE',
diff --git a/src/util/Constants.js b/src/util/Constants.js
index <HASH>..<HASH> 100644
--- a/src/util/Constants.js
+++ b/src/util/Constants.js
@@ -705,6 +705,7 @@ exports.UserChannelOverrideMap = {
exports.Colors = {
DEFAULT: 0x000000,
+ WHITE: 0xFFFFFF,
AQUA: 0x1ABC9C,
GREEN: 0x2ECC71,
BLUE: 0x3498DB,
diff --git a/typings/index.d.ts b/typings/index.d.ts
index <HASH>..<HASH> 100644
--- a/typings/index.d.ts
+++ b/typings/index.d.ts
@@ -1667,6 +1667,7 @@ declare module 'discord.js' {
type CollectorOptions = { time?: number };
type ColorResolvable = ('DEFAULT'
+ | 'WHITE'
| 'AQUA'
| 'GREEN'
| 'BLUE'
|
feat(Util): add WHITE as color resolvable (#<I>)
|
discordjs_discord.js
|
train
|
js,js,ts
|
4c7e6e0f5985b676d6fd3c02d89d8a00bcd4df39
|
diff --git a/src/Youch/index.js b/src/Youch/index.js
index <HASH>..<HASH> 100644
--- a/src/Youch/index.js
+++ b/src/Youch/index.js
@@ -129,7 +129,7 @@ class Youch {
message: this.error.message,
name: this.error.name,
status: this.error.status,
- frames: stack.frames.map(callback)
+ frames: stack.frames instanceof Array === true ? stack.frames.map(callback) : []
}
}
|
refactor(youch): add conditional before looping over frames
frames can be undefined at times, so it is required to make sure frames is a valid array before
mapping over them
|
poppinss_youch
|
train
|
js
|
7cfa929a39bbf50c2ed3157f6b6fac8055afc0ae
|
diff --git a/api/src/opentrons/system/nmcli.py b/api/src/opentrons/system/nmcli.py
index <HASH>..<HASH> 100644
--- a/api/src/opentrons/system/nmcli.py
+++ b/api/src/opentrons/system/nmcli.py
@@ -412,7 +412,8 @@ def _build_con_add_cmd(ssid: str, security_type: SECURITY_TYPES,
'ifname', 'wlan0',
'type', 'wifi',
'con-name', ssid,
- 'wifi.ssid', ssid]
+ 'wifi.ssid', ssid,
+ '802-11-wireless.cloned-mac-address', 'permanent']
if hidden:
configure_cmd += ['wifi.hidden', 'true']
if security_type == SECURITY_TYPES.WPA_PSK:
|
fix(api): Force the permanent mac address for wifi connections (#<I>)
This should prevent the macs from changing when the robot restarts, which plays
havoc with people using mac whitelisting in their wireless networks.
|
Opentrons_opentrons
|
train
|
py
|
846fb3e46b9e8e0dc6b7951235ddaee24a9323fa
|
diff --git a/hrp/internal/boomer/runner.go b/hrp/internal/boomer/runner.go
index <HASH>..<HASH> 100644
--- a/hrp/internal/boomer/runner.go
+++ b/hrp/internal/boomer/runner.go
@@ -830,10 +830,8 @@ func (r *workerRunner) run() {
log.Warn().Msg("Timeout waiting for sending quit message to master, boomer will quit any way.")
}
- if atomic.LoadInt32(&r.client.failCount) < 2 {
- if err = r.client.signOut(r.client.config.ctx); err != nil {
- log.Error().Err(err).Msg("failed to sign out")
- }
+ if err = r.client.signOut(r.client.config.ctx); err != nil {
+ log.Info().Err(err).Msg("failed to sign out")
}
r.client.close()
|
fix: mask error logging that worker fails to sign out
|
HttpRunner_HttpRunner
|
train
|
go
|
c73fc53ded563ef463e7937877a4f8dd3a41d5a9
|
diff --git a/karma.conf.js b/karma.conf.js
index <HASH>..<HASH> 100644
--- a/karma.conf.js
+++ b/karma.conf.js
@@ -67,10 +67,9 @@ module.exports = function(config) {
// Enable / disable watching file and executing tests whenever any file changes
autoWatch: false,
- // If browser does not capture in given timeout [ms], kill it
- captureTimeout: 60000,
-
- // Additional no activity timeout to work with external browsers
+ // Broser connection tolerances
+ browserDisconnectTolerance: 2,
+ browserDisconnectTimeout: 10000,
browserNoActivityTimeout: 60000,
// Continuous Integration mode by default
@@ -79,7 +78,7 @@ module.exports = function(config) {
// Sauce config, requires username and accessKey to be loaded in ENV
sauceLabs: {
testName: 'Restmod Unit Tests',
- startConnect: true
+ startConnect: false
},
// Custom sauce launchers
|
fix(tests): disables sauce config startConnect
|
platanus_angular-restmod
|
train
|
js
|
75765bf5f3421ba3545376f198bcb1d8d77563c1
|
diff --git a/src/components/editor/editor-utils.js b/src/components/editor/editor-utils.js
index <HASH>..<HASH> 100644
--- a/src/components/editor/editor-utils.js
+++ b/src/components/editor/editor-utils.js
@@ -230,14 +230,18 @@ export function getContentObject (el) {
attributes: {}
}
- Array.from(el.attributes, ({name, value}) => {
- if (name === 'style') {
+ if (el.tagName === 'LI') {
+ console.log(getStyleObject(el))
+ }
+ for (let i = 0, n = el.attributes.length, att = el.attributes; i < n; i++) {
+ const { nodeName, nodeValue } = att[i]
+ if (nodeName === 'style') {
node.style = getStyleObject(el)
}
else {
- node.attributes[name] = value
+ node.attributes[nodeName] = nodeValue
}
- })
+ }
const children = Array.from(el.childNodes, getContentObject)
if (children.length === 1 && children[0].nodeType === Node.TEXT_NODE) {
|
feat: Updates for QEditor
|
quasarframework_quasar
|
train
|
js
|
877bba8bad5fa41e8982335be9ac4d17d922ce38
|
diff --git a/src/endpoints/pcm-variations-relationships.js b/src/endpoints/pcm-variations-relationships.js
index <HASH>..<HASH> 100644
--- a/src/endpoints/pcm-variations-relationships.js
+++ b/src/endpoints/pcm-variations-relationships.js
@@ -41,7 +41,7 @@ class PCMVariationsRelationshipsEndpoint {
}
Update(productId, resources) {
- const body = buildRelationshipDatabuildRelationshipData(
+ const body = buildRelationshipData(
'product-variation',
resources,
dasherize
|
fix: typo (#<I>)
|
moltin_js-sdk
|
train
|
js
|
fcd622131e6d9f043353d3bdc83eb9c116b6cf6b
|
diff --git a/packages/cozy-konnector-libs/src/libs/BaseKonnector.js b/packages/cozy-konnector-libs/src/libs/BaseKonnector.js
index <HASH>..<HASH> 100644
--- a/packages/cozy-konnector-libs/src/libs/BaseKonnector.js
+++ b/packages/cozy-konnector-libs/src/libs/BaseKonnector.js
@@ -267,6 +267,7 @@ class BaseKonnector {
while (Date.now() < params.timeout && !account.twoFACode) {
await sleep(params.heartBeat)
account = await cozy.data.find('io.cozy.accounts', this.accountId)
+ log('info', `current accountState : ${account.state}`)
log('info', `current twoFACode : ${account.twoFACode}`)
}
|
feat: log account state when waiting for twofa code
|
konnectors_libs
|
train
|
js
|
ab0e82b105baefcc72719b22af958abb648dd4b1
|
diff --git a/faker.go b/faker.go
index <HASH>..<HASH> 100644
--- a/faker.go
+++ b/faker.go
@@ -206,6 +206,7 @@ var (
ErrMoreArguments = "Passed more arguments than is possible : (%d)"
ErrNotSupportedPointer = "Use sample:=new(%s)\n faker.FakeData(sample) instead"
ErrSmallerThanZero = "Size:%d is smaller than zero."
+ ErrSmallerThanOne = "Size:%d is smaller than one."
ErrUniqueFailure = "Failed to generate a unique value for field \"%s\""
ErrStartValueBiggerThanEnd = "Start value can not be bigger than end value."
@@ -245,8 +246,8 @@ func SetRandomStringLength(size int) error {
// SetRandomMapAndSliceSize sets the size for maps and slices for random generation.
func SetRandomMapAndSliceSize(size int) error {
- if size < 0 {
- return fmt.Errorf(ErrSmallerThanZero, size)
+ if size < 1 {
+ return fmt.Errorf(ErrSmallerThanOne, size)
}
randomSize = size
return nil
|
fix: 0 not valid for random size #<I>
logically invalid to as for a random number between 0 and 0 but more importantly, it panics on the Intn call with `panic: invalid argument to Intn`
|
bxcodec_faker
|
train
|
go
|
7ee390d57b16577797d5961ac31c9ef922f58f60
|
diff --git a/src/Support/Period.php b/src/Support/Period.php
index <HASH>..<HASH> 100644
--- a/src/Support/Period.php
+++ b/src/Support/Period.php
@@ -413,7 +413,7 @@ class Period
*/
public function setStartDateTime(DateTime $startDateTime)
{
- $this->startDateTime = $startDateTime;
+ $this->startDateTime = Carbon::instance($startDateTime);
return $this;
}
@@ -426,7 +426,7 @@ class Period
*/
public function setEndDateTime(DateTime $endDateTime)
{
- $this->endDateTime = $endDateTime;
+ $this->endDateTime = Carbon::instance($endDateTime);
return $this;
}
|
feat: create Carbon instance from DateTime
|
cyrildewit_eloquent-viewable
|
train
|
php
|
b2441158025df1ae0f4b94d4727391a16df1ee6d
|
diff --git a/models/classes/Lists/DataAccess/Repository/DependsOnPropertyRepository.php b/models/classes/Lists/DataAccess/Repository/DependsOnPropertyRepository.php
index <HASH>..<HASH> 100644
--- a/models/classes/Lists/DataAccess/Repository/DependsOnPropertyRepository.php
+++ b/models/classes/Lists/DataAccess/Repository/DependsOnPropertyRepository.php
@@ -24,6 +24,7 @@ namespace oat\tao\model\Lists\DataAccess\Repository;
use core_kernel_classes_Class;
use core_kernel_classes_Property;
+use oat\tao\model\Lists\Business\Contract\ParentPropertyListRepositoryInterface;
use tao_helpers_form_GenerisFormFactory;
use oat\oatbox\service\ConfigurableService;
use oat\tao\model\Lists\Business\Domain\DependsOnProperty;
@@ -142,8 +143,8 @@ class DependsOnPropertyRepository extends ConfigurableService implements Depends
return $this->dependentPropertySpecification;
}
- private function getParentPropertyListUrisRepository(): ParentPropertyListRepository
+ private function getParentPropertyListUrisRepository(): ParentPropertyListRepositoryInterface
{
- return $this->getServiceLocator()->get(ParentPropertyListRepository::class);
+ return $this->getServiceLocator()->get(ParentPropertyListCachedRepository::class);
}
}
|
refactor: use cache repository instead
|
oat-sa_tao-core
|
train
|
php
|
c164952516d0deb0200e48f18f9f9ef5aabc0207
|
diff --git a/src/components/bottomSheet/bottomSheet.js b/src/components/bottomSheet/bottomSheet.js
index <HASH>..<HASH> 100644
--- a/src/components/bottomSheet/bottomSheet.js
+++ b/src/components/bottomSheet/bottomSheet.js
@@ -183,13 +183,14 @@ function MdBottomSheetProvider($$interimElementProvider) {
function onRemove(scope, element, options) {
var bottomSheet = options.bottomSheet;
- if (options.disableParentScroll) {
- options.parent.css('overflow', options.lastOverflow);
- delete options.lastOverflow;
- }
$animate.leave(backdrop);
return $animate.leave(bottomSheet.element).then(function() {
+ if (options.disableParentScroll) {
+ options.parent.css('overflow', options.lastOverflow);
+ delete options.lastOverflow;
+ }
+
bottomSheet.cleanup();
// Restore focus
|
fix(bottomSheet): unset overflow after leave animation completes
as per discussion at <URL>
|
angular_material
|
train
|
js
|
3702ba1bee3bab5ea09b720ff7afaaf70d530a76
|
diff --git a/test/helper.js b/test/helper.js
index <HASH>..<HASH> 100644
--- a/test/helper.js
+++ b/test/helper.js
@@ -58,7 +58,6 @@ ex('sl-build --install --commit');
assert(!test('-e', 'node_modules/debug'), 'dev dep not installed');
assert(test('-e', 'node_modules/node-syslog'), 'prod dep installed');
assert(!test('-e', 'node_modules/node-syslog/build'), 'addons not built');
-assert(which('sl-pm'), 'sl-pm not in path');
assert(which('sl-build'), 'sl-build not in path');
console.log('test/app built succesfully');
|
test: Don't require sl-pm in path
Remove assertion that strong-pm has been installed or linked globally.
|
strongloop_strong-pm
|
train
|
js
|
1bf8d725a91276f2332dd89d8e90feaba8750175
|
diff --git a/tests/acceptance/layouts-test.js b/tests/acceptance/layouts-test.js
index <HASH>..<HASH> 100644
--- a/tests/acceptance/layouts-test.js
+++ b/tests/acceptance/layouts-test.js
@@ -18,7 +18,7 @@ test('visiting /layout-test', function(assert) {
let breakpoints = deviceLayout.get('breakpoints');
let bp = {};
breakpoints.forEach(function(point) {
- bp[point.name] = point.begin + 100;
+ bp[point.name] = point.begin + 5;
});
deviceLayout.set('width', bp.huge);
|
fix(breakpoints-test): breakpoints are now better defined
|
html-next_flexi-layouts
|
train
|
js
|
92e98a1feddec2a905d7d4c312835ab24079effe
|
diff --git a/libs/logger.js b/libs/logger.js
index <HASH>..<HASH> 100644
--- a/libs/logger.js
+++ b/libs/logger.js
@@ -2,7 +2,7 @@ const util = require('util')
util.inspect.defaultOptions.maxArrayLength = null
util.inspect.defaultOptions.colors = true
-const env = process.env.NODE_ENV
+const env = process.env.NODE_ENV || ''
const env2formats = {
'': prodFormat,
production: prodFormat,
|
fix: logger initialization in production environment
|
konnectors_libs
|
train
|
js
|
4b8f7ea2c9bb44ac9bdbd440ef778323d5a66d28
|
diff --git a/module.js b/module.js
index <HASH>..<HASH> 100644
--- a/module.js
+++ b/module.js
@@ -1,16 +1,15 @@
module.exports = require( 'classes' ).Module.extend({
preRoute: function( UserModel, AccountModel ) {
- UserModel.on( 'preQuery', function( options ) {
- var nestedInclude = {
- model : AccountModel._model
- };
+ UserModel.on('beforeAllFindersOptions', function(findOptions, queryOptions, callback) {
+ findOptions.include = findOptions.include || [];
- if ( typeof options.include === 'undefined' ) {
- options.include = [];
- }
- if ( options.include.indexOf( nestedInclude ) === -1 ) {
- options.include.push( nestedInclude );
+ if (!_.findWhere(findOptions.include, { model: AccountModel._model })) {
+ findOptions.include.push({
+ model : AccountModel._model
+ });
}
+
+ callback(null);
});
}
});
\ No newline at end of file
|
fix(findOptions): Updated to use the new hooks
|
CleverStack_clever-accounts
|
train
|
js
|
ce04467d998ddeabdf989bc9193cb85ed8120382
|
diff --git a/nightwatch.js b/nightwatch.js
index <HASH>..<HASH> 100644
--- a/nightwatch.js
+++ b/nightwatch.js
@@ -21,21 +21,21 @@ const launch_url = process.env.NOW_URL || 'https://boltdesignsystem.com';
console.log({ launch_url });
if (process.env.TRAVIS) {
- setCheckRun({
- name: 'Nightwatch',
- status: 'in_progress',
- output: {
- title: 'Nightwatch running...',
- summary: `
- - Url used: ${process.env.NOW_URL}
- `.trim(),
- // details: '',
- },
- })
- .then(results => {
- console.log(`Check run started for Nightwatch: ${results.html_url}`);
- })
- .catch(console.log.bind(console));
+ // setCheckRun({
+ // name: 'Nightwatch',
+ // status: 'in_progress',
+ // output: {
+ // title: 'Nightwatch running...',
+ // summary: `
+ // - Url used: ${process.env.NOW_URL}
+ // `.trim(),
+ // // details: '',
+ // },
+ // })
+ // .then(results => {
+ // console.log(`Check run started for Nightwatch: ${results.html_url}`);
+ // })
+ // .catch(console.log.bind(console));
}
module.exports = {
|
chore: removing initial Nightwatch in_progress call
|
bolt-design-system_bolt
|
train
|
js
|
e152630fe1f0d62e29016447174a6783192ee8dd
|
diff --git a/src/foremast/runner.py b/src/foremast/runner.py
index <HASH>..<HASH> 100644
--- a/src/foremast/runner.py
+++ b/src/foremast/runner.py
@@ -74,7 +74,8 @@ class ForemastRunner:
def plugin_manager(self, service):
"""Wrapper around PluginManager"""
manager = PluginManager(service, self.provider)
- return manager
+ plugin = manager.load()
+ return plugin
def write_configs(self):
"""Generate the configurations needed for pipes."""
@@ -90,8 +91,7 @@ class ForemastRunner:
def create_app(self):
"""Create the spinnaker application."""
utils.banner("Creating Spinnaker App")
- manager = self.plugin_manager('app')
- plugin = manager.load()
+ plugin = self.plugin_manager('app')
spinnakerapp = plugin.SpinnakerApp(
app=self.app,
|
refactor: Simplify plugin manager
|
foremast_foremast
|
train
|
py
|
983a7dfe11e03aab5f595e9308ea1f69a6fabe58
|
diff --git a/config/config.default.js b/config/config.default.js
index <HASH>..<HASH> 100644
--- a/config/config.default.js
+++ b/config/config.default.js
@@ -57,6 +57,7 @@ module.exports = appInfo => {
};
config.security = {
+ xframe: false,
csrf: {
enable: false,
},
|
feat: support iframe (#<I>)
|
macacajs_macaca-datahub
|
train
|
js
|
ef5efaf61bb10a433a83a8db6ee376967e59d6b2
|
diff --git a/lib/mp4/probe.js b/lib/mp4/probe.js
index <HASH>..<HASH> 100644
--- a/lib/mp4/probe.js
+++ b/lib/mp4/probe.js
@@ -123,7 +123,7 @@ startTime = function(timescale, fragment) {
}
return result;
})[0];
- baseTime = baseTime || Infinity;
+ baseTime = typeof baseTime === 'number' && !isNaN(baseTime) ? baseTime : Infinity;
// convert base time to seconds
return baseTime / scale;
|
fix: baseTime 0 is valid (#<I>)
Right now if baseTime is equal to 0 in the tfdt we exclude it from our list of valid start times, which is incorrect. Instead, we have to look for NaN or non-number baseTimes and only exclude those.
Fixes videojs/http-streaming#<I>
|
videojs_mux.js
|
train
|
js
|
262d7fefbb285cd865b6803a63b81566d44368bd
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -13,6 +13,8 @@ Object.assign(
reactNativeElements.reduce((getters, key) => {
const tag = key.toLowerCase()
getters[tag] = glamorous(ReactNativeElementMap[key])
+ // backward compatible camel case
+ getters[camelCase(key)] = getters[tag]
return getters
}, {}),
)
@@ -27,5 +29,9 @@ Object.assign(
}, {}),
)
+function camelCase(tagName) {
+ return tagName.slice(0, 1).toLowerCase() + tagName.slice(1)
+}
+
export default glamorous
export {ThemeProvider, withTheme}
|
feat(glamorous): add camel case aliases to builtin component factories (#<I>)
glamorous.touchablehighlight -> glamorous.touchableHighlight
|
robinpowered_glamorous-native
|
train
|
js
|
13d086b8097f3cf1d2f323509ea66813833557c3
|
diff --git a/test/runner/runner.go b/test/runner/runner.go
index <HASH>..<HASH> 100644
--- a/test/runner/runner.go
+++ b/test/runner/runner.go
@@ -308,6 +308,9 @@ func needsBuild(event Event) bool {
if e, ok := event.(*PullRequestEvent); ok && e.Action == "closed" {
return false
}
+ if e, ok := event.(*PushEvent); ok && e.Deleted {
+ return false
+ }
return true
}
diff --git a/test/runner/types.go b/test/runner/types.go
index <HASH>..<HASH> 100644
--- a/test/runner/types.go
+++ b/test/runner/types.go
@@ -13,6 +13,7 @@ type PushEvent struct {
Ref string `json:"ref"`
After string `json:"after"`
Before string `json:"before"`
+ Deleted bool `json:"deleted"`
Commits []*Commit `json:"commits"`
HeadCommit *Commit `json:"head_commit"`
Repository *Repository `json:"repository"`
|
test: Ignore branch delete events
|
flynn_flynn
|
train
|
go,go
|
e88d0c5f0e54630a99eeb74b0e9fe0c3bd58608f
|
diff --git a/lib/utils/openBrowser.js b/lib/utils/openBrowser.js
index <HASH>..<HASH> 100644
--- a/lib/utils/openBrowser.js
+++ b/lib/utils/openBrowser.js
@@ -20,15 +20,15 @@ function displayManualOpenMessage(url, err) {
}
module.exports = function openBrowser(url) {
- let browser = process.env.BROWSER;
- if (browser === 'none' || isDockerContainer()) {
- return BbPromise.resolve(displayManualOpenMessage(url));
- }
- if (process.platform === 'darwin' && browser === 'open') {
- browser = undefined;
- }
- const options = { wait: false, app: browser };
- return opn(url, options).catch(err => displayManualOpenMessage(url, err));
+ return BbPromise.try(() => {
+ let browser = process.env.BROWSER;
+ if (browser === 'none' || isDockerContainer()) return displayManualOpenMessage(url);
+ if (process.platform === 'darwin' && browser === 'open') {
+ browser = undefined;
+ }
+ const options = { wait: false, app: browser };
+ return opn(url, options).catch(err => displayManualOpenMessage(url, err));
+ });
};
/* eslint-enable no-console */
|
refactor: Ensure async function format
|
serverless_serverless
|
train
|
js
|
de61fe485476102c106eb455d0c5e1f36fbf07df
|
diff --git a/src/sharding/ShardingManager.js b/src/sharding/ShardingManager.js
index <HASH>..<HASH> 100644
--- a/src/sharding/ShardingManager.js
+++ b/src/sharding/ShardingManager.js
@@ -301,12 +301,12 @@ class ShardingManager extends EventEmitter {
/**
* Kills all running shards and respawns them.
* @param {MultipleShardRespawnOptions} [options] Options for respawning shards
- * @returns {Promise<Collection<string, Shard>>}
+ * @returns {Promise<Collection<number, Shard>>}
*/
async respawnAll({ shardDelay = 5_000, respawnDelay = 500, timeout = 30_000 } = {}) {
let s = 0;
for (const shard of this.shards.values()) {
- const promises = [shard.respawn({ respawnDelay, timeout })];
+ const promises = [shard.respawn({ delay: respawnDelay, timeout })];
if (++s < this.shards.size && shardDelay > 0) promises.push(sleep(shardDelay));
await Promise.all(promises); // eslint-disable-line no-await-in-loop
}
|
fix(ShardingManager): fix respawnAll not passing delay correctly (#<I>)
|
discordjs_discord.js
|
train
|
js
|
981907c596c0cf0f70f696d1b0af6c5499f90928
|
diff --git a/javascript-i18n-library.js b/javascript-i18n-library.js
index <HASH>..<HASH> 100644
--- a/javascript-i18n-library.js
+++ b/javascript-i18n-library.js
@@ -127,7 +127,7 @@
case 'CHF':
return 'CHF';
default:
- return 'NO CURRENCY';
+ return '¤';
}
};
|
feat(Currency): Use a default symbol when no currency matches instead of a long string to be more consistent with the other symbols
|
iadvize_javascript-i18n-library
|
train
|
js
|
0ba505ca0248a64f71522b99faa421199b3dc369
|
diff --git a/packages/@vue/cli-plugin-eslint/index.js b/packages/@vue/cli-plugin-eslint/index.js
index <HASH>..<HASH> 100644
--- a/packages/@vue/cli-plugin-eslint/index.js
+++ b/packages/@vue/cli-plugin-eslint/index.js
@@ -53,7 +53,10 @@ module.exports = (api, options) => {
emitWarning: allWarnings,
// only emit errors in production mode.
emitError: allErrors,
- eslintPath: path.dirname(resolveModule('eslint/package.json', cwd)),
+ eslintPath: path.dirname(
+ resolveModule('eslint/package.json', cwd) ||
+ resolveModule('eslint/package.json', __dirname)
+ ),
formatter: loadModule('eslint/lib/formatters/codeframe', cwd, true)
})
})
|
fix: fix eslint path resolution in `vue serve` (#<I>)
fixes #<I>
|
vuejs_vue-cli
|
train
|
js
|
9dbf37af2b03c5b18c9940e1e849c4d282b6766d
|
diff --git a/src/Keboola/GenericExtractor/Subscriber/UrlSignature.php b/src/Keboola/GenericExtractor/Subscriber/UrlSignature.php
index <HASH>..<HASH> 100755
--- a/src/Keboola/GenericExtractor/Subscriber/UrlSignature.php
+++ b/src/Keboola/GenericExtractor/Subscriber/UrlSignature.php
@@ -19,6 +19,10 @@ class UrlSignature extends AbstractSignature implements SubscriberInterface
protected function addSignature(RequestInterface $request)
{
$authQuery = call_user_func($this->generator, $this->getRequestAndQuery($request));
- $rQuery = $request->getQuery()->merge($authQuery);
+ foreach($authQuery as $key => $value) {
+ if(!$request->getQuery()->hasKey($key)) {
+ $request->getQuery()->set($key, $value);
+ }
+ }
}
}
|
fix: Query auth now doesn't overwrite params from request
|
keboola_generic-extractor
|
train
|
php
|
c1c66d2d0ab552bffc019fb6d35971707010d234
|
diff --git a/.make-compat-package.js b/.make-compat-package.js
index <HASH>..<HASH> 100644
--- a/.make-compat-package.js
+++ b/.make-compat-package.js
@@ -18,6 +18,7 @@ const ROOT = 'dist-compat/';
const CJS_ROOT = ROOT + 'cjs/compat/';
const ESM5_ROOT = ROOT + 'esm5/compat/';
const ESM2015_ROOT = ROOT + 'esm2015/compat/';
+const GLOBAL_ROOT = ROOT + 'global/';
const TYPE_ROOT = ROOT + 'typings/compat/';
const PKG_ROOT = ROOT + 'package/';
const CJS_PKG = PKG_ROOT + '';
@@ -43,5 +44,7 @@ copySources(ESM5_ROOT, ESM5_PKG, true);
cleanSourceMapRoot(ESM5_PKG, SRC_ROOT_PKG);
copySources(ESM2015_ROOT, ESM2015_PKG, true);
cleanSourceMapRoot(ESM2015_PKG, SRC_ROOT_PKG);
+copySources(GLOBAL_ROOT, UMD_PKG, true);
+cleanSourceMapRoot(UMD_PKG, SRC_ROOT_PKG);
fs.copySync('compat/package.json', PKG_ROOT + '/package.json');
|
chore(build): Copy compat bundle output into package (#<I>)
Previously the bundles were left behind in `dist-compat` but never copied into `dist-compat/package` prior to publish. This ensures the bundles are part of the compat release.
|
ReactiveX_rxjs
|
train
|
js
|
68e5a56eaf5372ca9261f04e5e87d1361424fa9d
|
diff --git a/source/rafcon/gui/models/meta.py b/source/rafcon/gui/models/meta.py
index <HASH>..<HASH> 100644
--- a/source/rafcon/gui/models/meta.py
+++ b/source/rafcon/gui/models/meta.py
@@ -9,7 +9,7 @@
# Franz Steinmetz <franz.steinmetz@dlr.de>
# Sebastian Brunner <sebastian.brunner@dlr.de>
-
+import hashlib
from gtkmvc import ModelMT, Signal
from rafcon.utils.vividict import Vividict
@@ -110,3 +110,21 @@ class MetaModel(ModelMT):
meta_gui = meta_gui[key]
return self.get_meta_data_editor(for_gaphas=from_gaphas)
+
+ def meta_data_hash(self, obj_hash=None):
+ """Creates a hash with the meta data of the model
+
+ :param obj_hash: The hash object (see Python hashlib)
+ :return: The updated hash object
+ """
+ if obj_hash is None:
+ obj_hash = hashlib.sha256()
+ self.update_meta_data_hash(obj_hash)
+ return obj_hash
+
+ def update_meta_data_hash(self, obj_hash):
+ """Should be implemented by derived classes to update the hash with their meta data fields
+
+ :param obj_hash: The hash object (see Python hashlib)
+ """
+ self.update_hash_from_dict(obj_hash, self.meta)
|
feat(MetaModel): Methods to calculate meta data hash
|
DLR-RM_RAFCON
|
train
|
py
|
ce959593656f13d4429f0ab0e04cf57874e97a40
|
diff --git a/module.flow.js b/module.flow.js
index <HASH>..<HASH> 100644
--- a/module.flow.js
+++ b/module.flow.js
@@ -60,7 +60,7 @@ declare module '@solana/web3.js' {
getFinality(): Promise<number>;
requestAirdrop(to: PublicKey, amount: number): Promise<TransactionSignature>;
sendTransaction(from: Account, transaction: Transaction): Promise<TransactionSignature>;
- onAccountChange(publickey: PublicKey, callback: AccountChangeCallback): Promise<number>;
+ onAccountChange(publickey: PublicKey, callback: AccountChangeCallback): number;
removeAccountChangeListener(id: number): Promise<void>;
}
|
fix(flow): correct onAccountChange prototype
|
solana-labs_solana-web3.js
|
train
|
js
|
bd2613e9c8c22bebc1437f7f6ca71aaef5f68863
|
diff --git a/ecs.php b/ecs.php
index <HASH>..<HASH> 100644
--- a/ecs.php
+++ b/ecs.php
@@ -6,10 +6,9 @@ use PHP_CodeSniffer\Standards\Squiz\Sniffs\Classes\ValidClassNameSniff;
use PHP_CodeSniffer\Standards\Squiz\Sniffs\Commenting\ClassCommentSniff;
use PHP_CodeSniffer\Standards\Squiz\Sniffs\Commenting\FileCommentSniff;
use PHP_CodeSniffer\Standards\Squiz\Sniffs\Commenting\FunctionCommentThrowTagSniff;
-use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
use Symplify\EasyCodingStandard\ValueObject\Option;
-return static function (ContainerConfigurator $containerConfigurator): void {
+return static function (\Symplify\EasyCodingStandard\Config\ECSConfig $containerConfigurator): void {
$parameters = $containerConfigurator->parameters();
$parameters->set(Option::PATHS, [
__DIR__ . '/src',
|
chore: changed to new style of ecs config
|
whatwedo_CoreBundle
|
train
|
php
|
9344330f5f84ce9e3e0aac69e9714462495f4f78
|
diff --git a/renku/_compat.py b/renku/_compat.py
index <HASH>..<HASH> 100644
--- a/renku/_compat.py
+++ b/renku/_compat.py
@@ -17,10 +17,20 @@
# limitations under the License.
"""Compatibility layer for different Python versions."""
-try:
- from pathlib import Path
-except ImportError: # pragma: no cover
- from pathlib2 import Path
+import os
+import sys
+from pathlib import Path
+
+if sys.version_info < (3, 6):
+ original_resolve = Path.resolve
+
+ def resolve(self, strict=False):
+ """Support strict parameter."""
+ if strict:
+ return original_resolve(self)
+ return Path(os.path.realpath(os.path.abspath(str(self))))
+
+ Path.resolve = resolve
try:
FileNotFoundError
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -43,7 +43,6 @@ tests_require = [
]
extras_require = {
- ':python_version<"3.6"': ['pathlib2>=2.3.0'],
'docs': [
'Sphinx>=1.6.3',
'renku-sphinx-theme>=0.1.0',
|
fix(compat): support strict param in path.resolve
Improves compatibility of pathlib.Path.resolve method on Python <I>.
|
SwissDataScienceCenter_renku-python
|
train
|
py,py
|
ae0287f3337c980a0512b472f3009368d866eef4
|
diff --git a/xod-core/src/project/selectors.js b/xod-core/src/project/selectors.js
index <HASH>..<HASH> 100644
--- a/xod-core/src/project/selectors.js
+++ b/xod-core/src/project/selectors.js
@@ -530,7 +530,7 @@ export const getPatchIOPin = (node, i) => {
nodeId: node.id,
pinLabel: node.properties.pinLabel,
label: node.properties.label,
- key: `${dir}_${node.id}`,
+ key: node.id,
direction: dir,
type: pin.type,
index: i,
|
refactor(patchNodes): remove direction from pin keys of patch nodes
|
xodio_xod
|
train
|
js
|
5d297a77908375b76929e0c8081977c3016ea7d6
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -41,7 +41,7 @@ exports.interfaceVersion = 2;
* @param {object} options - the resolver options
* @return {object}
*/
-exports.resolve = (source, file, options) => {
+exports.resolve = (source, file, options = {}) => {
if (resolve.isCore(source)) return { found: true, path: null };
const projectRootDir = path.dirname(pkgUp.sync(file));
|
fix: Prevents `options.extensions` from failing when `options` is `null` (#<I>)
|
tleunen_eslint-import-resolver-babel-module
|
train
|
js
|
d4eb1a27f713737ba0614475fcf34eb68077d74b
|
diff --git a/src/Views.php b/src/Views.php
index <HASH>..<HASH> 100644
--- a/src/Views.php
+++ b/src/Views.php
@@ -159,7 +159,7 @@ class Views
$cacheKey = $this->makeCacheKey($this->period, $this->unique, $this->collection);
- if ($this->shouldCache) {
+ if ($this->shouldCache()) {
$cachedViewsCount = $this->cache->get($cacheKey);
// Return cached views count if it exists
@@ -180,7 +180,7 @@ class Views
$viewsCount = $query->count();
}
- if ($this->shouldCache) {
+ if ($this->shouldCache()) {
$this->cache->put($cacheKey, $viewsCount, $this->cacheLifetime);
}
@@ -349,6 +349,16 @@ class Views
}
/**
+ * Determine if we should cache the views count.
+ *
+ * @return bool
+ */
+ protected function shouldCache()
+ {
+ return $this->shouldCache;
+ }
+
+ /**
* Resolve the viewable query builder instance.
*
* @return
|
refactor: add dedicated shouldCache method
|
cyrildewit_eloquent-viewable
|
train
|
php
|
a4657b56184375d374c71dd39b3d6a2531c95a32
|
diff --git a/memote/support/basic.py b/memote/support/basic.py
index <HASH>..<HASH> 100644
--- a/memote/support/basic.py
+++ b/memote/support/basic.py
@@ -250,7 +250,6 @@ def find_oxygen_reactions(model):
def find_unique_metabolites(model):
"""Return set of metabolite IDs without duplicates from compartments."""
- # TODO: BiGG specific (met_c).
return set(met.id.split("_", 1)[0] for met in model.metabolites)
|
docs: remove wrong TODO comment.
|
opencobra_memote
|
train
|
py
|
6b1921f59e1105499a329ab3aaf6134e7fb0ff6c
|
diff --git a/lib/cli/resolve-input.js b/lib/cli/resolve-input.js
index <HASH>..<HASH> 100644
--- a/lib/cli/resolve-input.js
+++ b/lib/cli/resolve-input.js
@@ -7,7 +7,7 @@ const parseArgs = require('./parse-args');
const baseArgsSchema = {
boolean: new Set(['version', 'help', 'help-interactive', 'v']),
- string: new Set(['config']),
+ string: new Set(['app', 'config', 'org']),
alias: new Map([
['c', 'config'],
['h', 'help'],
|
refactor(CLI): Recognize "app" and "org" params
|
serverless_serverless
|
train
|
js
|
9c662acd58dafcf551d88c353f9d38ed36a3997b
|
diff --git a/lib/espresso-runner.js b/lib/espresso-runner.js
index <HASH>..<HASH> 100644
--- a/lib/espresso-runner.js
+++ b/lib/espresso-runner.js
@@ -243,6 +243,10 @@ class EspressoRunner {
let hasSocketError = false;
// start the instrumentation process
+ this.jwproxy.instrumentationState = {
+ exited: false,
+ crashed: false,
+ };
this.instProcess = this.adb.createSubProcess(cmd);
this.instProcess.on('exit', (code, signal) => {
logger.info(`Instrumentation process exited with code ${code} from signal ${signal}`);
|
fix: Reset instrumentation state before starting a new instance (#<I>)
|
appium_appium-espresso-driver
|
train
|
js
|
9df19e8bc862901884c97eb8dec2acbbe3641603
|
diff --git a/src/global/money/money.test.js b/src/global/money/money.test.js
index <HASH>..<HASH> 100644
--- a/src/global/money/money.test.js
+++ b/src/global/money/money.test.js
@@ -70,12 +70,12 @@ describe('ui-money-mask', function() {
it('shold allow string as definition of decimals', angular.mock.inject(function($rootScope) {
var input = TestUtil.compile('<input ng-model="model" ui-money-mask="decimals">', {
model: '3456.79',
- decimals: "2"
+ decimals: '2'
});
var model = input.controller('ngModel');
expect(model.$viewValue).toBe('$ 3,456.79');
- $rootScope.decimals = "3";
+ $rootScope.decimals = '3';
$rootScope.$digest();
expect(model.$viewValue).toBe('$ 345.679');
}));
|
style(uiMoneyMask): change double quotes to single quotes
|
assisrafael_angular-input-masks
|
train
|
js
|
1e26c649129376c1986e70f5a59bd8cc3f9b7ba1
|
diff --git a/lib/routes/admin-api/util.js b/lib/routes/admin-api/util.js
index <HASH>..<HASH> 100644
--- a/lib/routes/admin-api/util.js
+++ b/lib/routes/admin-api/util.js
@@ -26,13 +26,17 @@ const nameType = customJoi
const handleErrors = (res, logger, error) => {
logger.warn(error.message);
+ // eslint-disable-next-line no-param-reassign
+ error.isJoi = true;
switch (error.name) {
case 'NotFoundError':
return res.status(404).end();
case 'NameExistsError':
+ return res
+ .status(409)
+ .json(error)
+ .end();
case 'ValidationError':
- // eslint-disable-next-line no-param-reassign
- error.isJoi = true;
return res
.status(400)
.json(error)
|
fix: Name conflict should return <I>
closes #<I>
|
Unleash_unleash
|
train
|
js
|
31a85096aa29a16168cce019cabccfc524c76da8
|
diff --git a/lib/build/webpack-config.js b/lib/build/webpack-config.js
index <HASH>..<HASH> 100644
--- a/lib/build/webpack-config.js
+++ b/lib/build/webpack-config.js
@@ -3,6 +3,7 @@ const
path = require('path'),
chalk = require('chalk'),
webpack = require('webpack'),
+ merge = require('webpack-merge'),
ProgressBarPlugin = require('progress-bar-webpack-plugin'),
HtmlWebpackPlugin = require('html-webpack-plugin')
|
fix: Add missing dep in webpack-config
|
quasarframework_quasar-cli
|
train
|
js
|
79b6340d6ced0ad62628de6e51dce18d50a5be9f
|
diff --git a/lib/cli-engine/cli-engine.js b/lib/cli-engine/cli-engine.js
index <HASH>..<HASH> 100644
--- a/lib/cli-engine/cli-engine.js
+++ b/lib/cli-engine/cli-engine.js
@@ -408,7 +408,7 @@ function isErrorMessage(message) {
* a directory or looks like a directory (ends in `path.sep`), in which case the file
* name will be the `cacheFile/.cache_hashOfCWD`
*
- * if cacheFile points to a file or looks like a file then in will just use that file
+ * if cacheFile points to a file or looks like a file then it will just use that file
* @param {string} cacheFile The name of file to be used to store the cache
* @param {string} cwd Current working directory
* @returns {string} the resolved path to the cache file
|
chore: fixed typo in client-Engine (#<I>)
|
eslint_eslint
|
train
|
js
|
a93380570d99e1260fcd47c6d7380c95b58f6e7a
|
diff --git a/vendor/joomla/libraries/joomla/user/authentication.php b/vendor/joomla/libraries/joomla/user/authentication.php
index <HASH>..<HASH> 100644
--- a/vendor/joomla/libraries/joomla/user/authentication.php
+++ b/vendor/joomla/libraries/joomla/user/authentication.php
@@ -115,6 +115,9 @@ class JAuthentication extends JObservable
$className = 'plg'.$plugin->type.$plugin->name;
if (class_exists( $className )) {
$plugin = new $className($this, (array)$plugin);
+ } else {
+ //the plugin class doesn't exists then skip
+ continue;
}
// Try to authenticate
|
fix: if the plugin class doesn't exist then skip instead of calling methods on stdclass
|
anahitasocial_anahita
|
train
|
php
|
d75ae0f14f28c2c9e994aa870b7f370eb119bacf
|
diff --git a/packages/ui-toolkit/src/base/global.js b/packages/ui-toolkit/src/base/global.js
index <HASH>..<HASH> 100644
--- a/packages/ui-toolkit/src/base/global.js
+++ b/packages/ui-toolkit/src/base/global.js
@@ -26,6 +26,7 @@ export default ({ theme }) => css`
padding: 0;
background: ${theme.background};
color: ${theme.text};
+ -webkit-font-smoothing: antialiased;
}
html,
|
feat(instances): Adds font antialiasing. closes #<I>
|
yldio_joyent-portal
|
train
|
js
|
c9b2066053de2a80391e2dff66f20150df36b069
|
diff --git a/apps/pattern-lab/.boltrc.js b/apps/pattern-lab/.boltrc.js
index <HASH>..<HASH> 100644
--- a/apps/pattern-lab/.boltrc.js
+++ b/apps/pattern-lab/.boltrc.js
@@ -8,6 +8,7 @@ module.exports = {
startPath: 'pattern-lab/index.html',
plConfigFile: './config/config.yml',
verbosity: 1,
+ schemaErrorReporting: 'cli',
webpackDevServer: true,
extraTwigNamespaces: {
'bolt': {
|
feat: Set schema error reporting to cli for pattern lab (BDS-<I>)
|
bolt-design-system_bolt
|
train
|
js
|
c0351143c14c54429c125b90f39b6daf503aa0a1
|
diff --git a/src/anyconfig/globals/datatypes.py b/src/anyconfig/globals/datatypes.py
index <HASH>..<HASH> 100644
--- a/src/anyconfig/globals/datatypes.py
+++ b/src/anyconfig/globals/datatypes.py
@@ -27,6 +27,6 @@ class IOInfo(typing.NamedTuple):
extension: str
-IOI_KEYS: typing.Tuple[typing.Optional[typing.Any]] = IOInfo._fields
+IOI_KEYS: typing.Tuple[str, ...] = IOInfo._fields
# vim:sw=4:ts=4:et:
|
fix: correct an wrong type hint to .globals.IOI_KEYS
|
ssato_python-anyconfig
|
train
|
py
|
455350176c87a53e1eab8ae849370b1938cfbb58
|
diff --git a/routes/account.js b/routes/account.js
index <HASH>..<HASH> 100644
--- a/routes/account.js
+++ b/routes/account.js
@@ -168,7 +168,11 @@ function accountRoutes (server, options, next) {
method: 'DELETE',
path: '/session/account',
config: {
- auth: false
+ auth: false,
+ validate: {
+ query: validations.accountQuery,
+ failAction: joiFailAction
+ }
},
handler: function (request, reply) {
var sessionId = toBearerToken(request)
|
fix(routes): DELETE /session/account?include=foobar
* * *
This commit was sponsored by Neighbourhoodie
You can hire Neighbourhoodie for all your
Hoodie / CouchDB / Offline First needs
<URL>
|
hoodiehq_hoodie-account-server
|
train
|
js
|
3c4d2b8ca1b0d7ec24c3c5ed9fc0518a039b3dec
|
diff --git a/pkg/services/alerting/notifier.go b/pkg/services/alerting/notifier.go
index <HASH>..<HASH> 100644
--- a/pkg/services/alerting/notifier.go
+++ b/pkg/services/alerting/notifier.go
@@ -73,11 +73,19 @@ type WebhookNotifier struct {
func (this *WebhookNotifier) Dispatch(alertResult *AlertResult) {
this.log.Info("Sending webhook")
+
+ bodyJSON := simplejson.New()
+ bodyJSON.Set("name", alertResult.AlertJob.Rule.Name)
+ bodyJSON.Set("state", alertResult.State)
+ bodyJSON.Set("trigged", alertResult.TriggeredAlerts)
+
+ body, _ := bodyJSON.MarshalJSON()
+
cmd := &m.SendWebhook{
Url: this.Url,
User: this.User,
Password: this.Password,
- Body: alertResult.Description,
+ Body: string(body),
}
bus.Dispatch(cmd)
|
feat(alerting): add basic body for webhooks
|
grafana_grafana
|
train
|
go
|
00a1eb2b82e5b3f14fafc0a80384f1fab8192aed
|
diff --git a/lib/config/protractor.js b/lib/config/protractor.js
index <HASH>..<HASH> 100644
--- a/lib/config/protractor.js
+++ b/lib/config/protractor.js
@@ -4,8 +4,7 @@ module.exports = function(_, path, grunt) {// jshint ignore: line
var capabilities = [];
grunt.config('angularToolbox.e2eBrowsers').forEach(function(browser) {
capabilities.push({
- browserName: browser.toLowerCase(),
- platform: 'OS X 10.10'
+ browserName: browser.toLowerCase()
});
});
|
chore: stop requireing OSX for protractor tests
|
Jimdo_grunt-angular-toolbox
|
train
|
js
|
368ee1cae1e6b5c1680e980c60c546b17639036c
|
diff --git a/gh-pages-publish.js b/gh-pages-publish.js
index <HASH>..<HASH> 100755
--- a/gh-pages-publish.js
+++ b/gh-pages-publish.js
@@ -5,6 +5,10 @@
var ghpages = require('gh-pages');
var path = require('path');
-ghpages.publish(path.join(__dirname, 'demo-build'), function(err) {
- console.log(err);
+ghpages.publish(path.join(__dirname, 'demo-build'), function (err) {
+ if (err) {
+ console.log('Error while publish gh-pages');
+ throw err;
+ }
+ console.log('gh-pages published successfully');
});
|
chore(gh-pages): added better logging
|
valor-software_ngx-bootstrap
|
train
|
js
|
6cd783eafc9ccca02cea3d5d594112c7b922d216
|
diff --git a/packages/base-element/src/lib/decorators.js b/packages/base-element/src/lib/decorators.js
index <HASH>..<HASH> 100644
--- a/packages/base-element/src/lib/decorators.js
+++ b/packages/base-element/src/lib/decorators.js
@@ -378,8 +378,7 @@ const jsonSchemaPropsDecorator = clazz => {
props[propName] = {
type: propType,
- reflect:
- property.type === 'boolean' || property.reflect ? true : false,
+ reflect: property.reflect ? true : false,
attribute: paramCase(propName),
};
}
|
feat: do not force booleans to reflect
|
bolt-design-system_bolt
|
train
|
js
|
5b9acf23c65fe457739c20e8f27586c1d3ec149c
|
diff --git a/lib/fetch/util.js b/lib/fetch/util.js
index <HASH>..<HASH> 100644
--- a/lib/fetch/util.js
+++ b/lib/fetch/util.js
@@ -195,7 +195,7 @@ function appendFetchMetadata (httpRequest) {
header = httpRequest.mode
// 4. Set a structured field value `Sec-Fetch-Mode`/header in r’s header list.
- httpRequest.headersList.append('sec-fetch-mode', header)
+ httpRequest.headersList.set('sec-fetch-mode', header)
// https://w3c.github.io/webappsec-fetch-metadata/#sec-fetch-site-header
// TODO
|
fix(fetch): set don't append sec-fetch-mode
|
mcollina_undici
|
train
|
js
|
3ff0349e0c553918ebc64b49de8427e482f01d4f
|
diff --git a/test/android-sdk.js b/test/android-sdk.js
index <HASH>..<HASH> 100644
--- a/test/android-sdk.js
+++ b/test/android-sdk.js
@@ -6,6 +6,7 @@
require("../src/Config").setSilentConsole(true);
var Console = require("../src/Console");
var AndroidSDK = require("../src/AndroidSDK");
+var ShellJS = require("shelljs");
exports.tests = {
@@ -66,6 +67,9 @@ exports.tests = {
// TODO create test project in tmp and test path.
test.equal(true, true);
test.done();
+
+ // Clean up removing project skeleton directory.
+ ShellJS.rm('-rf', path);
}
});
});
|
test: In android-sdk.js::generateProjectTemplate() cleanup after test
Remove the generated project skeleton in com.example.Foo/ so repeatedly
running the test does not fail on an already existing directory.
|
crosswalk-project_crosswalk-app-tools
|
train
|
js
|
ab46cd5672e96865997c0f53d8dc59e7cb0ccb09
|
diff --git a/renku/ui/service/serializers/cache.py b/renku/ui/service/serializers/cache.py
index <HASH>..<HASH> 100644
--- a/renku/ui/service/serializers/cache.py
+++ b/renku/ui/service/serializers/cache.py
@@ -115,7 +115,7 @@ class ProjectCloneContext(RepositoryCloneRequest):
def set_missing_id(self, data, **kwargs):
"""Set project_id when missing."""
if not data.get("project_id"):
- data["project_id"] = lambda: uuid.uuid4().hex
+ data["project_id"] = uuid.uuid4().hex
return data
|
fix(service): fix project_id not being autogenerated if missing in request schema (#<I>)
|
SwissDataScienceCenter_renku-python
|
train
|
py
|
d6419aa86d6ad385e15d685bf47242bb6c67653e
|
diff --git a/gitlab/tests/test_gitlab.py b/gitlab/tests/test_gitlab.py
index <HASH>..<HASH> 100644
--- a/gitlab/tests/test_gitlab.py
+++ b/gitlab/tests/test_gitlab.py
@@ -673,14 +673,15 @@ class TestGitlab(unittest.TestCase):
self.assertEqual(status.emoji, "thumbsup")
def test_todo(self):
- todo_content = open(os.path.dirname(__file__) + "/data/todo.json", "r").read()
- json_content = json.loads(todo_content)
+ with open(os.path.dirname(__file__) + "/data/todo.json", "r") as json_file:
+ todo_content = json_file.read()
+ json_content = json.loads(todo_content)
+ encoded_content = todo_content.encode("utf-8")
@urlmatch(scheme="http", netloc="localhost", path="/api/v4/todos", method="get")
def resp_get_todo(url, request):
headers = {"content-type": "application/json"}
- content = todo_content.encode("utf-8")
- return response(200, content, headers, None, 5, request)
+ return response(200, encoded_content, headers, None, 5, request)
@urlmatch(
scheme="http",
|
test: remove warning about open files from test_todo()
When running unittests python warns that the json file from test_todo()
was still open. Use with to open, read, and create encoded json data
that is used by resp_get_todo().
|
python-gitlab_python-gitlab
|
train
|
py
|
d193d04cea862e2db84ac40226cfdbdb39be46d5
|
diff --git a/src/structures/Webhook.js b/src/structures/Webhook.js
index <HASH>..<HASH> 100644
--- a/src/structures/Webhook.js
+++ b/src/structures/Webhook.js
@@ -90,7 +90,7 @@ class Webhook {
* The source guild of the webhook
* @type {?(Guild|APIGuild)}
*/
- this.sourceGuild = this.client.guilds?._add(data.source_guild, false) ?? data.source_guild;
+ this.sourceGuild = this.client.guilds?.resolve(data.source_guild.id) ?? data.source_guild;
} else {
this.sourceGuild ??= null;
}
|
fix(Webhook): Resolve source guild only if cached (#<I>)
|
discordjs_discord.js
|
train
|
js
|
195b837a21b845a05107971bd65665878f195e22
|
diff --git a/ommprotocol/utils.py b/ommprotocol/utils.py
index <HASH>..<HASH> 100644
--- a/ommprotocol/utils.py
+++ b/ommprotocol/utils.py
@@ -76,7 +76,7 @@ def timed_input(prompt, timeout=300.0):
astring = None
try:
timer.start()
- astring = raw_input(prompt)
+ astring = raw_input()
except KeyboardInterrupt:
pass
timer.cancel()
|
fix: user prompt on emergency recovery was printed twice
|
insilichem_ommprotocol
|
train
|
py
|
9dcfcff548f2e101bb5de1c24f9a0629471d11e6
|
diff --git a/build-tools/gulp-tasks/build-webpack/webpack.config.js b/build-tools/gulp-tasks/build-webpack/webpack.config.js
index <HASH>..<HASH> 100644
--- a/build-tools/gulp-tasks/build-webpack/webpack.config.js
+++ b/build-tools/gulp-tasks/build-webpack/webpack.config.js
@@ -33,8 +33,6 @@ const defaultConfig = {
// entry: './src/index.js',
entry: {
'critical-fonts': './src/_patterns/02-components/bolt-critical-fonts/src/critical-fonts',
-
- 'critical-fonts': './src/_patterns/02-components/bolt-button/src/button',
// './src/components/bolt-icon/dist/icon': [
// // './src/scripts/native-shim.js', //Wrapper for custom-elements-es5-adapter.js so this doesn't break in other browsers like IE11
// // './node_modules/@webcomponents/webcomponentsjs/webcomponents-lite.js',
|
fix: revert webpack config update -- no longer needed.
|
bolt-design-system_bolt
|
train
|
js
|
4cc87cb68db95e6a84c838dd066bfab8ddcb5d9c
|
diff --git a/services/datalad/datalad_service/common/s3.py b/services/datalad/datalad_service/common/s3.py
index <HASH>..<HASH> 100644
--- a/services/datalad/datalad_service/common/s3.py
+++ b/services/datalad/datalad_service/common/s3.py
@@ -92,7 +92,7 @@ def validate_s3_config(dataset_path, realm):
# get annex options for s3 bucket
try:
remote_log = subprocess.run(['git', 'cat-file', '-p', 'git-annex:remote.log'],
- cwd=dataset_path, capture_output=True, check=True)
+ cwd=dataset_path, capture_output=True, check=True, encoding='utf-8')
except subprocess.CalledProcessError as err:
if err.returncode == 128:
# git-annex:remote.log is most likely not created yet, skip validation
|
fix: Correctly decode reading remote.log
|
OpenNeuroOrg_openneuro
|
train
|
py
|
ab5fa7b1e2f857afbff7f6a66644c9540104f1a2
|
diff --git a/src/ODataResource.js b/src/ODataResource.js
index <HASH>..<HASH> 100644
--- a/src/ODataResource.js
+++ b/src/ODataResource.js
@@ -12,7 +12,7 @@ function hook(resource, pos, fn) {
/*eslint-disable */
method.map((curr) => {
if (resource._hooks[curr][pos]) {
- const _fn = resource._hooks[method][pos];
+ const _fn = resource._hooks[curr][pos];
resource._hooks[curr][pos] = (...args) => {
_fn.apply(resource, args);
fn.apply(resource, args);
|
fix(resource): cant set `all hook` over 1 more function for a resource.
|
TossShinHwa_node-odata
|
train
|
js
|
ac71927eb2e2de59bae1707b31c04a8dbc36b249
|
diff --git a/matchers/image.go b/matchers/image.go
index <HASH>..<HASH> 100644
--- a/matchers/image.go
+++ b/matchers/image.go
@@ -83,7 +83,7 @@ func CR2(buf []byte) bool {
}
func Tiff(buf []byte) bool {
- return len(buf) > 3 &&
+ return len(buf) > 9 &&
((buf[0] == 0x49 && buf[1] == 0x49 && buf[2] == 0x2A && buf[3] == 0x0) ||
(buf[0] == 0x4D && buf[1] == 0x4D && buf[2] == 0x0 && buf[3] == 0x2A)) &&
// Differentiate Tiff from CR2
|
fix(tiff): check min length
|
h2non_filetype
|
train
|
go
|
c42fa6083818ef39dcc014d269a6caee710ba8f8
|
diff --git a/lib/main.js b/lib/main.js
index <HASH>..<HASH> 100644
--- a/lib/main.js
+++ b/lib/main.js
@@ -36,6 +36,10 @@ function addBuiltins(store) {
store.add(new Interface('CallbackGame', {
description: 'A placeholder, currently holds no information. Use BotFather to set up your game.',
}))
+ store.add(new Interface('InputFile', {
+ description: 'This object represents the contents of a file to be uploaded. '
+ + 'Must be posted using multipart/form-data in the usual way that files are uploaded via the browser.',
+ }))
// TODO: remove after parse UNIONS
store.add(new Union('InputMessageContent', {
description: 'This object represents the content of a message to be sent as a result of an inline query.',
|
feat: Add InputFile manually
|
sergeysova_telegram-typings
|
train
|
js
|
9f7fc0808e475d2aff93a548ef7edc5b7ef26fe0
|
diff --git a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/CustomResource.java b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/CustomResource.java
index <HASH>..<HASH> 100644
--- a/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/CustomResource.java
+++ b/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/CustomResource.java
@@ -145,7 +145,7 @@ public abstract class CustomResource<S extends KubernetesResource, T extends Kub
public static String getSingular(Class<? extends CustomResource> clazz) {
final Singular fromAnnotation = clazz.getAnnotation(Singular.class);
- return (fromAnnotation != null ? fromAnnotation.value().toLowerCase(Locale.ROOT) : HasMetadata.getKind(clazz)).toLowerCase(Locale.ROOT);
+ return (fromAnnotation != null ? fromAnnotation.value() : HasMetadata.getKind(clazz)).toLowerCase(Locale.ROOT);
}
@JsonIgnore
|
refactor: apply toLowerCase to both branches
|
fabric8io_kubernetes-client
|
train
|
java
|
433d4523198c0fa764b42c9b1de538c23617dd3f
|
diff --git a/packages/vaex-core/vaex/dataset.py b/packages/vaex-core/vaex/dataset.py
index <HASH>..<HASH> 100644
--- a/packages/vaex-core/vaex/dataset.py
+++ b/packages/vaex-core/vaex/dataset.py
@@ -1067,9 +1067,6 @@ class Dataset(object):
arguments = _ensure_strings_from_expressions(arguments)
return lazy_function(*arguments)
-
-
-
def unique(self, expression):
def map(ar): # this will be called with a chunk of the data
return np.unique(ar) # returns the unique elements
|
fix: Dataset.apply removed print statements and dead code
|
vaexio_vaex
|
train
|
py
|
2ba7d653eeb029644c75598bcb241ef2b2328283
|
diff --git a/src/elements/chips/Chips.spec.js b/src/elements/chips/Chips.spec.js
index <HASH>..<HASH> 100644
--- a/src/elements/chips/Chips.spec.js
+++ b/src/elements/chips/Chips.spec.js
@@ -64,20 +64,6 @@ describe('Element: NovoChipsElement', () => {
expect(component.blur).toBeDefined();
expect(component.items.length).toBe(0);
});
-
- it('should add keydown listeners', () => {
- spyOn(window.document, 'addEventListener');
- component.ngOnInit();
- expect(window.document.addEventListener).toHaveBeenCalled();
- });
- });
-
- describe('Function: ngOnDestroy(event)', () => {
- it('should remove keydown listeners', () => {
- spyOn(window.document, 'removeEventListener');
- component.ngOnDestroy();
- expect(window.document.removeEventListener).toHaveBeenCalled();
- });
});
describe('Function: deselectAll()', () => {
|
chore(tests): Fixing test
|
bullhorn_novo-elements
|
train
|
js
|
8c70e3e88c178f1cc36e195b164cbfdc371b5796
|
diff --git a/packages/node_modules/@webex/plugin-meetings/src/constants.js b/packages/node_modules/@webex/plugin-meetings/src/constants.js
index <HASH>..<HASH> 100644
--- a/packages/node_modules/@webex/plugin-meetings/src/constants.js
+++ b/packages/node_modules/@webex/plugin-meetings/src/constants.js
@@ -332,8 +332,8 @@ export const EVENTS = {
LOCUS_INFO_UPDATE_SELF: 'LOCUS_INFO_UPDATE_SELF',
LOCUS_INFO_UPDATE_URL: 'LOCUS_INFO_UPDATE_URL',
STATS_UPDATE: 'STATS_UPDATE',
- ANALYSIS_FAILURE: 'ANALYSIS:FAILURE',
- ANALYSIS_GRAPH: 'ANALYSIS:GRAPH'
+ ANALYSIS_FAILURE: 'ANALYSIS_FAILURE',
+ ANALYSIS_GRAPH: 'ANALYSIS_GRAPH'
};
export const EVENT_STATS_MAP = {
|
fix(meeting): constants
|
webex_spark-js-sdk
|
train
|
js
|
e77faf7187e880bf5f0201d6ed4a11ea5892d361
|
diff --git a/src/Stripe.php b/src/Stripe.php
index <HASH>..<HASH> 100644
--- a/src/Stripe.php
+++ b/src/Stripe.php
@@ -20,6 +20,8 @@
namespace Cartalyst\Stripe;
+use ReflectionClass;
+
class Stripe
{
/**
@@ -264,7 +266,7 @@ class Stripe
{
$class = "\\Cartalyst\\Stripe\\Api\\".ucwords($method);
- if (class_exists($class)) {
+ if (class_exists($class) && ! (new ReflectionClass($class))->isAbstract()) {
return new $class($this->config);
}
|
chore: Make sure that abstract classes are not being instantiated.
|
cartalyst_stripe
|
train
|
php
|
ecec265305b7f26bbf90924ad4ad37c571caa085
|
diff --git a/src/Transfer.php b/src/Transfer.php
index <HASH>..<HASH> 100644
--- a/src/Transfer.php
+++ b/src/Transfer.php
@@ -23,11 +23,26 @@ class Transfer extends Entity
return parent::all($options);
}
+ /**
+ * Create a direct transfer from merchant's account to
+ * any of the linked accounts, without linking it to a
+ * payment
+ */
public function create($attributes = array())
{
return parent::create($attributes);
}
+ /**
+ * Create a transfer to a linked account for a payment
+ */
+ public function transfer($paymentId, $attributes = array())
+ {
+ $relativeUrl = 'payments/' . $paymentId. '/transfers';
+
+ return $this->request('POST', $relativeUrl, $options);
+ }
+
public function edit($attributes = null)
{
$entityUrl = $this->getEntityUrl() . $this->id;
|
feat(transfers): Create a transfer to a linked account for a payment
|
razorpay_razorpay-php
|
train
|
php
|
9dae6c9174c0cd3bbb429d52319fcf776318a031
|
diff --git a/intranet/apps/eighth/views/admin/groups.py b/intranet/apps/eighth/views/admin/groups.py
index <HASH>..<HASH> 100644
--- a/intranet/apps/eighth/views/admin/groups.py
+++ b/intranet/apps/eighth/views/admin/groups.py
@@ -662,8 +662,7 @@ def add_member_to_group_view(request, group_id):
if not results:
return redirect(next_url + "?error=n")
else:
- users = results
- results = sorted(results, key=lambda x: (x.last_name, x.first_name))
+ users = sorted(results, key=lambda x: (x.last_name, x.first_name))
context = {"query": query, "users": users, "group": group, "admin_page_title": "Add Members to Group"}
return render(request, "eighth/admin/possible_students_add_group.html", context)
|
refactor(eighth): sort users in group add view
|
tjcsl_ion
|
train
|
py
|
c70f84702abba38f45588d41bfa01a3ff2e768c0
|
diff --git a/setup.py b/setup.py
index <HASH>..<HASH> 100644
--- a/setup.py
+++ b/setup.py
@@ -4,13 +4,11 @@ from __future__ import absolute_import
from __future__ import print_function
from setuptools import setup
-import sys
-sys.path.insert(0, '.')
-import version
+import si_prefix
setup(name='si-prefix',
- version=version.getVersion(),
+ version=si_prefix.__version__,
description='Functions for formatting numbers according to SI standards.',
keywords='si prefix format number precision',
author='Christian Fobel',
|
fix(setup): fix package version lookup
|
cfobel_si-prefix
|
train
|
py
|
fa067b31c60a035bae61745fbb78f21b4da50b3c
|
diff --git a/lib/generators/templates/devise.rb b/lib/generators/templates/devise.rb
index <HASH>..<HASH> 100755
--- a/lib/generators/templates/devise.rb
+++ b/lib/generators/templates/devise.rb
@@ -126,8 +126,11 @@ Devise.setup do |config|
# A period that the user is allowed to access the website even without
# confirming their account. For instance, if set to 2.days, the user will be
# able to access the website for two days without confirming their account,
- # access will be blocked just in the third day. Default is 0.days, meaning
- # the user cannot access the website without confirming their account.
+ # access will be blocked just in the third day.
+ # You can also set it to nil, which will allow the user to access the website
+ # without confirming their account.
+ # Default is 0.days, meaning the user cannot access the website without
+ # confirming their account.
# config.allow_unconfirmed_access_for = 2.days
# A period that the user is allowed to confirm their account before their
|
chore(docs): allow_unconfirmed_access_for = nil (#<I>) (#<I>)
|
plataformatec_devise
|
train
|
rb
|
a9938457db3e3b6c4baf6608560f99336a4c2866
|
diff --git a/fmts/doc.go b/fmts/doc.go
index <HASH>..<HASH> 100644
--- a/fmts/doc.go
+++ b/fmts/doc.go
@@ -44,6 +44,7 @@
// black A uncompromising Python code formatter - https://github.com/psf/black
// flake8 Tool for python style guide enforcement - https://flake8.pycqa.org/
// isort A Python utility / library to sort Python imports - https://github.com/PyCQA/isort
+// mypy An optional static type checker for Python - http://mypy-lang.org/
// pep8 Python style guide checker - https://pypi.python.org/pypi/pep8
// ruby
// brakeman (brakeman --quiet --format tabs) A static analysis security vulnerability scanner for Ruby on Rails applications - https://github.com/presidentbeef/brakeman
|
feat(docs): update documentation for Python mypy
... by using `go generate ./...`
|
reviewdog_errorformat
|
train
|
go
|
e072dc8842d0ce2957eea5cda9a84960dd6d05b6
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -179,7 +179,7 @@ function oneOra(str, options) {
*/
function loggerStart(...args) {
let options = args[args.length - 1]
- args = args.slice(0,args.length-1)
+ args = args.slice(0,args.length-1 || 1)
let {
ora,
log,
|
fix: 🐛 two-log:start args length >= 1
|
chinanf-boy_two-log-min
|
train
|
js
|
a2d247843efaf292c4b7861ef2ebcf1f6eb9e2bb
|
diff --git a/test/helpers/kubectl.go b/test/helpers/kubectl.go
index <HASH>..<HASH> 100644
--- a/test/helpers/kubectl.go
+++ b/test/helpers/kubectl.go
@@ -2220,15 +2220,17 @@ func (kub *Kubectl) overwriteHelmOptions(options map[string]string) error {
}
if !RunsWithKubeProxy() {
- nodeIP, err := kub.GetNodeIPByLabel(K8s1, false)
- if err != nil {
- return fmt.Errorf("Cannot retrieve Node IP for k8s1: %s", err)
- }
-
opts := map[string]string{
"kubeProxyReplacement": "strict",
- "k8sServiceHost": nodeIP,
- "k8sServicePort": "6443",
+ }
+
+ if GetCurrentIntegration() != CIIntegrationGKE {
+ nodeIP, err := kub.GetNodeIPByLabel(K8s1, false)
+ if err != nil {
+ return fmt.Errorf("Cannot retrieve Node IP for k8s1: %s", err)
+ }
+ opts["k8sServiceHost"] = nodeIP
+ opts["k8sServicePort"] = "6443"
}
if RunsOnNetNextOr419Kernel() {
|
test: Fix kube-proxy-free on GKE due to wrong k8sServiceHost value
On GKE, kube-apiserver doesn't run on the first node as in our Jenkins
builds, leading to a failure to start Cilium in kube-proxy-free mode.
Since kube-proxy is always provisioned on GKE, we don't need to specify
k8sServiceHost and k8sServicePort on GKE.
|
cilium_cilium
|
train
|
go
|
6c41fd52fc567555760b6a88e48bde2ca80bf82e
|
diff --git a/packages/redux-xlsx/src/saga.js b/packages/redux-xlsx/src/saga.js
index <HASH>..<HASH> 100644
--- a/packages/redux-xlsx/src/saga.js
+++ b/packages/redux-xlsx/src/saga.js
@@ -22,7 +22,7 @@ function readFile(file, columns) {
reader.onload = async e => {
/** read workbook */
const data = e.target.result;
- const wb = XLSX.read(data, { type: "binary" });
+ const wb = XLSX.read(data, { type: "binary", cellDates: true });
/** grab first sheet */
const wsname = wb.SheetNames[0];
|
fix: xlsx-import date (#<I>)
|
36node_sketch
|
train
|
js
|
246b261d35c7ea92747e8d6d4b2ef68308cf5215
|
diff --git a/src/modules/Dropdown/Dropdown.js b/src/modules/Dropdown/Dropdown.js
index <HASH>..<HASH> 100644
--- a/src/modules/Dropdown/Dropdown.js
+++ b/src/modules/Dropdown/Dropdown.js
@@ -203,7 +203,7 @@ export default class Dropdown extends Component {
/* eslint-enable no-console */
}
- if (!_.isEqual(nextProps.value, this.state.value)) {
+ if (!_.isEqual(nextProps.value, this.props.value)) {
debug('value changed, setting', nextProps.value)
this.setValue(nextProps.value)
}
|
fix(Dropdown): compare nextProps to props in cwrp
|
Semantic-Org_Semantic-UI-React
|
train
|
js
|
63e6f377f80c59108944a3c7866347002a152991
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -381,6 +381,11 @@ export default class Carousel extends Component {
const scrollOffset = this._getScrollOffset(event);
const newActiveItem = this._getActiveItem(scrollOffset);
const itemsLength = this._positions.length;
+ const animationCommonOptions = {
+ isInteraction: false,
+ useNativeDriver: true,
+ ...animationOptions
+ };
let animations = [];
this._currentContentOffset = scrollOffset;
@@ -404,7 +409,7 @@ export default class Carousel extends Component {
animations.push(
Animated[animationFunc](
this.state.interpolators[activeItem],
- { isInteraction: false, ...animationOptions, toValue: 0 }
+ { ...animationCommonOptions, toValue: 0 }
)
);
}
@@ -412,7 +417,7 @@ export default class Carousel extends Component {
animations.push(
Animated[animationFunc](
this.state.interpolators[newActiveItem],
- { isInteraction: false, ...animationOptions, toValue: 1 }
+ { ...animationCommonOptions, toValue: 1 }
)
);
}
|
feat(module): use native driver for slide's animation
This can be overridden via `animationOptions`
|
archriss_react-native-snap-carousel
|
train
|
js
|
dc262f16e7aab9bcbb6c4a92a56b288ec6b21774
|
diff --git a/nightwatch.js b/nightwatch.js
index <HASH>..<HASH> 100644
--- a/nightwatch.js
+++ b/nightwatch.js
@@ -35,6 +35,7 @@ if (process.env.TRAVIS) {
module.exports = {
globals_path: './nightwatch-globals.js',
+ persist_globals: true,
// selenium: {
// start_process: true,
// server_path: require('selenium-server').path,
|
chore: persist global data on nightwatch
|
bolt-design-system_bolt
|
train
|
js
|
459a485915e8e88298889d9ff9f78feef5b552ae
|
diff --git a/src/enforcers.js b/src/enforcers.js
index <HASH>..<HASH> 100644
--- a/src/enforcers.js
+++ b/src/enforcers.js
@@ -64,8 +64,8 @@ export let columnDescriptor = osom({
type: Any,
required: true,
validate (value) {
- let type = isFunction(value) ? value.name : value
- return isOneOf(COLUMN_TYPES, type)
+ let type = isFunction(value) ? value.name : String(value)
+ return isOneOf(COLUMN_TYPES, type.toLowerCase())
}
},
defaultTo: Any,
|
fix(enforcers): broken descriptor validation
Fix incorrect validation in `columnDescriptor` due to string casing. Also ensure that the `type` being checked is a string before casing it.
|
citycide_trilogy
|
train
|
js
|
c752469d16b52731beacee95b113ec00736ba552
|
diff --git a/endless.go b/endless.go
index <HASH>..<HASH> 100644
--- a/endless.go
+++ b/endless.go
@@ -2,6 +2,7 @@ package endless
import (
"crypto/tls"
+ "errors"
"flag"
"fmt"
"log"
@@ -410,11 +411,12 @@ func (srv *endlessServer) hammerTime(d time.Duration) {
func (srv *endlessServer) fork() (err error) {
// only one server isntance should fork!
- runningServerReg.Lock()
- defer runningServerReg.Unlock()
if runningServersForked {
- return
+ return errors.New("another fork is running")
}
+ runningServerReg.Lock()
+ defer runningServerReg.Unlock()
+
runningServersForked = true
var files = make([]*os.File, len(runningServers))
|
fix: checking "runningServersForked" doesn't work expectedly after mutex lock when forking
|
fvbock_endless
|
train
|
go
|
8923fad8a9b054fc4ec1f48aaa34916521cb167f
|
diff --git a/src/fury.js b/src/fury.js
index <HASH>..<HASH> 100644
--- a/src/fury.js
+++ b/src/fury.js
@@ -47,22 +47,11 @@ class Fury {
}
findAdapter(source, mediaType, method) {
- let adapter;
-
if (mediaType) {
- adapter = findAdapter(this.adapters, mediaType, method);
- } else {
- for (let i = 0; i < this.adapters.length; i += 1) {
- const current = this.adapters[i];
-
- if (current.detect && current.detect(source) && current[method]) {
- adapter = this.adapters[i];
- break;
- }
- }
+ return findAdapter(this.adapters, mediaType, method);
}
- return adapter;
+ return this.detect(source).filter(adapter => adapter[method])[0];
}
validate({ source, mediaType, adapterOptions }, done) {
|
refactor(findAdapter): Simplify and use detect method
|
apiaryio_fury.js
|
train
|
js
|
677731259621a357214cf1787e219112a7301ec5
|
diff --git a/src/page_scrapers/__init__.py b/src/page_scrapers/__init__.py
index <HASH>..<HASH> 100644
--- a/src/page_scrapers/__init__.py
+++ b/src/page_scrapers/__init__.py
@@ -1,4 +1,4 @@
# Do not change this version manually.
# Versioning is managed by package_controller.
# To update the version run `pc version --patch | --minor | --major`
-__version__ = "2.1.0"
\ No newline at end of file
+__version__ = "2.2.0"
\ No newline at end of file
|
chore: <I>.
Updates the version from <I> to <I>.
|
alexseitsinger_page_scrapers
|
train
|
py
|
38fda202470f228a1fded2f4298acdaec3c00ac7
|
diff --git a/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/internal/contacts/ContactsSyncActor.java b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/internal/contacts/ContactsSyncActor.java
index <HASH>..<HASH> 100644
--- a/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/internal/contacts/ContactsSyncActor.java
+++ b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/internal/contacts/ContactsSyncActor.java
@@ -61,7 +61,7 @@ public class ContactsSyncActor extends ModuleActor {
}
}
notifyState();
- // self().send(new PerformSync());
+ self().send(new PerformSync());
}
public void performSync() {
|
fix(core): recover contact sync
|
actorapp_actor-platform
|
train
|
java
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.