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
d0b4fa6405d832beb34ecbec6f9e29e9b232da57
diff --git a/questionary/prompt.py b/questionary/prompt.py index <HASH>..<HASH> 100644 --- a/questionary/prompt.py +++ b/questionary/prompt.py @@ -1,5 +1,5 @@ from prompt_toolkit.output import ColorDepth -from typing import Any, Dict, Optional, Iterable, Mapping +from typing import Any, Dict, Optional, Iterable, Mapping, Union from questionary import utils from questionary.constants import DEFAULT_KBI_MESSAGE @@ -13,7 +13,7 @@ class PromptParameterException(ValueError): def prompt( - questions: Iterable[Mapping[str, Any]], + questions: Union[Dict[str, Any], Iterable[Mapping[str, Any]]], answers: Optional[Mapping[str, Any]] = None, patch_stdout: bool = False, true_color: bool = False, @@ -74,7 +74,7 @@ def prompt( def unsafe_prompt( - questions: Iterable[Mapping[str, Any]], + questions: Union[Dict[str, Any], Iterable[Mapping[str, Any]]], answers: Optional[Mapping[str, Any]] = None, patch_stdout: bool = False, true_color: bool = False,
fix(types): declare support for single questions Without this patch, when calling `prompt` or `unsafe_prompt` with a `dict` on `questions`, mypy fails with: Argument 1 to "unsafe_prompt" has incompatible type "Dict[str, Any]"; expected "Iterable[Mapping[str, Any]]"
tmbo_questionary
train
py
5f4035e444ae9c4754a1a034b9ee3946fba202b1
diff --git a/packages/cozy-konnector-libs/src/libs/saveFiles.js b/packages/cozy-konnector-libs/src/libs/saveFiles.js index <HASH>..<HASH> 100644 --- a/packages/cozy-konnector-libs/src/libs/saveFiles.js +++ b/packages/cozy-konnector-libs/src/libs/saveFiles.js @@ -226,6 +226,8 @@ function checkMimeWithPath(mime, filepath) { } function logFileStream(fileStream) { + if (!fileStream) return + if (fileStream && fileStream.constructor && fileStream.constructor.name) { log( 'info',
fix(saveFiles): avoid the 'The fileStream attribute is a undefined' message in logs
konnectors_libs
train
js
35b9d695a4ed56ce554da7a8231bf29eec14e30a
diff --git a/packages/webpack-cli/lib/utils/package-exists.js b/packages/webpack-cli/lib/utils/package-exists.js index <HASH>..<HASH> 100644 --- a/packages/webpack-cli/lib/utils/package-exists.js +++ b/packages/webpack-cli/lib/utils/package-exists.js @@ -1,6 +1,6 @@ function packageExists(packageName) { try { - require(packageName); + require.resolve(packageName); return true; } catch (err) { return false;
fix: improve package-exists util (#<I>)
webpack_webpack-cli
train
js
a7eb601f96098280632d9a21c90682d0365bfb5b
diff --git a/src/store.js b/src/store.js index <HASH>..<HASH> 100644 --- a/src/store.js +++ b/src/store.js @@ -1311,7 +1311,7 @@ function mapValueWithState(lastValue, nextValue) { enumerable: true, }); return acc; - }, Object.create(lastValue)), + }, Object.create(Object.getPrototypeOf(lastValue))), ); definitions.set(result, definitions.get(lastValue));
fix(store): correct prototype for mapping state of the model in store factory
hybridsjs_hybrids
train
js
9d9c808280f02a456e86dec008c60c1075feee01
diff --git a/lib/create-espower-visitor.js b/lib/create-espower-visitor.js index <HASH>..<HASH> 100644 --- a/lib/create-espower-visitor.js +++ b/lib/create-espower-visitor.js @@ -10,14 +10,12 @@ var BabelAssertionVisitor = require('./babel-assertion-visitor'); var babelTemplate = require('babel-template'); var helperTemplate = babelTemplate([ '(function () {', - ' var events = [];', + ' var captured = [];', ' function _capt (value, espath) {', - ' events.push({value: value, espath: espath});', + ' captured.push({value: value, espath: espath});', ' return value;', ' }', ' function _expr (value, args) {', - ' var captured = events;', - ' events = [];', ' var source = {', ' content: args.content,', ' filepath: args.filepath,',
refactor(babel-plugin-espower): simplify closure usage in capture helper since closure is created for each assertion argument
power-assert-js_babel-plugin-espower
train
js
b7b1e492070e708c99b605817c94e7bdba50d1ef
diff --git a/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/messaging/router/RouterActor.java b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/messaging/router/RouterActor.java index <HASH>..<HASH> 100644 --- a/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/messaging/router/RouterActor.java +++ b/actor-sdk/sdk-core/core/core-shared/src/main/java/im/actor/core/modules/messaging/router/RouterActor.java @@ -239,6 +239,10 @@ public class RouterActor extends ModuleActor { state = state.changeOutReceiveDate(maxReceiveDate); isChanged = true; } + if (state.isLoaded() != isEnded) { + state = state.changeIsLoaded(isEnded); + isChanged = true; + } if (isChanged) { conversationStates.addOrUpdateItem(state); }
fix(core): Fixing isLoaded flag in chat
actorapp_actor-platform
train
java
647fdd8229bc94c9cc8c7cf655496d0de258272a
diff --git a/source/rafcon/gui/controllers/library_tree.py b/source/rafcon/gui/controllers/library_tree.py index <HASH>..<HASH> 100644 --- a/source/rafcon/gui/controllers/library_tree.py +++ b/source/rafcon/gui/controllers/library_tree.py @@ -295,7 +295,8 @@ class LibraryTreeController(ExtendedController): def open_run_button_clicked(self, widget): from rafcon.core.singleton import state_machine_execution_engine state_machine = self.open_library_as_state_machine() - state_machine_execution_engine.start(state_machine.state_machine_id) + if state_machine: + state_machine_execution_engine.start(state_machine.state_machine_id) def open_library_as_state_machine(self): import rafcon.gui.helpers.state_machine as gui_helper_state_machine @@ -305,7 +306,8 @@ class LibraryTreeController(ExtendedController): logger.debug("Opening library as state-machine from path '{0}'".format(physical_library_path)) state_machine = gui_helper_state_machine.open_state_machine(physical_library_path) - global_runtime_config.update_recently_opened_state_machines_with(state_machine) + if state_machine: + global_runtime_config.update_recently_opened_state_machines_with(state_machine) return state_machine def get_menu_item_text(self, menu_item):
fix(library_tree): Make more fail safe Handle cases where no state machine is returned
DLR-RM_RAFCON
train
py
cb47a28c10e1865744cbe5d20173e537dd6e21f4
diff --git a/packages/@vue/eslint-config-airbnb/index.js b/packages/@vue/eslint-config-airbnb/index.js index <HASH>..<HASH> 100644 --- a/packages/@vue/eslint-config-airbnb/index.js +++ b/packages/@vue/eslint-config-airbnb/index.js @@ -23,6 +23,14 @@ module.exports = { jsx: 'never', ts: 'never', tsx: 'never' + }], + 'no-param-reassign': ['error', { + props: true, + ignorePropertyModificationsFor: [ + 'state', // for vuex state + 'acc', // for reduce accumulators + 'e' // for e.returnvalue + ] }] } }
fix: airbnb lint should not warn on vuex state mutation (#<I>) close #<I>
vuejs_vue-cli
train
js
af1532cb3c78f5cae7de612afaa6258c0eb8c7db
diff --git a/provider/aws.go b/provider/aws.go index <HASH>..<HASH> 100644 --- a/provider/aws.go +++ b/provider/aws.go @@ -131,6 +131,10 @@ func (p *AWSProvider) Zones() (map[string]*route53.HostedZone, error) { return nil, err } + for _, zone := range zones { + log.Debugf("Considering zone: %s (domain: %s)", aws.StringValue(zone.Id), aws.StringValue(zone.Name)) + } + return zones, nil } diff --git a/provider/google.go b/provider/google.go index <HASH>..<HASH> 100644 --- a/provider/google.go +++ b/provider/google.go @@ -159,6 +159,10 @@ func (p *GoogleProvider) Zones() (map[string]*dns.ManagedZone, error) { return nil, err } + for _, zone := range zones { + log.Debugf("Considering zone: %s (domain: %s)", zone.Name, zone.DnsName) + } + return zones, nil }
fix: print matched dns zones (gcp, aws) (#<I>)
kubernetes-incubator_external-dns
train
go,go
58f1dfee0f860e4d51b0c09f1474585119b6cb72
diff --git a/stop.js b/stop.js index <HASH>..<HASH> 100644 --- a/stop.js +++ b/stop.js @@ -1,5 +1,3 @@ 'use strict'; -var allonsy = require('./features/allons-y/allons-y.js'); - -allonsy.stop(); +require('./features/allons-y/allons-y.js').stop();
refactor(stop): don't declare a variable
CodeCorico_allons-y
train
js
bb74403ef3dd8e8bdf5aa0b7561b75b27478d55c
diff --git a/src/core/Scene.js b/src/core/Scene.js index <HASH>..<HASH> 100644 --- a/src/core/Scene.js +++ b/src/core/Scene.js @@ -273,8 +273,8 @@ let Scene = Mixin(Base => { this._mounted = false }, - updated(oldProps, oldState, modifiedProps) { - Super(this).updated(oldProps, oldState, modifiedProps) + updated(oldProps, oldState, moddedProps) { + Super(this).updated(oldProps, oldState, moddedProps) if (!this.isConnected) return
fix: whoops, fix a typo. I'm in the process of adding unit tests to avoid these sorts of mistakes!
trusktr_infamous
train
js
3d3ac08fcf1498ce4ec974e961a99f7b80013163
diff --git a/exchange/bitswap/bitswap.go b/exchange/bitswap/bitswap.go index <HASH>..<HASH> 100644 --- a/exchange/bitswap/bitswap.go +++ b/exchange/bitswap/bitswap.go @@ -108,7 +108,6 @@ type bitswap struct { // GetBlock attempts to retrieve a particular block from peers within the // deadline enforced by the context. func (bs *bitswap) GetBlock(parent context.Context, k u.Key) (*blocks.Block, error) { - log := log.Prefix("bitswap(%s).GetBlock(%s)", bs.self, k) // Any async work initiated by this function must end when this function // returns. To ensure this, derive a new context. Note that it is okay to @@ -121,11 +120,9 @@ func (bs *bitswap) GetBlock(parent context.Context, k u.Key) (*blocks.Block, err ctx = eventlog.ContextWithLoggable(ctx, eventlog.Uuid("GetBlockRequest")) defer log.EventBegin(ctx, "GetBlockRequest", &k).Done() - log.Debugf("GetBlockRequestBegin") defer func() { cancelFunc() - log.Debugf("GetBlockRequestEnd") }() promise, err := bs.GetBlocks(ctx, []u.Key{k})
chore(bitswap): rm debug log (covered by eventlog)
ipfs_go-ipfs
train
go
75e8e0b28d3e1ba3ac849e6d2091826cbb8d546f
diff --git a/tests/test_io/test_web/test_load.py b/tests/test_io/test_web/test_load.py index <HASH>..<HASH> 100644 --- a/tests/test_io/test_web/test_load.py +++ b/tests/test_io/test_web/test_load.py @@ -20,7 +20,7 @@ if TYPE_CHECKING: @pytest.fixture(scope="module") def mini_sbml(data_directory: Path) -> bytes: """Provide a gzip-compressed SBML document.""" - with (data_directory / "mini_cobra.xml").open(mode="rb") as handle: + with open(data_directory / "mini_cobra.xml", "rb") as handle: return gzip.compress(handle.read())
chore: improve file opening for test_load.py
opencobra_cobrapy
train
py
1f8e4f21325b2de7caf6525fc1eceeaf7629b552
diff --git a/lib/mail/Mail.php b/lib/mail/Mail.php index <HASH>..<HASH> 100644 --- a/lib/mail/Mail.php +++ b/lib/mail/Mail.php @@ -1756,8 +1756,7 @@ class Mail implements \JsonSerializable /** * Disable sandbox mode on a MailSettings object * - * This allows you to send a test email to ensure that your request - * body is valid and formatted correctly. + * This to ensure that your request is not in sandbox mode. * * @throws TypeException */
docs: rewrite function description (#<I>) I found that the function description did not match the way it works.
sendgrid_sendgrid-php
train
php
93293e0916cfbd5a6cf868716a8ff3f74297ef37
diff --git a/packages/pob/lib/generators/common/babel/CommonBabelGenerator.js b/packages/pob/lib/generators/common/babel/CommonBabelGenerator.js index <HASH>..<HASH> 100644 --- a/packages/pob/lib/generators/common/babel/CommonBabelGenerator.js +++ b/packages/pob/lib/generators/common/babel/CommonBabelGenerator.js @@ -599,7 +599,7 @@ export default class CommonBabelGenerator extends Generator { } // eslint: https://github.com/benmosher/eslint-plugin-import/issues/2132 // jest: https://github.com/facebook/jest/issues/9771 - if (!pkg.main) { + if (!pkg.main && exportName === '.') { pkg.main = exportTarget.default || exportTarget.require; } } else if (target === 'browser') {
fix(pob): dont add any script as main, only "."
christophehurpeau_pob-lerna
train
js
f55ad50863a55165499b16d0cecdefeb2708f015
diff --git a/test/meta_test.rb b/test/meta_test.rb index <HASH>..<HASH> 100644 --- a/test/meta_test.rb +++ b/test/meta_test.rb @@ -40,8 +40,8 @@ class ApiVersionTest < Test::Unit::TestCase "display_name": "unstable", "supported": false, }, - ].to_json + ].as_json - assert_equal versions, ShopifyAPI::Meta.admin_versions.to_json + assert_equal versions, ShopifyAPI::Meta.admin_versions.as_json end end
fix: update test to handle activeresource.to_json in Ruby <I>
Shopify_shopify_api
train
rb
10613f7139a3dfd90866ebf8945a73117c6e15a8
diff --git a/packages/magellan-mocha-plugin/.eslintrc.js b/packages/magellan-mocha-plugin/.eslintrc.js index <HASH>..<HASH> 100644 --- a/packages/magellan-mocha-plugin/.eslintrc.js +++ b/packages/magellan-mocha-plugin/.eslintrc.js @@ -7,4 +7,15 @@ module.exports = { 'import/no-nodejs-modules': 'off', 'no-process-exit': 'off', }, + overrides: [ + { + files: [ './test_support/**/*' ], + rules: { + 'jest/expect-expect': 'off', + 'jest/no-disabled-tests': 'off', + 'jest/valid-title': 'off', + 'jest/no-identical-title': 'off', + }, + }, + ], };
chore: Disable jest rules that doesn't make sense for test fixtures (#<I>)
Automattic_wp-calypso
train
js
6ca75487abf9ba46b8e90b016a31120b0c8d7c41
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -13,7 +13,7 @@ class Auth { constructor (options) { this.config = { local: local, - provided: options + provided: options || {} } }
fix: ensure that provided config is an object
cubic-js_cubic
train
js
aeb344f893b0c69f85ca1bcdc72b06343e104d32
diff --git a/app/lib/webpack/ssr/plugin.ssr-prod-artifacts.js b/app/lib/webpack/ssr/plugin.ssr-prod-artifacts.js index <HASH>..<HASH> 100644 --- a/app/lib/webpack/ssr/plugin.ssr-prod-artifacts.js +++ b/app/lib/webpack/ssr/plugin.ssr-prod-artifacts.js @@ -27,6 +27,8 @@ module.exports = class SsrProdArtifacts { */ const appPkg = require(appPaths.resolve.app('package.json')) const cliPkg = require(appPaths.resolve.cli('package.json')) + + delete appPkg.dependencies['@quasar/extras'] const appDeps = getFixedDeps(appPkg.dependencies) const cliDeps = cliPkg.dependencies
feat(app): small addition to previous commit for SSR builds (do not add @quasar/extras for production package.json)
quasarframework_quasar
train
js
f45da3c7b168d34e7d3c520068dc24364753a74a
diff --git a/lib/plugins/package/lib/packageService.js b/lib/plugins/package/lib/packageService.js index <HASH>..<HASH> 100644 --- a/lib/plugins/package/lib/packageService.js +++ b/lib/plugins/package/lib/packageService.js @@ -16,6 +16,7 @@ module.exports = { 'yarn-*.log', '.serverless/**', '.serverless_plugins/**', + 'node_modules/aws-sdk/**', ], getIncludes(include) {
perf(packaging): Exclude "aws-sdk" dependency (#<I>) As it's unconditionally provided in AWS environment
serverless_serverless
train
js
ba9ee43e0199de8630ecba659d4da8b9beb4b7be
diff --git a/src/graceful/__init__.py b/src/graceful/__init__.py index <HASH>..<HASH> 100644 --- a/src/graceful/__init__.py +++ b/src/graceful/__init__.py @@ -4,5 +4,5 @@ It is inspired by Django REST Framework package. Mostly by how object serialization is done but more emphasis is put on API to be self-descriptive. """ -VERSION = (0, 1, 2) # PEP 386 # noqa +VERSION = (0, 2, 0) # PEP 386 # noqa __version__ = ".".join([str(x) for x in VERSION]) # noqa
chore: prepare new release (<I>)
swistakm_graceful
train
py
9335f83930d89cd7cea10a2e5f537cd65bf7df06
diff --git a/packages/reftools/lib/jptr.js b/packages/reftools/lib/jptr.js index <HASH>..<HASH> 100644 --- a/packages/reftools/lib/jptr.js +++ b/packages/reftools/lib/jptr.js @@ -55,7 +55,7 @@ function jptr(obj, prop, newValue) { components[i] = (i > 0) ? components[i-1] : ''; // backtrack to indexed property name } - if ((index != -1) || obj.hasOwnProperty(components[i])) { + if ((index != -1) || (obj && obj.hasOwnProperty(components[i]))) { if (index >= 0) { if (setAndLast) { obj[index] = newValue;
fix: reftools/jptr protect against null input object
Mermade_oas-kit
train
js
b20d2c8941f491e27d5a19bfa1a4ad1bb8aedeba
diff --git a/publisher/publisher.go b/publisher/publisher.go index <HASH>..<HASH> 100644 --- a/publisher/publisher.go +++ b/publisher/publisher.go @@ -60,7 +60,8 @@ func listenContainers(client *docker.Client, etcdClient *etcd.Client, ttl time.D if event.Status == "start" { container, err := getContainer(client, event.ID) if err != nil { - log.Fatal(err) + log.Println(err) + continue } publishContainer(etcdClient, container, ttl) }
fix(publisher): skip when failed to retrieve container There is a race condition where a container starts via `docker run`, but then immediately fails because an incorrect command was specified or some other error occurred that caused the container to fail over. In this case, we should just log and fail over, rather than killing publisher.
deis_deis
train
go
d2140f335e23355be42bf4c2f740179a96509221
diff --git a/webapps/webapp/src/main/webapp/app/tasklist/pages/task.js b/webapps/webapp/src/main/webapp/app/tasklist/pages/task.js index <HASH>..<HASH> 100644 --- a/webapps/webapp/src/main/webapp/app/tasklist/pages/task.js +++ b/webapps/webapp/src/main/webapp/app/tasklist/pages/task.js @@ -93,7 +93,17 @@ ngDefine('tasklist.pages', [], function(module) { return; } - var variablesMap = Forms.variablesToMap(variables); + // var variablesMap = Forms.variablesToMap(variables); + var variablesMap = {}; + angular.forEach($scope.variablesForm, function(value, key) { + // if (key[0] !== '$' && !!value.$modelValue) { + if (key[0] !== '$') { + variablesMap[key] = { + // type: + value: value.$modelValue + }; + } + }); var taskList = EngineApi.getTaskList();
fix(tasklist): collect variables on task completion form
camunda_camunda-bpm-platform
train
js
204c914bc4d4bd0bb2076164074aec82b316f1c6
diff --git a/openshift-client/src/main/java/io/fabric8/openshift/client/OpenShiftAPIGroups.java b/openshift-client/src/main/java/io/fabric8/openshift/client/OpenShiftAPIGroups.java index <HASH>..<HASH> 100644 --- a/openshift-client/src/main/java/io/fabric8/openshift/client/OpenShiftAPIGroups.java +++ b/openshift-client/src/main/java/io/fabric8/openshift/client/OpenShiftAPIGroups.java @@ -1,13 +1,12 @@ /** - * Licensed to the Apache Software Foundation (ASF) under one or more - * contributor license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright ownership. - * The ASF licenses this file to You under the Apache License, Version 2.0 - * (the "License"); you may not use this file except in compliance with - * the License. You may obtain a copy of the License at - * <p> - * http://www.apache.org/licenses/LICENSE-2.0 - * <p> + * Copyright (C) 2015 Red Hat, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
chore(license): fix license header whoops IDEA you missed one!
fabric8io_kubernetes-client
train
java
9a5daba51abdac7ff260059b712ba5e5487e781b
diff --git a/sentry_sdk/integrations/logging.py b/sentry_sdk/integrations/logging.py index <HASH>..<HASH> 100644 --- a/sentry_sdk/integrations/logging.py +++ b/sentry_sdk/integrations/logging.py @@ -157,7 +157,6 @@ class EventHandler(logging.Handler, object): if hub.client is None: return - hint = None # type: Optional[Dict[str, Any]] client_options = hub.client.options # exc_info might be None or (None, None, None) @@ -169,7 +168,7 @@ class EventHandler(logging.Handler, object): ) elif record.exc_info and record.exc_info[0] is None: event = {} - hint = None + hint = {} with capture_internal_exceptions(): event["threads"] = { "values": [ @@ -184,6 +183,9 @@ class EventHandler(logging.Handler, object): } else: event = {} + hint = {} + + hint["log_record"] = record event["level"] = _logging_to_event_level(record.levelname) event["logger"] = record.name
feat: Add log_record to event hints See #<I>
getsentry_sentry-python
train
py
55bd98f42b41707b831cbf3bdfccd2fe72f5647b
diff --git a/buildExample.js b/buildExample.js index <HASH>..<HASH> 100644 --- a/buildExample.js +++ b/buildExample.js @@ -1,7 +1,7 @@ import React from 'react'; import { renderToStaticMarkup } from 'react-dom/server'; import { writeFileSync, readFileSync } from 'fs'; -import { map, toPairs } from 'lodash/fp'; +import { map, toPairs, sortBy } from 'lodash/fp'; import path from 'path'; import * as icons from './dist'; @@ -19,7 +19,7 @@ function IconList() { <Icon className="icon" /> </IconWrapper> ), - toPairs(icons) + sortBy(([name]) => name, toPairs(icons)) )} </div> );
chore(example): sort icons by name
lucastobrazil_cabanaico
train
js
f7fb33ed8e8edb1a6d01f9a39fabf29e2df10788
diff --git a/src/core/components/bootstrap.js b/src/core/components/bootstrap.js index <HASH>..<HASH> 100644 --- a/src/core/components/bootstrap.js +++ b/src/core/components/bootstrap.js @@ -20,10 +20,10 @@ module.exports = function bootstrap (self) { args = {default: false} } try { - if (multiaddr) - new MultiAddr(multiaddr) - } - catch (err) { + if (multiaddr) { + multiaddr = new MultiAddr(multiaddr) + } + } catch (err) { return setImmediate(() => callback(err)) } self._repo.config.get((err, config) => { @@ -52,12 +52,13 @@ module.exports = function bootstrap (self) { args = {all: false} } try { - if (multiaddr) - new MultiAddr(multiaddr) - } - catch (err) { + if (multiaddr) { + multiaddr = new MultiAddr(multiaddr) + } + } catch (err) { return setImmediate(() => callback(err)) } + self._repo.config.get((err, config) => { if (err) { return callback(err)
refactor: fix linting from bootstrap.js
ipfs_js-ipfs
train
js
3cab47ebe8a70f5fa3df0f83619830a5c2de45eb
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -45,6 +45,5 @@ setup( 'Programming Language :: Python :: 3.6', 'Programming Language :: Python :: 3.7', 'Topic :: Software Development :: Libraries :: Python Modules', - 'Topic :: Text Processing :: Markup', ], )
fix: 'Topic :: Text Processing :: Markup' seems not supported
tanbro_pyyaml-include
train
py
3a0779e206811e87febfa0ac65fe5f3c2bd97a1f
diff --git a/content/template/detailTemplate/blocks/event-item.php b/content/template/detailTemplate/blocks/event-item.php index <HASH>..<HASH> 100644 --- a/content/template/detailTemplate/blocks/event-item.php +++ b/content/template/detailTemplate/blocks/event-item.php @@ -21,7 +21,7 @@ if ( ! empty( $ev['EventDates'] ) ) { <div data-groupid="eduev<?php echo( $group_by_city ? '-' . esc_attr( $ev['City'] ) : '' ); ?>" class="eventItem<?php echo( $show_more > 0 && $i >= $show_more ? ' showMoreHidden' : '' ); ?>"> <div class="eventDate<?php echo esc_attr( $group_by_city_class ); ?>"> - <?php echo edu_event_item_date( $ev, $event_dates ); ?> + <?php edu_event_item_date( $ev, $event_dates ); ?> </div> <?php if ( ! $group_by_city ) { ?> <div class="eventCity">
refactor: Doesn't need to be echoed.
MultinetInteractive_EduAdmin-WordPress
train
php
8c05a125dc0cfb28e29fc6004ee26607ab99eba8
diff --git a/build.go b/build.go index <HASH>..<HASH> 100644 --- a/build.go +++ b/build.go @@ -334,9 +334,7 @@ func gruntBuildArg(task string) []string { func setup() { runPrint("go", "get", "-v", "github.com/kardianos/govendor") - runPrint("go", "get", "-v", "github.com/blang/semver") - runPrint("go", "get", "-v", "github.com/mattn/go-sqlite3") - runPrint("go", "install", "-v", "github.com/mattn/go-sqlite3") + runPrint("go", "install", "-v", "./pkg/cmd/grafana-server") } func test(pkg string) {
fix(build): updated build.go setup
grafana_grafana
train
go
a55be1b086d4f7e2f76740f069d78e1ca74b2d70
diff --git a/css-components/gulpfile.js b/css-components/gulpfile.js index <HASH>..<HASH> 100644 --- a/css-components/gulpfile.js +++ b/css-components/gulpfile.js @@ -179,7 +179,7 @@ gulp.task('build-css-components', ['build-schemes'], function(done) { // build-css-topdoc //////////////////////////////////////// gulp.task('build-css-topdoc', ['build-css-components'], $.shell.task([ - './node_modules/.bin/topdoc --source ./components-src/dist --destination ./www/testcases --template ./components-src/testcases-topdoc-template' + '"./node_modules/.bin/topdoc" --source "./components-src/dist" --destination "./www/testcases" --template "./components-src/testcases-topdoc-template"' ])); ////////////////////////////////////////
fix(css-gulpfile): shell command for Windows environments
OnsenUI_OnsenUI
train
js
f72ce7c136cf2dfe31a67b190c00e30ba7d70bfa
diff --git a/src/managers/PermissionOverwriteManager.js b/src/managers/PermissionOverwriteManager.js index <HASH>..<HASH> 100644 --- a/src/managers/PermissionOverwriteManager.js +++ b/src/managers/PermissionOverwriteManager.js @@ -13,13 +13,19 @@ const { OverwriteTypes } = require('../util/Constants'); */ class PermissionOverwriteManager extends CachedManager { constructor(channel, iterable) { - super(channel.client, PermissionOverwrites, iterable); + super(channel.client, PermissionOverwrites); /** * The channel of the permission overwrite this manager belongs to * @type {GuildChannel} */ this.channel = channel; + + if (iterable) { + for (const item of iterable) { + this._add(item); + } + } } /** diff --git a/src/structures/GuildChannel.js b/src/structures/GuildChannel.js index <HASH>..<HASH> 100644 --- a/src/structures/GuildChannel.js +++ b/src/structures/GuildChannel.js @@ -90,6 +90,12 @@ class GuildChannel extends Channel { } } + _clone() { + const clone = super._clone(); + clone.permissionOverwrites = new PermissionOverwriteManager(clone, this.permissionOverwrites.cache.values()); + return clone; + } + /** * The category parent of this channel * @type {?CategoryChannel}
fix(GuildChannel): clone its PermissionOverwriteManager too (#<I>)
discordjs_discord.js
train
js,js
88bd17809592bffb09088f49f425d5dc69ae001f
diff --git a/packages/core/renderers/renderer-hyperhtml.js b/packages/core/renderers/renderer-hyperhtml.js index <HASH>..<HASH> 100644 --- a/packages/core/renderers/renderer-hyperhtml.js +++ b/packages/core/renderers/renderer-hyperhtml.js @@ -1,6 +1,7 @@ // HyperHTML Renderer ported to SkateJS import { withComponent, + withUpdate, shadow, props, } from 'skatejs'; @@ -10,7 +11,7 @@ import { findParentTag } from '../utils/find-parent-tag'; export function BoltComponent(Base = HTMLElement) { - return class extends withComponent(Base) { + return class extends withUpdate(withComponent(Base)) { static props = { onClick: props.string,
feat: add withUpdate lifecycle mixin from SkateJS to base Bolt component class
bolt-design-system_bolt
train
js
0e70ec035abb48e0a178134921b7e8773ea777be
diff --git a/packages/metascraper-media-provider/src/get-media/provider/generic.js b/packages/metascraper-media-provider/src/get-media/provider/generic.js index <HASH>..<HASH> 100644 --- a/packages/metascraper-media-provider/src/get-media/provider/generic.js +++ b/packages/metascraper-media-provider/src/get-media/provider/generic.js @@ -41,7 +41,7 @@ module.exports = ({ getTunnel, onError, userAgent, cacheDir }) => { do { try { const agent = isTwitterUrl(url) && retry.val() ? await getAgent({ tunnel }) : undefined - debug(`getInfo retry=${retry.val()} agent=${false} url=${url} flags=${flags.join(' ')}`) + debug(`getInfo retry=${retry.val()} agent=${!!agent} url=${url} flags=${flags.join(' ')}`) data = await getInfo(url, agent ? flags.concat(`--proxy=${proxyUri(agent)}`) : flags) } catch (err) { retry.incr()
fix: check if agent is an object
microlinkhq_metascraper
train
js
1e289b05b9fc7561188bb0dc9a83531068890e0e
diff --git a/test/inputSpec.js b/test/inputSpec.js index <HASH>..<HASH> 100644 --- a/test/inputSpec.js +++ b/test/inputSpec.js @@ -119,6 +119,9 @@ describe('"input" option', function() { } }; eachClass(function(className) { + if(typeof g[className] === 'undefined') { + return; + } it('correctly sends the input when inputType is bytearray and input is ' + className + postfix, function(done) { httpinvoke(url + 'bytearray', 'POST', { input: new g[className](buffer),
test: inputSpec: check for existence before using a typed array class
jakutis_httpinvoke
train
js
5deffec3be96b7d6550db5296b5efd1a6af7999e
diff --git a/piazza_api/piazza.py b/piazza_api/piazza.py index <HASH>..<HASH> 100644 --- a/piazza_api/piazza.py +++ b/piazza_api/piazza.py @@ -74,14 +74,16 @@ class Piazza(object): # raw_classes = self.get_user_profile().get('all_classes').values() # Get classes from the user status (includes all classes) - raw_classes = self.get_user_status().get('networks', []) + status = self.get_user_status() + uid = status['id'] + raw_classes = status.get('networks', []) classes = [] for rawc in raw_classes: c = {k: rawc[k] for k in ['name', 'term']} c['num'] = rawc.get('course_number', '') c['nid'] = rawc['id'] - c['is_ta'] = rawc.get('is_ta', False) + c['is_ta'] = uid in rawc['prof_hash'] classes.append(c) return classes
fix(dev): repair is_ta boolean in get_user_classes is_ta appears to be no longer sent in the networks list of 'user.status', so instead we use the 'profs_hash' to check for TA status.
hfaran_piazza-api
train
py
d72423010d01dbb1ace2ca9bee76506cdcd9cd8e
diff --git a/tests/integration/routes/profile/get-profile-test.js b/tests/integration/routes/profile/get-profile-test.js index <HASH>..<HASH> 100644 --- a/tests/integration/routes/profile/get-profile-test.js +++ b/tests/integration/routes/profile/get-profile-test.js @@ -97,4 +97,16 @@ getServer(function (error, server) { group.end() }) + + test('GET /session/account/profile?include=foobar', function (t) { + var options = _.defaultsDeep({ + url: '/session/account/profile?include=foobar' + }, routeOptions) + + server.inject(options, function (response) { + t.is(response.statusCode, 400, 'returns 400 status') + t.deepEqual(response.result.errors[0].detail, '?include not allowed', 'returns error message') + t.end() + }) + }) })
test(routes): GET /session/account/profile?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
4c0136da4dd7b8ad10bc6fc19872e043fde35578
diff --git a/examples/lazy-loading/app.js b/examples/lazy-loading/app.js index <HASH>..<HASH> 100644 --- a/examples/lazy-loading/app.js +++ b/examples/lazy-loading/app.js @@ -43,7 +43,7 @@ const router = new VueRouter({ { path: '/', component: Home }, // Just use them normally in the route config { path: '/foo', component: Foo }, - // mulitple parameters, `/` should not be encoded. The name is also important + // multiple parameters, `/` should not be encoded. The name is also important // https://github.com/vuejs/vue-router/issues/2719 { path: '/a/:tags*', name: 'tagged', component: () => new Promise(resolve => { setTimeout(() => {
chore(typo): fix typo in comment (#<I>)
vuejs_vue-router
train
js
bc3c2c899fa9752c3387bedc8949dc2d1809befb
diff --git a/master/buildbot/test/unit/reporters/test_generators_utils.py b/master/buildbot/test/unit/reporters/test_generators_utils.py index <HASH>..<HASH> 100644 --- a/master/buildbot/test/unit/reporters/test_generators_utils.py +++ b/master/buildbot/test/unit/reporters/test_generators_utils.py @@ -78,6 +78,17 @@ class TestBuildGenerator(ConfigErrorsMixin, TestReactorMixin, with self.assertRaisesConfigError('must be a list or None'): g.check() + @parameterized.expand([ + ('unknown_str', 'unknown', 'not a valid mode'), + ('unknown_list', ['unknown'], 'not a valid mode'), + ('unknown_list_two', ['unknown', 'failing'], 'not a valid mode'), + ('all_in_list', ['all', 'failing'], 'must be passed in as a separate string'), + ]) + def test_tag_check_raises(self, name, mode, expected_exception): + g = self.create_generator(mode=mode) + with self.assertRaisesConfigError(expected_exception): + g.check() + def test_subject_newlines_not_allowed(self): g = self.create_generator(subject='subject\nwith\nnewline') with self.assertRaisesConfigError('Newlines are not allowed'):
test: Add test for tag check logic in build status generators
buildbot_buildbot
train
py
ff478c8386fa2eb8452b6855d8141b2800101be2
diff --git a/Field.js b/Field.js index <HASH>..<HASH> 100644 --- a/Field.js +++ b/Field.js @@ -1,5 +1,5 @@ var configureField = require('./utils/configureField.js') -module.exports = function (formData, fieldData) { - return configureField(formData, fieldData) +module.exports = function (fieldData) { + return configureField({}, fieldData) }
fix: Field should not be initialized with formData
cerebral-legacy_cerebral-module-forms
train
js
f7aeb60b658545fb36f0c8e3871a3a4dbe122a99
diff --git a/lib/BaseWasmMainTemplatePlugin.js b/lib/BaseWasmMainTemplatePlugin.js index <HASH>..<HASH> 100644 --- a/lib/BaseWasmMainTemplatePlugin.js +++ b/lib/BaseWasmMainTemplatePlugin.js @@ -86,8 +86,7 @@ class BaseWasmMainTemplatePlugin { } applyNode(mainTemplate) { - const generateLoadBinaryCode = path => ` - new Promise(function (resolve, reject) { + const generateLoadBinaryCode = path => `new Promise(function (resolve, reject) { var {readFile} = require("fs"); var {join} = require("path"); @@ -178,7 +177,7 @@ class BaseWasmMainTemplatePlugin { Template.indent([ `var importObject = importObjects[wasmModuleId]`, `var req = ${generateLoadBinaryCode(wasmModuleSrcPath)}`, - "if(typeof WebAssembly.instantiateStreaming !== 'function') {", + "if(typeof WebAssembly.instantiateStreaming === 'function') {", Template.indent([ "promises.push(WebAssembly.instantiateStreaming(req, importObject)", ".then(function(res) {",
fix(wasm): incorrect instantiateStreaming support check
webpack_webpack
train
js
641800cd2d5eb597c241745f0aa0c74204200ab7
diff --git a/packages/shipit-deploy/src/tasks/deploy/update.js b/packages/shipit-deploy/src/tasks/deploy/update.js index <HASH>..<HASH> 100644 --- a/packages/shipit-deploy/src/tasks/deploy/update.js +++ b/packages/shipit-deploy/src/tasks/deploy/update.js @@ -1,5 +1,6 @@ import utils from 'shipit-utils' import path from 'path2/posix' +import p from 'path'; import moment from 'moment' import chalk from 'chalk' import util from 'util' @@ -62,10 +63,7 @@ const updateTask = shipit => { rsync: '--del', } const rsyncFrom = shipit.config.rsyncFrom || shipit.workspace - const uploadDirPath = path.resolve( - rsyncFrom, - shipit.config.dirToCopy || '', - ) + const uploadDirPath = p.resolve(rsyncFrom, shipit.config.dirToCopy || ''); shipit.log('Copy project to remote servers.')
fix: enable Git Bash shells on Windows to successfully deploy (#<I>)
shipitjs_shipit
train
js
0912b9214872383c167e61b77011a74db18d07f5
diff --git a/random-browser.js b/random-browser.js index <HASH>..<HASH> 100644 --- a/random-browser.js +++ b/random-browser.js @@ -1,4 +1,4 @@ -var crypto = window.crypto || window.msCrypto +var crypto = self.crypto || self.msCrypto module.exports = function (bytes) { return crypto.getRandomValues(new Uint8Array(bytes))
fix: use self when referencing the global scope (#<I>)
ai_nanoid
train
js
01ca5af6312adc2a4bd0a3e854c655d2fa378767
diff --git a/lib/components/app/call-taker-panel.js b/lib/components/app/call-taker-panel.js index <HASH>..<HASH> 100644 --- a/lib/components/app/call-taker-panel.js +++ b/lib/components/app/call-taker-panel.js @@ -287,10 +287,17 @@ class CallTakerPanel extends Component { <UserSettings /> )} <div className="desktop-narrative-container"> + {/* FIXME: Achieve this partially scrolling layout as below + without using absolute positioning and by sharing styles with BatchRoutingPanel. */} <NarrativeItineraries containerStyle={{ + bottom: '0', display: 'flex', - flexDirection: 'column' + flexDirection: 'column', + left: '0', + position: 'absolute', + right: '0', + top: '210px' }} /> </div>
fix(CallTakerPanel): Add lost narrative scrolling feature.
opentripplanner_otp-react-redux
train
js
5aaa3d99b8f8d887a8a123addedd108f1c5cd0b3
diff --git a/src/utils/sentry.js b/src/utils/sentry.js index <HASH>..<HASH> 100644 --- a/src/utils/sentry.js +++ b/src/utils/sentry.js @@ -6,6 +6,7 @@ export const boot = () => { release: window.app.revision, tags: { role: 'frontend' }, environment: window.app.env, + whitelistUrls: [window.app.cdnUrl, window.app.frontendHost], }).install(); };
chore(app): add frontend host as window app var
commercetools_merchant-center-application-kit
train
js
4a9e883baee42a8bbc48399e4d749879db18f3d9
diff --git a/source/rafcon/gui/mygaphas/items/line.py b/source/rafcon/gui/mygaphas/items/line.py index <HASH>..<HASH> 100644 --- a/source/rafcon/gui/mygaphas/items/line.py +++ b/source/rafcon/gui/mygaphas/items/line.py @@ -287,10 +287,9 @@ class PerpLine(Line): return 0 line_width = parent_state_v.border_width / constants.BORDER_WIDTH_LINE_WIDTH_FACTOR if for_port: - return min(line_width, for_port.port_side_size) + return min(line_width, for_port.port_size[0]) return line_width - def _head_length(self, port): """Distance from the center of the port to the perpendicular waypoint""" if not port: @@ -300,12 +299,11 @@ class PerpLine(Line): if parent_state_v == port.parent: length = port.port_side_size elif port.has_label(): - length =port.port_side_size + length = port.port_side_size else: length = port.port_side_size * 2 return max(length, self._calc_line_width()) - def _head_offset(self, port): """How far away from the port center does the line begin""" if not port:
feat(gaphas): Line width according to port width The minimum line width is now set to the port width for better optics
DLR-RM_RAFCON
train
py
7e332c894ea3f9a3837a75155386af58f66e2076
diff --git a/lib/handlers/plugin-handler.js b/lib/handlers/plugin-handler.js index <HASH>..<HASH> 100644 --- a/lib/handlers/plugin-handler.js +++ b/lib/handlers/plugin-handler.js @@ -22,6 +22,14 @@ module.exports = function(req, res, next) { req.headers[pluginMgr.SSL_FLAG_HEADER] = 'true'; } + var localHost = req.rules.host; + if (localHost) { + req.headers[pluginMgr.LOCAL_HOST_HEADER] = encodeURIComponent(util.removeProtocol(localHost.matcher, true)); + if (localHost.port) { + req.headers[pluginMgr.HOST_PORT_HEADER] = localHost.port; + } + } + options.host = '127.0.0.1'; options.port = ports.port; options.href = util.changePort(req.fullUrl, ports.port);
feat: send host:port to plugin.server
avwo_whistle
train
js
d8b90b93c7fdf636d6080a8dd8bfb0a8256e598c
diff --git a/load-i18n.js b/load-i18n.js index <HASH>..<HASH> 100644 --- a/load-i18n.js +++ b/load-i18n.js @@ -1,6 +1,6 @@ export default function loadI18n(locale) { // Use lazy once so that subsequent calls to import() will use the same // network response. https://webpack.js.org/api/module-methods/#import- - return import(/* webpackChunkName: "i18n-locale-data", webpackMode: "lazy-once" */ + return import(/* webpackChunkName: "i18n-locale-data" */ `./data/${locale}.json`); }
refactor(app-shell): remove iunnecessary nner application
commercetools_merchant-center-application-kit
train
js
53c5d31e10255d41f1392fe79fd3666ad1b60fdb
diff --git a/spec/rack/app/router/versioned_path_spec.rb b/spec/rack/app/router/versioned_path_spec.rb index <HASH>..<HASH> 100644 --- a/spec/rack/app/router/versioned_path_spec.rb +++ b/spec/rack/app/router/versioned_path_spec.rb @@ -4,10 +4,15 @@ describe Rack::App do include Rack::App::Test paths = [ + '/1.0.0', '/v1.0.0', '/api/v1.0.0', + '/api/version/1.0.0', '/api/v1.0.0/anything', - '/api/v1.0.0/anything/plus_more' + '/api/v1.0.0-alpha2/anything', + '/api/version/1.0.0/anything', + '/api/v1.0.0/anything/plus_more', + '/api/version/1.0.0/anything/plus_more' ].freeze paths.each do |path|
test: add more test based on JoWilfrid instruction
rack-app_rack-app
train
rb
357e707e2c3b6e7423960ca97e765cc12a6ffa4a
diff --git a/lib/NormalModule.js b/lib/NormalModule.js index <HASH>..<HASH> 100644 --- a/lib/NormalModule.js +++ b/lib/NormalModule.js @@ -78,7 +78,7 @@ const contextifySourceUrl = (context, source, associatedObjectForCache) => { */ const contextifySourceMap = (context, sourceMap, associatedObjectForCache) => { if (!Array.isArray(sourceMap.sources)) return sourceMap; - const sourceRoot = sourceMap.sourceRoot; + const { sourceRoot } = sourceMap; /** @type {function(string): string} */ const mapper = !sourceRoot ? source => source
refactor: prefer destructuring approach
webpack_webpack
train
js
a06f0d0b25bd35c1a0662abedf171e468272605d
diff --git a/molgenis-core-ui/src/main/resources/js/thememanager.js b/molgenis-core-ui/src/main/resources/js/thememanager.js index <HASH>..<HASH> 100644 --- a/molgenis-core-ui/src/main/resources/js/thememanager.js +++ b/molgenis-core-ui/src/main/resources/js/thememanager.js @@ -49,6 +49,9 @@ requirejs(["vue.min"], function(Vue) { selectedTheme: function(newVal) { this.themeUrl = `${themeRepository}/mg-${newVal}-4.css` this.themeUrlLegacy = `${themeRepository}/mg-${newVal}-3.css` + // Changing the theme from the theme-manager will always use + // the current Bootstrap 4 url. + document.querySelector('#bootstrap-theme').setAttribute('href', this.themeUrl) } } })
feat: add theme preview when changing public theme
molgenis_molgenis
train
js
6383d13edd6cbd638b30dea6842b6fc480113b5e
diff --git a/benchbuild/project.py b/benchbuild/project.py index <HASH>..<HASH> 100644 --- a/benchbuild/project.py +++ b/benchbuild/project.py @@ -59,17 +59,18 @@ class ProjectRegistry(type): ) -> tp.Any: """Register a project in the registry.""" cls = super(ProjectRegistry, mcs).__new__(mcs, name, bases, attrs) + name = attrs["NAME"] if "NAME" in attrs else cls.NAME + domain = attrs["DOMAIN"] if "DOMAIN" in attrs else cls.DOMAIN + group = attrs["GROUP"] if "GROUP" in attrs else cls.GROUP - defined_attrs = all( - attr in attrs and attrs[attr] is not None - for attr in ['NAME', 'DOMAIN', 'GROUP'] - ) + defined_attrs = all(bool(attr) for attr in [name, domain, group]) if bases and defined_attrs: - key = f'{attrs["NAME"]}/{attrs["GROUP"]}' - key_dash = f'{attrs["NAME"]}-{attrs["GROUP"]}' + key = f'{name}/{group}' + key_dash = f'{name}-{group}' ProjectRegistry.projects[key] = cls ProjectRegistry.projects[key_dash] = cls + return cls
fix(project): project registration for groups This fixes project registration for grouped projects. As soon as some class attributes were defined on the group level of the type hierarchy, we wouldn't register any child of this group class. We fix this by preferring the attributes of the subclass and take the attributes of the superclass, if we can't find any.
PolyJIT_benchbuild
train
py
8fa0f44445a0ae1965f9fc82f6de81d149ec3ae3
diff --git a/webapps/ui/cockpit/client/scripts/directives/stateCircle.js b/webapps/ui/cockpit/client/scripts/directives/stateCircle.js index <HASH>..<HASH> 100644 --- a/webapps/ui/cockpit/client/scripts/directives/stateCircle.js +++ b/webapps/ui/cockpit/client/scripts/directives/stateCircle.js @@ -27,6 +27,10 @@ module.exports = function() { updateStateCircle(); }); + scope.$watch(attrs.running, function() { + updateStateCircle(); + }); + function updateStateCircle() { var incidents = scope.$eval(attrs.incidents); var running = scope.$eval(attrs.running);
chore(cockpit): watch running attr of state circle related to CAM-<I>
camunda_camunda-bpm-platform
train
js
469ab3a72f9c8feecdefa6b4b13b58b89086b1ed
diff --git a/packages/patternfly-3/patternfly-react/src/components/ModelessOverlay/ModelessOverlay.js b/packages/patternfly-3/patternfly-react/src/components/ModelessOverlay/ModelessOverlay.js index <HASH>..<HASH> 100644 --- a/packages/patternfly-3/patternfly-react/src/components/ModelessOverlay/ModelessOverlay.js +++ b/packages/patternfly-3/patternfly-react/src/components/ModelessOverlay/ModelessOverlay.js @@ -8,7 +8,7 @@ class ModelessOverlay extends React.Component { constructor(props) { super(props); this.state = { isIn: false }; - this.inTimer = new Timer(null, 150); + this.inTimer = new Timer(this.updateForTransitions, 150); } componentWillUnmount() { @@ -30,7 +30,8 @@ class ModelessOverlay extends React.Component { ); if (isIn !== show) { - this.inTimer.startTimer(() => this.updateForTransitions(), show ? 0 : 150); + this.inTimer.clearTimer(); + this.inTimer.startTimer(); } const dialogClasses = classNames('modal-dialog', {
fix(ModelessOverlay): Fix for animation on open in Firefox browser (#<I>) Use a <I>ms delay to update show & in classes for both open and close fixes #<I>
patternfly_patternfly-react
train
js
e33b7a330cf2bfa984d4d0ccb9b86455cb85dd2b
diff --git a/packages/node_modules/@webex/plugin-meetings/src/meetings/index.js b/packages/node_modules/@webex/plugin-meetings/src/meetings/index.js index <HASH>..<HASH> 100644 --- a/packages/node_modules/@webex/plugin-meetings/src/meetings/index.js +++ b/packages/node_modules/@webex/plugin-meetings/src/meetings/index.js @@ -616,8 +616,7 @@ export default class Meetings extends WebexPlugin { }) .then((options = {}) => { // Normalize the destination. - const targetDest = options.wasHydraPerson ? options.destination : destination; - + const targetDest = options.destination || destination; // check for the conversation URL then sip Url let meeting = null;
fix(plugin-meetings): use fetch info for destination
webex_spark-js-sdk
train
js
538d527e4a6b133af09adb46b01d20d7a06c59f5
diff --git a/packages/react-scripts/scripts/utils/createJestConfig.js b/packages/react-scripts/scripts/utils/createJestConfig.js index <HASH>..<HASH> 100644 --- a/packages/react-scripts/scripts/utils/createJestConfig.js +++ b/packages/react-scripts/scripts/utils/createJestConfig.js @@ -87,6 +87,7 @@ module.exports = (resolve, rootDir, isEjecting) => { 'resetModules', 'restoreMocks', 'snapshotSerializers', + 'testMatch', 'transform', 'transformIgnorePatterns', 'watchPathIgnorePatterns',
feat(react-scripts): allow testMatch for jest config (#<I>) resolves #<I>
facebook_create-react-app
train
js
ce3986de1e0404d296cf0fee7ae141adb6d04ce2
diff --git a/core/src/elements/ons-pull-hook.spec.js b/core/src/elements/ons-pull-hook.spec.js index <HASH>..<HASH> 100644 --- a/core/src/elements/ons-pull-hook.spec.js +++ b/core/src/elements/ons-pull-hook.spec.js @@ -71,7 +71,7 @@ describe('OnsPullHookElement', () => { }); }); -/* describe('#_onDrag()', () => { + describe('#_onDrag()', () => { it('does nothing if disabled', () => { const spy = chai.spy.on(pullHook, '_translateTo'); @@ -121,7 +121,7 @@ describe('OnsPullHookElement', () => { expect(spy).to.have.been.called.once; }); - });*/ + }); describe('#_onDragStart()', () => { it('does nothing if the pull hook is disabled', () => {
fix(ons-pull-hook): uncomment tests
OnsenUI_OnsenUI
train
js
1b8a274b393c3f71a0cc8bcb9af1cd99d8696c5a
diff --git a/src/loader.js b/src/loader.js index <HASH>..<HASH> 100644 --- a/src/loader.js +++ b/src/loader.js @@ -23,7 +23,6 @@ export class Loader { */ programId: PublicKey; - /** * Amount of program data placed in each load Transaction */ diff --git a/src/transaction.js b/src/transaction.js index <HASH>..<HASH> 100644 --- a/src/transaction.js +++ b/src/transaction.js @@ -20,6 +20,11 @@ export type TransactionSignature = string; export type TransactionId = string; /** + * Maximum over-the-wire size of a Transaction + */ +export const PACKET_DATA_SIZE = 512; + +/** * List of TransactionInstruction object fields that may be initialized at construction * * @typedef {Object} TransactionInstructionCtorFields @@ -290,8 +295,8 @@ export class Transaction { }); signData.copy(wireTransaction, 8 + signatures.length * 64); invariant( - wireTransaction.length < 512, - `${wireTransaction.length}, ${signatures.length}`, + wireTransaction.length <= PACKET_DATA_SIZE, + `Transaction too large: ${wireTransaction.length} > ${PACKET_DATA_SIZE}`, ); return wireTransaction; }
refactor: add constant for max Transaction size
solana-labs_solana-web3.js
train
js,js
09a5983f105ef53c818d806ed5b0618603672e88
diff --git a/src/components/autoplay.js b/src/components/autoplay.js index <HASH>..<HASH> 100644 --- a/src/components/autoplay.js +++ b/src/components/autoplay.js @@ -62,12 +62,16 @@ export default function (Glide, Components, Events) { * @return {Void} */ bind () { - Binder.on('mouseover', Components.Html.root, () => { + Binder.on('mouseenter', Components.Html.root, () => { this.stop() + + Events.emit('autoplay.over') }) - Binder.on('mouseout', Components.Html.root, () => { + Binder.on('mouseleave', Components.Html.root, () => { this.start() + + Events.emit('autoplay.out') }) },
feat(autoplay): Emit events for hoverpause (#<I>)
glidejs_glide
train
js
0be417a0b48fe2d4d920f29402fdd74fed6e03f2
diff --git a/anyconfig/api.py b/anyconfig/api.py index <HASH>..<HASH> 100644 --- a/anyconfig/api.py +++ b/anyconfig/api.py @@ -216,9 +216,6 @@ def multi_load(paths, ac_parser=None, ac_template=False, ac_context=None, if ac_merge not in MERGE_STRATEGIES: raise ValueError("Invalid merge strategy: " + ac_merge) - if not paths: - return container() - schema = format_checker = None if ac_schema is not None: kwargs["ac_schema"] = None # Avoid infinit loop
refactor: do not check given paths is empty as the check is not needed actually in api.multi_load
ssato_python-anyconfig
train
py
69af8b8b2b888f49735ad88d5b8b32afaf6e0167
diff --git a/tests/fixtures/TeamCityFormatter.php b/tests/fixtures/TeamCityFormatter.php index <HASH>..<HASH> 100644 --- a/tests/fixtures/TeamCityFormatter.php +++ b/tests/fixtures/TeamCityFormatter.php @@ -43,7 +43,7 @@ class TeamCityFormatter extends JsonFormatter /** * @inheritDoc */ - public function format(array $record) + public function format(array $record): string { if (isset($record['context']['responseBody']) && isset($record['context']['responseHeaders']['content-type']) &&
test(TC): fix TC formatter
commercetools_commercetools-php-sdk
train
php
90e201ee15ef5f1930e782e3361876907b4721ae
diff --git a/okdownload/src/main/java/com/liulishuo/okdownload/core/breakpoint/BreakpointStoreOnCache.java b/okdownload/src/main/java/com/liulishuo/okdownload/core/breakpoint/BreakpointStoreOnCache.java index <HASH>..<HASH> 100644 --- a/okdownload/src/main/java/com/liulishuo/okdownload/core/breakpoint/BreakpointStoreOnCache.java +++ b/okdownload/src/main/java/com/liulishuo/okdownload/core/breakpoint/BreakpointStoreOnCache.java @@ -75,7 +75,7 @@ public class BreakpointStoreOnCache implements BreakpointStore { BreakpointInfo newInfo = new BreakpointInfo(id, task.getUrl(), task.getParentPath(), task.getFilename()); - synchronized (this){ + synchronized (this) { storedInfos.put(id, newInfo); unStoredTasks.remove(id); } @@ -117,7 +117,7 @@ public class BreakpointStoreOnCache implements BreakpointStore { @Override public void onTaskEnd(int id, @NonNull EndCause cause, @Nullable Exception exception) { if (cause == EndCause.COMPLETED) { - synchronized (this){ + synchronized (this) { storedInfos.remove(id); if (unStoredTasks.get(id) == null) sortedOccupiedIds.remove(Integer.valueOf(id)); }
chore: fix style check issue on store-on-cache
lingochamp_okdownload
train
java
97e87a42eaeb78b1d2193df8bd6fbb26324d8226
diff --git a/lib/iterator.js b/lib/iterator.js index <HASH>..<HASH> 100644 --- a/lib/iterator.js +++ b/lib/iterator.js @@ -96,5 +96,16 @@ module.exports = function BlastIterator(Blast, Collection) { return {done: true}; }); + /** + * Reset the iterator, go back to the beginning + * + * @author Jelle De Loecker <jelle@codedor.be> + * @since 0.1.4 + * @version 0.1.4 + */ + Iterator.setMethod(function reset() { + this._iterNextIndex = 0; + }); + Blast.defineClass('Iterator', Iterator); }; \ No newline at end of file
feat: add Iterator#reset, to go back to the beginning
skerit_protoblast
train
js
9b6f0f70ce8265f44a65265b0192d34c11b1a4b7
diff --git a/gulpfile.js b/gulpfile.js index <HASH>..<HASH> 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -234,7 +234,7 @@ gulp.task('demo:deploy', ['demo'], function () { return gulp.src(path.join(config.tmp.demo, '/**/*')) .pipe(ghPages({ cacheDir: config.tmp.deployDemo, - remoteUrl: 'https://github.com/zalando/brand-solutions-dress-code.git' + remoteUrl: 'https://github.com/zalando/dress-code.git' })); }); @@ -325,7 +325,7 @@ gulp.task('dist:bower:deploy', ['dist:bower'], function () { .pipe(ghPages({ cacheDir: config.tmp.deployBower, branch: 'master', - remoteUrl: 'git@github.com:zalando/brand-solutions-dress-code-bower' + remoteUrl: 'git@github.com:zalando/dress-code-bower' })); });
refactor(project-name): updates the gulpfile fix #<I>
zalando_dress-code
train
js
1ffee54245276fea61d06a6a2ea197b1ab836c39
diff --git a/tests/config_test.py b/tests/config_test.py index <HASH>..<HASH> 100644 --- a/tests/config_test.py +++ b/tests/config_test.py @@ -1,11 +1,8 @@ # coding=utf-8 from ladybug.config import folders -import pytest - def test_config_init(): """Test the initialization of the config module and basic properties.""" assert hasattr(folders, 'default_epw_folder') assert isinstance(folders.default_epw_folder, str) - \ No newline at end of file
style(config_test): remove unused import This PR is mainly for testing the CLA set-up. Let's see if it works as expected.
ladybug-tools_ladybug
train
py
6a1bf2756be068fa031fdc952ee38d442027439a
diff --git a/bindings/angular1/directives/carousel.js b/bindings/angular1/directives/carousel.js index <HASH>..<HASH> 100755 --- a/bindings/angular1/directives/carousel.js +++ b/bindings/angular1/directives/carousel.js @@ -138,10 +138,6 @@ element = null; }); - setImmediate(function() { - carousel.refresh(); - }); - $onsen.fireComponentEvent(element[0], 'init'); }; },
fix(ons-carousel): Fix a size issue with navigator in angular.
OnsenUI_OnsenUI
train
js
ac23d79fe7e155506945666544abb7884388d7cd
diff --git a/framework/core/src/User/User.php b/framework/core/src/User/User.php index <HASH>..<HASH> 100644 --- a/framework/core/src/User/User.php +++ b/framework/core/src/User/User.php @@ -449,10 +449,10 @@ class User extends AbstractModel */ protected function getUnreadNotifications() { - static $cached = null; + static $cached = []; - if (is_null($cached)) { - $cached = $this->notifications() + if (! isset($cached[$this->id])) { + $cached[$this->id] = $this->notifications() ->whereIn('type', $this->getAlertableNotificationTypes()) ->whereNull('read_at') ->where('is_deleted', false) @@ -460,7 +460,7 @@ class User extends AbstractModel ->get(); } - return $cached; + return $cached[$this->id]; } /**
fix: unread notifications are globally cached between users. (#<I>)
flarum_core
train
php
7c6e2a15fddf1b56b42a2ad1a181db01c6f928a4
diff --git a/hawtio-system/src/main/java/io/hawt/web/auth/AuthenticationConfiguration.java b/hawtio-system/src/main/java/io/hawt/web/auth/AuthenticationConfiguration.java index <HASH>..<HASH> 100644 --- a/hawtio-system/src/main/java/io/hawt/web/auth/AuthenticationConfiguration.java +++ b/hawtio-system/src/main/java/io/hawt/web/auth/AuthenticationConfiguration.java @@ -14,8 +14,8 @@ public class AuthenticationConfiguration { private static final transient Logger LOG = LoggerFactory.getLogger(AuthenticationConfiguration.class); public static final String LOGIN_URL = "/auth/login"; - public static final String[] UNSECURED_PATHS = {"/auth", "/css", "/img", "/js", "/hawtconfig.json", - "/jolokia", "/keycloak", "/libs", "/oauth", "/user", "/login.html"}; + public static final String[] UNSECURED_PATHS = {"/auth", "/css", "/fonts", "/img", "/js", "/hawtconfig.json", + "/jolokia", "/keycloak", "/oauth", "/user", "/login.html"}; // Configuration properties public static final String AUTHENTICATION_ENABLED = "authenticationEnabled";
fix(hawtio-system): add '/fonts' to the list of unsecured paths and remove '/libs' fix #<I>
hawtio_hawtio
train
java
b094802a03406328699bffad6deeceb5bdb61777
diff --git a/server/artifacts/artifact_server.go b/server/artifacts/artifact_server.go index <HASH>..<HASH> 100644 --- a/server/artifacts/artifact_server.go +++ b/server/artifacts/artifact_server.go @@ -95,9 +95,12 @@ func (a *ArtifactServer) gateKeeping(r *http.Request) (context.Context, error) { if token == "" { cookie, err := r.Cookie("authorization") if err != nil { - return nil, err + if err != http.ErrNoCookie { + return nil, err + } + } else { + token = cookie.Value } - token = cookie.Value } ctx := metadata.NewIncomingContext(r.Context(), metadata.MD{"authorization": []string{token}}) return a.authN.Context(ctx)
fix: Allow download of artifacs in server auth-mode. Fixes #<I> (#<I>)
argoproj_argo
train
go
a9d5094e59b6f0957bb8714653213592b40feedc
diff --git a/packages/icon/src/react/index.js b/packages/icon/src/react/index.js index <HASH>..<HASH> 100644 --- a/packages/icon/src/react/index.js +++ b/packages/icon/src/react/index.js @@ -62,14 +62,14 @@ const rmNonHtmlProps = props => { const Icon = props => { return ( <IconContainer {...rmNonHtmlProps(props)}> - {icons[props.id](React)} + {props.children || icons[props.id](React)} </IconContainer> ) } import PropTypes from 'prop-types' Icon.propTypes = { - id: PropTypes.oneOf(Object.keys(ids)).isRequired, + id: PropTypes.oneOf(Object.keys(ids)), size: PropTypes.oneOf(Object.keys(sizes)) } Icon.defaultProps = {
feat(icon): handle custom icon pass as a child Fixes #<I>
pluralsight_design-system
train
js
33f7ab9c2567bf5546446845e22c5f27e58ce376
diff --git a/src/style.js b/src/style.js index <HASH>..<HASH> 100644 --- a/src/style.js +++ b/src/style.js @@ -287,6 +287,9 @@ export default class Style { width: width + 'px' }); + // remove the body height, so that it resets to it's original + $.removeStyle(this.bodyScrollable, 'height'); + // when there are less rows than the container // adapt the container height const height = $.getStyle(this.bodyScrollable, 'height');
fix: 🐛 Reset body height before setting the bodyStyle In case when there are very less number of rows, the height will adapt to a lower value. But in the next refresh the number of rows could increase so the body height should be reset to it's original value
frappe_datatable
train
js
d79c051f948c5be0e9a6528f5ddd8121f366e131
diff --git a/test/e2e/upgrade/service/service.go b/test/e2e/upgrade/service/service.go index <HASH>..<HASH> 100644 --- a/test/e2e/upgrade/service/service.go +++ b/test/e2e/upgrade/service/service.go @@ -49,7 +49,7 @@ func (t *UpgradeTest) Setup(f *framework.Framework) { infra, err := configClient.ConfigV1().Infrastructures().Get(context.Background(), "cluster", metav1.GetOptions{}) framework.ExpectNoError(err) // ovirt does not support service type loadbalancer because it doesn't program a cloud. - if infra.Status.PlatformStatus.Type == configv1.OvirtPlatformType || infra.Status.PlatformStatus.Type == configv1.KubevirtPlatformType || infra.Status.PlatformStatus.Type == configv1.LibvirtPlatformType { + if infra.Status.PlatformStatus.Type == configv1.OvirtPlatformType || infra.Status.PlatformStatus.Type == configv1.KubevirtPlatformType || infra.Status.PlatformStatus.Type == configv1.LibvirtPlatformType || infra.Status.PlatformStatus.Type == configv1.VSpherePlatformType { t.unsupportedPlatform = true } if t.unsupportedPlatform {
test: add vsphere to unsupported platforms for LB service
openshift_origin
train
go
972f44d32896aa3e8284f5e793c3f40dc0d62b20
diff --git a/lib/FrameManager.js b/lib/FrameManager.js index <HASH>..<HASH> 100644 --- a/lib/FrameManager.js +++ b/lib/FrameManager.js @@ -715,7 +715,7 @@ class WaitTask { } // Ignore timeouts in pageScript - we track timeouts ourselves. - if (!error && !(await success.jsonValue())) { + if (!error && await this._frame.evaluate(s => !s, success)) { await success.dispose(); return; } diff --git a/test/test.js b/test/test.js index <HASH>..<HASH> 100644 --- a/test/test.js +++ b/test/test.js @@ -703,6 +703,9 @@ describe('Page', function() { it('should return the success value as a JSHandle', async({page}) => { expect(await (await page.waitForFunction(() => 5)).jsonValue()).toBe(5); }); + it('should return the window as a success value', async({ page }) => { + expect(await page.waitForFunction(() => window)).toBeTruthy(); + }); it('should accept ElementHandle arguments', async({page}) => { await page.setContent('<div></div>'); const div = await page.$('div');
fix: avoid calling jsonValue from waitFor (#<I>) If the success value of `waitForFunction` was not serializable, checking whether it was truthy with `.jsonValue()` might fail. Now I check whether it was truthy inside the page. Fixes #<I>.
GoogleChrome_puppeteer
train
js,js
c645c060c4f381902c2005eefe5b3a7bfa63cdcc
diff --git a/lib/reporter.js b/lib/reporter.js index <HASH>..<HASH> 100644 --- a/lib/reporter.js +++ b/lib/reporter.js @@ -49,7 +49,12 @@ var createReporters = function(names, config, emitter, injector) { try { reporters.push(injector.createChild([locals], ['reporter:' + name]).get('reporter:' + name)); } catch(e) { - log.warn('Reporter "%s" is not registered!', name); + if (e.message.indexOf('No provider for "reporter:' + name + '"') !== -1) { + log.warn('Can not load "%s", it is not registered!\n ' + + 'Perhaps you are missing some plugin?', name); + } else { + log.warn('Can not load "%s"!\n ' + e.stack, name); + } } });
fix(reporter): better errors when loading reporters
karma-runner_karma
train
js
d18f6a5ad72e10992deee972828a0e3584e967e9
diff --git a/clb/client_test.go b/clb/client_test.go index <HASH>..<HASH> 100644 --- a/clb/client_test.go +++ b/clb/client_test.go @@ -10,6 +10,26 @@ import ( var _ = fmt.Print // For debugging; delete when done. var _ = log.Print // For debugging; delete when done. +func Example() { + srvName := "foo.service.fliglio.com" + c := NewRoundRobinClb("8.8.8.8", "53") + address, err := c.GetAddress(srvName) + if err != nil { + fmt.Print(err) + } + + if address.Port == 8001 { + fmt.Printf("%s", address) + } else { + address2, err := c.GetAddress(srvName) + if err != nil { + fmt.Print(err) + } + fmt.Printf("%s", address2) + } + // Output: 0.1.2.3:8001 +} + func doStuff(c LoadBalancer) error { srvName := "foo.service.fliglio.com" _, err := c.GetAddress(srvName)
style(tests): rearranging tests
benschw_srv-lb
train
go
080eb060faa54bb7b7fbef3d274bd30f7794253c
diff --git a/src/collapsible/collapsible.js b/src/collapsible/collapsible.js index <HASH>..<HASH> 100644 --- a/src/collapsible/collapsible.js +++ b/src/collapsible/collapsible.js @@ -1,5 +1,6 @@ import {customAttribute, bindable, bindingMode, inject} from 'aurelia-framework'; import { getBooleanFromAttributeValue } from '../common/attributes'; +import { CssClassSetter } from '../common/cssClassSetter'; @customAttribute('md-collapsible') @bindable({ name: 'accordion', defaultValue: false }) @@ -8,11 +9,18 @@ import { getBooleanFromAttributeValue } from '../common/attributes'; export class MdCollapsible { constructor(element) { this.element = element; + this.classSetter = new CssClassSetter(this.element); } attached() { + this.classSetter.addClasses('collapsible'); this.refresh(); } + + detached() { + this.classSetter.removeClasses('collapsible'); + } + refresh() { let accordion = getBooleanFromAttributeValue(this.accordion); if (accordion) {
refactor(collapsible): changed collapsible to set css classes
aurelia-ui-toolkits_aurelia-materialize-bridge
train
js
dd3a79eead4f01094c2c3003de717affc11fdc3c
diff --git a/src/util/Options.js b/src/util/Options.js index <HASH>..<HASH> 100644 --- a/src/util/Options.js +++ b/src/util/Options.js @@ -35,7 +35,7 @@ * (e.g. recommended shard count, shard count of the ShardingManager) * @property {CacheFactory} [makeCache] Function to create a cache. * You can use your own function, or the {@link Options} class to customize the Collection used for the cache. - * <warn>Overriding the cache used in `GuildManager`, `ChannelManager`, 'GuildChannelManager', `RoleManager`, + * <warn>Overriding the cache used in `GuildManager`, `ChannelManager`, `GuildChannelManager`, `RoleManager`, * and `PermissionOverwriteManager` is unsupported and **will** break functionality</warn> * @property {number} [messageCacheLifetime=0] DEPRECATED: Use `makeCache` with a `LimitedCollection` instead. * How long a message should stay in the cache until it is considered sweepable (in seconds, 0 for forever)
docs: typo in ClientOptions (#<I>)
discordjs_discord.js
train
js
32f24c4657638c16dc290e8327ea10844be2b825
diff --git a/src/ItemsCarousel/ItemsCarouselBase.js b/src/ItemsCarousel/ItemsCarouselBase.js index <HASH>..<HASH> 100644 --- a/src/ItemsCarousel/ItemsCarouselBase.js +++ b/src/ItemsCarousel/ItemsCarouselBase.js @@ -244,7 +244,10 @@ ItemsCarouselBase.propTypes = { isPlaceholderMode: PropTypes.bool.isRequired, // Props coming from withContainerWidth containerWidth: PropTypes.number.isRequired, - measureRef: PropTypes.object.isRequired, + measureRef: PropTypes.oneOfType([ + PropTypes.func, // for legacy refs + PropTypes.shape({ current: PropTypes.object }) + ]).isRequired, // Props coming from withSwipe touchRelativeX: PropTypes.number.isRequired, onWrapperTouchStart: PropTypes.func,
fix: warning of wrong measureRef type for legacy refs
bitriddler_react-items-carousel
train
js
a90b0f0afd2ee7b1e86467b874f26ed1809af723
diff --git a/test/integration/read.js b/test/integration/read.js index <HASH>..<HASH> 100644 --- a/test/integration/read.js +++ b/test/integration/read.js @@ -1167,6 +1167,23 @@ module.exports = function (createFn, setup, dismantle) { done() }) }) + + it('GET /Customer/count 200 - ignores sort', (done) => { + request.get({ + url: `${testUrl}/api/v1/Customer/count`, + qs: { + sort: { + _id: 1 + } + }, + json: true + }, (err, res, body) => { + assert.ok(!err) + assert.equal(res.statusCode, 200) + assert.equal(body.count, 3) + done() + }) + }) }) describe('shallow', () => {
chore(test): sort arg on count query
florianholzapfel_express-restify-mongoose
train
js
65e864216f0732d9d907c3092eb4411d6a2e567e
diff --git a/test/instrumentation/modules/http/timeout-disabled.js b/test/instrumentation/modules/http/timeout-disabled.js index <HASH>..<HASH> 100644 --- a/test/instrumentation/modules/http/timeout-disabled.js +++ b/test/instrumentation/modules/http/timeout-disabled.js @@ -19,7 +19,7 @@ test('client-side timeout - call end', function (t) { t.equal(agent._instrumentation._queue._samples.length, 1, 'should add transactions to queue') server.close() t.end() - }, 50) + }, 100) }) clientReq.abort() @@ -54,7 +54,7 @@ test('client-side timeout - don\'t call end', function (t) { t.equal(agent._instrumentation._queue._samples.length, 0, 'should not add transactions to queue') server.close() t.end() - }, 50) + }, 100) }) clientReq.abort()
test: increase timeouts to increase chance of tests passing
opbeat_opbeat-node
train
js
bda4654134adb7141d87ed4b1c25a78a79f70a61
diff --git a/packages/blueprint-gatekeeper/app/policies/gatekeeper/auth/bearer.js b/packages/blueprint-gatekeeper/app/policies/gatekeeper/auth/bearer.js index <HASH>..<HASH> 100644 --- a/packages/blueprint-gatekeeper/app/policies/gatekeeper/auth/bearer.js +++ b/packages/blueprint-gatekeeper/app/policies/gatekeeper/auth/bearer.js @@ -144,7 +144,7 @@ module.exports = Policy.extend ({ // Translate the error, if necessary. We have to check the name because the error // could be related to token verification. if (err.name === 'TokenExpiredError') - err = new ForbiddenError ('token_expired', 'The access token has expired.'); + return { failureCode: 'token_expired', failureMessage: 'The access token has expired.'}; if (err.name === 'JsonWebTokenError') err = new ForbiddenError ('invalid_token', err.message);
fix: token_expired should be <I>, not <I>
onehilltech_blueprint
train
js
4b49ca822338f191603c1887382b91a9be31cdb3
diff --git a/tests/telemetry.test.js b/tests/telemetry.test.js index <HASH>..<HASH> 100644 --- a/tests/telemetry.test.js +++ b/tests/telemetry.test.js @@ -49,7 +49,7 @@ test.serial('should track --telemetry-enable', async (t) => { test.serial('should send netlify-cli/<version> user-agent', async (t) => { await withMockApi(routes, async ({ apiUrl, requests }) => { await callCli(['api', 'listSites'], getCLIOptions(apiUrl)) - t.is(requests.length, 2) + t.true(requests.length >= 2) // example: netlify-cli/6.14.25 darwin-x64 node-v16.13.0 const userAgent = requests[1].headers['user-agent'] t.assert(userAgent.startsWith(`${name}/${version}`))
test: fix a test that was failing locally (#<I>) Fixes #<I>
netlify_cli
train
js
d38d1b34373c50907e7c7673def8ba0ebc5a5427
diff --git a/src/http-client.js b/src/http-client.js index <HASH>..<HASH> 100644 --- a/src/http-client.js +++ b/src/http-client.js @@ -59,7 +59,7 @@ export class HttpClient { } else if (typeof config === 'function') { normalizedConfig = new HttpClientConfiguration(); let c = config(normalizedConfig); - if (typeof c === HttpClientConfiguration) { + if (c instanceof HttpClientConfiguration) { normalizedConfig = c; } } else {
fix(http-client): correct type check
aurelia_fetch-client
train
js
bf5bc1ebce6fda1fdb12b909b27e59fb5a010f36
diff --git a/packages/cozy-konnector-libs/src/libs/categorization/localModel/parameters.js b/packages/cozy-konnector-libs/src/libs/categorization/localModel/parameters.js index <HASH>..<HASH> 100644 --- a/packages/cozy-konnector-libs/src/libs/categorization/localModel/parameters.js +++ b/packages/cozy-konnector-libs/src/libs/categorization/localModel/parameters.js @@ -1,11 +1,21 @@ -const { BankTransaction } = require('cozy-doctypes') +const cozyClient = require('../../cozyclient') +const { Q } = require('cozy-client') async function fetchTransactionsWithManualCat() { - const transactionsWithManualCat = await BankTransaction.queryAll({ - manualCategoryId: { $exists: true } - }) + const client = cozyClient.new - return transactionsWithManualCat + const query = Q('io.cozy.bank.operations') + .where({ + manualCategoryId: { $gt: null } + }) + .partialIndex({ + manualCategoryId: { + $exists: true + } + }) + .indexFields(['manualCategoryId']) + + return client.queryAll(query) } module.exports = {
fix: Use cozy-client method to query operations with manual category We used to query operations with manual category, through cozy-doctypes, which: - uses old cozy-client - uses deprecated and slow pagination skip Furthermore, the query was not using any index. We now use a partial index, which is much more efficient for this query.
konnectors_libs
train
js
aa99fc3624a1d7969f9f6b2ca0ab8cb7157b2f57
diff --git a/anytemplate/engines/tests/base.py b/anytemplate/engines/tests/base.py index <HASH>..<HASH> 100644 --- a/anytemplate/engines/tests/base.py +++ b/anytemplate/engines/tests/base.py @@ -16,6 +16,7 @@ class Test(unittest.TestCase): def test_20_instance_methods(self): engine = TT.Engine() + self.assertTrue(isinstance(engine, TT.Engine)) try: engine.renders_impl("aaa", {}) # Template string must be given. engine.render_impl(__file__, {})
fix: check if instance is correctly created in .engines.tests.base
ssato_python-anytemplate
train
py
e2ed53c68837f3eb07e7c7a170220592178029b9
diff --git a/packages/date/src/Date.js b/packages/date/src/Date.js index <HASH>..<HASH> 100644 --- a/packages/date/src/Date.js +++ b/packages/date/src/Date.js @@ -75,9 +75,9 @@ const AvDate = ({ date.isValid() ? isoFormatted : '', false ); + setFieldTouched(name, true, false); if (date.isValid()) { - setFieldTouched(name, true, false); if (isFocused !== false) { setIsFocused(false); }
fix(date): setFieldTouched moved out of validation
Availity_availity-react
train
js
a366a787e0a07db649849fd7a250b266c8c77ae7
diff --git a/karma.conf.js b/karma.conf.js index <HASH>..<HASH> 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -94,7 +94,8 @@ module.exports = function(config) { // possible values: config.LOG_DISABLE || config.LOG_ERROR || config.LOG_WARN || config.LOG_INFO || config.LOG_DEBUG logLevel: config.LOG_WARN, - browsers: ['Chrome', 'IE'], + // browsers: ['Chrome', 'IE'], + browsers: ['Chrome'], plugins: [ require('karma-jasmine'),
test: remove IE from karma
Availity_availity-angular
train
js
22988428f5bf9c68d6402bcc812a090f644d032a
diff --git a/test/test.js b/test/test.js index <HASH>..<HASH> 100644 --- a/test/test.js +++ b/test/test.js @@ -55,7 +55,7 @@ describe('node-serialize', function () { }); it('should serialize a Document node', function () { - var node = document.implementation.createDocument('http://www.w3.org/1999/xhtml', 'html'); + var node = document.implementation.createDocument('http://www.w3.org/1999/xhtml', 'html', null); assert.equal('<html></html>', serialize(node)); });
test: force doctype to `null`
webmodules_dom-serialize
train
js
ce80f432b1c2fb3476c291bad79d4f758346eb21
diff --git a/test/integration/setup.js b/test/integration/setup.js index <HASH>..<HASH> 100644 --- a/test/integration/setup.js +++ b/test/integration/setup.js @@ -1,3 +1,4 @@ +var _ = require('lodash') var async = require('async') var mongoose = require('mongoose') var Schema = mongoose.Schema @@ -74,7 +75,16 @@ module.exports = function () { points: Number }) - function initialize (callback) { + function initialize (opts, callback) { + if (_.isFunction(opts)) { + callback = opts + opts = {} + } + + _.defaults(opts, { + connect: true + }) + if (!mongoose.models.Customer) { mongoose.model('Customer', CustomerSchema) } @@ -95,7 +105,11 @@ module.exports = function () { mongoose.model('Account', AccountSchema) } - mongoose.connect('mongodb://localhost/database', callback) + if (opts.connect) { + mongoose.connect('mongodb://localhost/database', callback) + } else if (_.isFunction(callback)) { + callback() + } } function reset (callback) {
chore(test): option to init with connecting
florianholzapfel_express-restify-mongoose
train
js
61d4a11761e8f38056e810e45bfe57a18d368668
diff --git a/lib/components/narrative/default/default-itinerary.js b/lib/components/narrative/default/default-itinerary.js index <HASH>..<HASH> 100644 --- a/lib/components/narrative/default/default-itinerary.js +++ b/lib/components/narrative/default/default-itinerary.js @@ -222,7 +222,7 @@ class DefaultItinerary extends NarrativeItinerary { // Picking 0 ensures that if multiple flex legs with // different phone numbers, the first leg is prioritized phone = itinerary.legs - .map((leg) => leg.pickupBookingInfo.contactInfo.phoneNumber) + .map((leg) => leg.pickupBookingInfo?.contactInfo?.phoneNumber) .filter((number) => !!number)[0] } return (
refactor(default-itinerary): don't crash on missing bookingInfo
opentripplanner_otp-react-redux
train
js
53d076e0f12717095db5551c497c0ffdf4ba3342
diff --git a/lib/connection.js b/lib/connection.js index <HASH>..<HASH> 100644 --- a/lib/connection.js +++ b/lib/connection.js @@ -467,9 +467,10 @@ class Connection extends EventEmitter { // this.compressedSequenceId = 0; // this.sequenceId = 0; if (this.config.debug) { + const commandName = cmd.constructor.name; // eslint-disable-next-line no-console - console.log('Add command: ' + arguments.callee.caller.name); - cmd._commandName = arguments.callee.caller.name; + console.log('Add command: ' + commandName); + cmd._commandName = commandName; } if (!this._command) { this._command = cmd;
fix(debug): remove usage of callee
sidorares_node-mysql2
train
js
160f7111834fef119f311366a64e7acc67d078cf
diff --git a/google-cloud-pubsub/lib/google/cloud/pubsub/subscriber/inventory.rb b/google-cloud-pubsub/lib/google/cloud/pubsub/subscriber/inventory.rb index <HASH>..<HASH> 100644 --- a/google-cloud-pubsub/lib/google/cloud/pubsub/subscriber/inventory.rb +++ b/google-cloud-pubsub/lib/google/cloud/pubsub/subscriber/inventory.rb @@ -40,7 +40,8 @@ module Google end def add *ack_ids - ack_ids.flatten!.compact! + ack_ids.flatten! + ack_ids.compact! return if ack_ids.empty? synchronize do @@ -50,7 +51,8 @@ module Google end def remove *ack_ids - ack_ids.flatten!.compact! + ack_ids.flatten! + ack_ids.compact! return if ack_ids.empty? synchronize do
fix(pubsub): Fix Subscriber Inventory bug Remove chaining mutation methods in Subscriber Inventory because the mutation methods returned nil instead of self when no change was made. [pr #<I>]
googleapis_google-cloud-ruby
train
rb
5096a2b4024e020aefade98a57ecfa222b84dbd4
diff --git a/test/setup.js b/test/setup.js index <HASH>..<HASH> 100644 --- a/test/setup.js +++ b/test/setup.js @@ -170,3 +170,9 @@ mock('spawnteract', { }); }, }); + +mock('fs', { + unlinkSync: function(){}, + unlink: function(){}, + existsSync: function(){}, +});
test: mock fs I noticed when running the tests that 'filename' (literally) was being created at the root while running tests. This forces our use of `fs` to be mocked within tests.
nteract_nteract
train
js
5b4db728ecfdaddfb93f1a2dd4830b058b6b45a7
diff --git a/src/components/elements/inputs/number-input.js b/src/components/elements/inputs/number-input.js index <HASH>..<HASH> 100644 --- a/src/components/elements/inputs/number-input.js +++ b/src/components/elements/inputs/number-input.js @@ -8,7 +8,7 @@ export default ({ className, errors, onChange, onCommit, property, value }) => ( disabled={property.disabled} id={property.id} onBlur={() => onCommit()} - onChange={e => onChange(e.target.valueAsNumber)} + onChange={e => onChange(e.target.value)} title={property.title} type='number' value={value} />
fix: Fix bug which stopped users from submitting decimal values in number fields
cignium_hypermedia-client
train
js
c775ee9c0fb8bc1dedf391d39bbb55a2c4d5211e
diff --git a/memote/suite/tests/test_biomass.py b/memote/suite/tests/test_biomass.py index <HASH>..<HASH> 100644 --- a/memote/suite/tests/test_biomass.py +++ b/memote/suite/tests/test_biomass.py @@ -28,7 +28,6 @@ from __future__ import absolute_import, division import logging import pytest -import numpy as np from cobra.exceptions import OptimizationError import memote.support.biomass as biomass @@ -87,8 +86,10 @@ def test_biomass_consistency(read_only_model, reaction_id): """The component molar mass of the biomass reaction {} sums up to {} which is outside of the 1e-03 margin from 1 mmol / g[CDW] / h. """.format(reaction_id, ann["data"][reaction_id])) - assert np.isclose( - ann["data"][reaction_id], 1.0, atol=1e-03), ann["message"][reaction_id] + # To account for numerical innacuracies, a range from 1-1e0-3 to 1+1e-06 + # is implemented in the assertion check + assert (1 - 1e-03) < ann["data"][reaction_id] < (1 + 1e-06), \ + ann["message"][reaction_id] @pytest.mark.parametrize("reaction_id", BIOMASS_IDS)
fix: fix assertion check (#<I>) * fix: provide more slack for biomass consistency check
opencobra_memote
train
py
c522c994cd162bc42d987e2ebb08f3d0a2b6f644
diff --git a/lib/client.js b/lib/client.js index <HASH>..<HASH> 100644 --- a/lib/client.js +++ b/lib/client.js @@ -14,6 +14,7 @@ const { InvalidArgumentError, RequestAbortedError, ClientDestroyedError, + ClientClosedError, HeadersTimeoutError, SocketError, InformationalError, @@ -241,6 +242,14 @@ class Client extends EventEmitter { } [kEnqueue] (request) { + if (this[kDestroyed]) { + throw new ClientDestroyedError() + } + + if (this[kClosed]) { + throw new ClientClosedError() + } + this[kQueue].push(request) if (this[kResuming]) { // Do nothing.
fix: add destroyed & closed check to enqueue
mcollina_undici
train
js
fb30c1e28c617f66b446195580670caeaa24e838
diff --git a/tests/Providers/RouteServiceProviderTest.php b/tests/Providers/RouteServiceProviderTest.php index <HASH>..<HASH> 100644 --- a/tests/Providers/RouteServiceProviderTest.php +++ b/tests/Providers/RouteServiceProviderTest.php @@ -50,10 +50,8 @@ class RouteServiceProviderTest extends TestCase $closure($this->router); }) ->shouldReceive('get') - ->once() ->andReturnNull() ->shouldReceive('post') - ->once() ->andReturnNull(); } @@ -61,4 +59,9 @@ class RouteServiceProviderTest extends TestCase { $this->assertNull($this->serviceProvider->boot($this->router)); } + + public function test_register() + { + $this->assertNull($this->serviceProvider->register()); + } }
test: Make coverage to <I>%
CasperLaiTW_laravel-fb-messenger
train
php
5ac8ac0e6c7939ddd42fbaefd63c64f4ec2ee045
diff --git a/superset/views/redirects.py b/superset/views/redirects.py index <HASH>..<HASH> 100644 --- a/superset/views/redirects.py +++ b/superset/views/redirects.py @@ -66,7 +66,7 @@ class R(BaseSupersetView): # pylint: disable=invalid-name url = request.form.get("data") if not self._validate_url(url): logger.warning("Invalid URL: %s", url) - return Response(f"Invalid URL: {url}", 400) + return Response("Invalid URL", 400) obj = models.Url(url=url) db.session.add(obj) db.session.commit()
fix: don't send invalid URLs back to the user (#<I>) * fix: don't send bogus URLs back to the user * lint, remove f string
apache_incubator-superset
train
py
4d608dbb348c52b3f719f3631aae6008cafefcb5
diff --git a/dockertest.go b/dockertest.go index <HASH>..<HASH> 100644 --- a/dockertest.go +++ b/dockertest.go @@ -557,7 +557,7 @@ func (d *Pool) Retry(op func() error) error { bo.MaxElapsedTime = d.MaxWait if err := backoff.Retry(op, bo); err != nil { if bo.NextBackOff() == backoff.Stop { - return fmt.Errorf("reached retry deadline") + return fmt.Errorf("reached retry deadline: %w", err) } return err
fix: return original error from retry deadline (#<I>)
ory_dockertest
train
go