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
074ce584b51ead79b916ae0228c68d2b582926b1
diff --git a/testing/label_service.go b/testing/label_service.go index <HASH>..<HASH> 100644 --- a/testing/label_service.go +++ b/testing/label_service.go @@ -267,7 +267,7 @@ func FindLabels( } } - if diff := cmp.Diff(labels, tt.wants.labels, mappingCmpOptions...); diff != "" { + if diff := cmp.Diff(labels, tt.wants.labels, labelCmpOptions...); diff != "" { t.Errorf("labels are different -got/+want\ndiff %s", diff) } })
fix(testing): use correct comparison options for label find (#<I>)
influxdata_influxdb
train
go
b51c15028080a27d855c5159c7a5615af475f066
diff --git a/lib/couchdb.js b/lib/couchdb.js index <HASH>..<HASH> 100644 --- a/lib/couchdb.js +++ b/lib/couchdb.js @@ -159,6 +159,10 @@ var Db = function (uri) { var stopped = false; var resultsById = {}; var queriesLeft = Object.keys(queriesById).length; + if (queriesLeft === 0) { + process.nextTick(cb); + return; + } for (var queryId in queriesById) { (function (queryId) { var queryOpts = queriesById[queryId];
fix: calling multiqueryView with no queries
afters_couch-incarnate
train
js
9e5cf59ceaa66b534ef95d519cacb8afc4814215
diff --git a/src/flush-microtasks.js b/src/flush-microtasks.js index <HASH>..<HASH> 100644 --- a/src/flush-microtasks.js +++ b/src/flush-microtasks.js @@ -20,9 +20,6 @@ function getIsUsingFakeTimers() { const globalObj = typeof window === 'undefined' ? global : window let Scheduler = globalObj.Scheduler -const isModernScheduleCallbackSupported = satisfies(React.version, '>16.8.6', { - includePrerelease: true, -}) let didWarnAboutMessageChannel = false let enqueueTask @@ -58,9 +55,14 @@ try { 'if you encounter this warning.', ) } + } } +const isModernScheduleCallbackSupported = Scheduler && satisfies(React.version, '>16.8.6', { + includePrerelease: true, +}) + function scheduleCallback(cb) { const NormalPriority = Scheduler ? Scheduler.NormalPriority || Scheduler.unstable_NormalPriority
fix(flushMicroTasks): fallback to no scheduler (#<I>)
testing-library_react-testing-library
train
js
e246a431caca800da898f445de2b510cf5ee9bfa
diff --git a/docs/.vuepress/config.js b/docs/.vuepress/config.js index <HASH>..<HASH> 100644 --- a/docs/.vuepress/config.js +++ b/docs/.vuepress/config.js @@ -78,7 +78,7 @@ const sidebar = [ ], }, { - title: 'Tools', + title: 'Tools & Libraries', collapsable: true, children: [ {
docs: rename Tools to Tools & Libraries
open-wc_open-wc
train
js
a6d9ce2ec79f7ab256bfedb0f5f092f389b725be
diff --git a/android/src/main/java/com/airbnb/android/react/maps/AirMapView.java b/android/src/main/java/com/airbnb/android/react/maps/AirMapView.java index <HASH>..<HASH> 100644 --- a/android/src/main/java/com/airbnb/android/react/maps/AirMapView.java +++ b/android/src/main/java/com/airbnb/android/react/maps/AirMapView.java @@ -801,7 +801,11 @@ public class AirMapView extends MapView implements GoogleMap.InfoWindowAdapter, public void animateToRegion(LatLngBounds bounds, int duration) { if (map == null) return; - map.animateCamera(CameraUpdateFactory.newLatLngBounds(bounds, 0), duration, null); + if(duration <= 0) { + map.moveCamera(CameraUpdateFactory.newLatLngBounds(bounds, 0)); + } else { + map.animateCamera(CameraUpdateFactory.newLatLngBounds(bounds, 0), duration, null); + } } public void fitToElements(ReadableMap edgePadding, boolean animated) {
fix(android): animateToRegion not working with duration 0 (#<I>) Resolves #<I>
react-native-community_react-native-maps
train
java
6f1a539a108751569e4cc574dcd52c16ac1f85e8
diff --git a/pychimera/platforms/linux.py b/pychimera/platforms/linux.py index <HASH>..<HASH> 100644 --- a/pychimera/platforms/linux.py +++ b/pychimera/platforms/linux.py @@ -29,7 +29,8 @@ def _patch_paths(basedir, libdir, nogui=True): os.path.join(libdir, 'python2.7', 'lib-tk'), os.path.join(libdir, 'python2.7', 'lib-old'), os.path.join(libdir, 'python2.7', 'lib-dynload'), - os.path.join(libdir, 'python2.7', 'site-packages')]) + os.path.join(libdir, 'python2.7', 'site-packages')] + + (sys.path if sys.executable == '/usr/bin/python' and not nogui else [])) def _patch_libraries(basedir, libdir, nogui=True):
fix(linux): pychimera --gui fails if installed with system python (issue #<I>)
insilichem_pychimera
train
py
ffe5bcfed63e34d3641fe99a9b05376f8389c46e
diff --git a/tests/integration_test.py b/tests/integration_test.py index <HASH>..<HASH> 100644 --- a/tests/integration_test.py +++ b/tests/integration_test.py @@ -22,7 +22,12 @@ def path_project(): def test_repo(tmp_path, commands): cwd = os.getcwd() os.chdir(str(tmp_path)) - init_commands = ["git init -q", "git config user.name 'John Doe'", "git config user.email john.doe@email"] + init_commands = [ + "git init -q", + "git config user.name 'John Doe'", + "git config user.email john.doe@email", + "git config commit.gpgsign false", # will prevent gpg pass failures + ] for command in init_commands + commands: # shell argument fixes error for strings. Details in link below: # https://stackoverflow.com/questions/9935151/popen-error-errno-2-no-such-file-or-directory
fix(tests): Prevent GPG pass and sing issues
Michael-F-Bryan_auto-changelog
train
py
436e700cc7032847b4fc2036e60c1467af41dfa6
diff --git a/src/router.js b/src/router.js index <HASH>..<HASH> 100644 --- a/src/router.js +++ b/src/router.js @@ -183,6 +183,15 @@ class Router { routeMap[name].rootInstance = instanceMap.default; instanceMap.default.$inject(rootNode); } + + // call global hook + self._hooks.afterEach.forEach(fn => + fn({ + from: e.previous, + to: e.current, + redirect: e.go + }) + ); }); }, canEnter(e) { @@ -215,15 +224,6 @@ class Router { hook.call(instanceMap[i]); } } - - // call global hook - self._hooks.afterEach.forEach(fn => - fn({ - from: e.previous, - to: e.current, - redirect: e.go - }) - ); } }; }
fix: call afterEach in the right place
fengzilong_regular-router
train
js
df209afeed2334a97c83aff34ea7abcad85c31f6
diff --git a/version.go b/version.go index <HASH>..<HASH> 100644 --- a/version.go +++ b/version.go @@ -1,4 +1,4 @@ package swag // Version of swag -const Version = "v1.6.6" +const Version = "v1.6.7"
chore: jump to <I> (#<I>)
swaggo_swag
train
go
ddf7b687ac4a0d811a6e09227a0be549ade668c4
diff --git a/packages/node_modules/@webex/internal-plugin-ediscovery/src/ediscovery.js b/packages/node_modules/@webex/internal-plugin-ediscovery/src/ediscovery.js index <HASH>..<HASH> 100644 --- a/packages/node_modules/@webex/internal-plugin-ediscovery/src/ediscovery.js +++ b/packages/node_modules/@webex/internal-plugin-ediscovery/src/ediscovery.js @@ -217,8 +217,10 @@ const EDiscovery = SparkPlugin.extend({ const size = 100; const reportGenerator = new ReportGenerator({reportId}); + const self = this; + function processNextActivities(plugin) { - return this.getContent(reportId, {offset, size}) + return self.getContent(reportId, {offset, size}) .then((res) => { const promises = []; const activities = res.body;
fix(ediscovery): fixing this reference
webex_spark-js-sdk
train
js
3b1833e099c62bc05745b16b7560480552fd274b
diff --git a/anyconfig/mergeabledict.py b/anyconfig/mergeabledict.py index <HASH>..<HASH> 100644 --- a/anyconfig/mergeabledict.py +++ b/anyconfig/mergeabledict.py @@ -559,8 +559,11 @@ def create_from(obj=None, ac_ordered=False, return cls() opts = dict(ac_ordered=ac_ordered, _ac_ntpl_cls_key=_ac_ntpl_cls_key) + opts.update(options) + if is_dict_like(obj): - return cls((k, create_from(v, **opts)) for k, v in iteritems(obj)) + return cls((k, None if v is None else create_from(v, **opts)) for k, v + in iteritems(obj)) elif is_namedtuple(obj): ocls = _MDICTS_CLASS_MAP[cls] mdict = ocls((k, create_from(getattr(obj, k), **opts)) for k
fix: take care of the case value is None, e.g. JSON's null, in anyconfig.mergeabledict.create_from.
ssato_python-anyconfig
train
py
0fc3d7440327bef5f36f33a5754ec45ab95328e5
diff --git a/docs/gatsby-config.js b/docs/gatsby-config.js index <HASH>..<HASH> 100644 --- a/docs/gatsby-config.js +++ b/docs/gatsby-config.js @@ -59,11 +59,11 @@ module.exports = { { resolve: `@gatsby-contrib/gatsby-plugin-elasticlunr-search`, options: { - fields: ["title", "excerpt", "path"], + fields: ["title", "description", "path"], resolvers: { Mdx: { title: n => n.frontmatter.title, - excerpt: n => n.frontmatter.excerpt, + description: n => n.frontmatter.description, path: n => n.fields.slug, }, },
docs: update description field name This field has been renamed.
kiwicom_orbit-components
train
js
8ff7d008ef2fd87940b62b787186ae12a209b91c
diff --git a/lib/handlers/connect.js b/lib/handlers/connect.js index <HASH>..<HASH> 100644 --- a/lib/handlers/connect.js +++ b/lib/handlers/connect.js @@ -75,7 +75,6 @@ function init (client, packet, done) { doConnack( { client: client, returnCode: returnCode, sessionPresent: false }, done.bind(this, error)) - client.conn.end() return } diff --git a/test/connect.js b/test/connect.js index <HASH>..<HASH> 100644 --- a/test/connect.js +++ b/test/connect.js @@ -283,13 +283,27 @@ test('clients with zero-byte clientid and clean=true on MQTT 3.1.1 will get a ge // [MQTT-3.1.3-7] test('reject clients with > 23 clientId length in MQTT 3.1.0', function (t) { - t.plan(5) + t.plan(7) const broker = aedes() t.tearDown(broker.close.bind(broker)) const s = setup(broker) + var conn = s.client.conn + var end = conn.end + + conn.end = function () { + t.fail('should not call `conn.end()`') + end() + } + + function drain () { + t.pass('should empty connection request queue') + } + + conn._writableState.getBuffer = () => [{ callback: drain }, { callback: drain }] + s.inStream.write({ cmd: 'connect', protocolId: 'MQIsdp',
fix: prevent client connection to be closed when doing connack (#<I>) * fix: prevent client connection to be closed when doing connack * test should not call `conn.end()` * add test empty connection request queue * refactor code
mcollina_aedes
train
js,js
4afcdc49d14855c0c3a4fd4558d0f81906db3ffb
diff --git a/modules/caddyhttp/caddyauth/caddyauth.go b/modules/caddyhttp/caddyauth/caddyauth.go index <HASH>..<HASH> 100644 --- a/modules/caddyhttp/caddyauth/caddyauth.go +++ b/modules/caddyhttp/caddyauth/caddyauth.go @@ -30,6 +30,11 @@ func init() { // Authentication is a middleware which provides user authentication. // Rejects requests with HTTP 401 if the request is not authenticated. // +// After a successful authentication, the placeholder +// `{http.auth.user.id}` will be set to the username, and also +// `{http.auth.user.*}` placeholders may be set for any authentication +// modules that provide user metadata. +// // Its API is still experimental and may be subject to change. type Authentication struct { // A set of authentication providers. If none are specified,
docs: Mention {http.auth.user.id} placeholder in basicauth JSON docs (#<I>)
mholt_caddy
train
go
e798c269df6f456bccf6a1e755015ea1e7631117
diff --git a/lib/plugins/create/templates/tencent-go/index.go b/lib/plugins/create/templates/tencent-go/index.go index <HASH>..<HASH> 100644 --- a/lib/plugins/create/templates/tencent-go/index.go +++ b/lib/plugins/create/templates/tencent-go/index.go @@ -14,7 +14,7 @@ type DefineEvent struct { func hello(ctx context.Context, event DefineEvent) (string, error) { fmt.Println("key1:", event.Key1) fmt.Println("key2:", event.Key2) - return fmt.Sprintf("Hello World"), nil + return "Hello World", nil } func main() {
refactor(Templates): Remove unnecessary `fmt.Sprintf` in `tencent-go`
serverless_serverless
train
go
a6aef29e055ba67cdf3147c6d046a4c627039825
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -26,27 +26,27 @@ function Accepts(req) { * Examples: * * // Accept: text/html - * this.accepts('html'); + * this.types('html'); * // => "html" * * // Accept: text/*, application/json - * this.accepts('html'); + * this.types('html'); * // => "html" - * this.accepts('text/html'); + * this.types('text/html'); * // => "text/html" - * this.accepts('json', 'text'); + * this.types('json', 'text'); * // => "json" - * this.accepts('application/json'); + * this.types('application/json'); * // => "application/json" * * // Accept: text/*, application/json - * this.accepts('image/png'); - * this.accepts('png'); + * this.types('image/png'); + * this.types('png'); * // => undefined * * // Accept: text/*;q=.5, application/json - * this.accepts(['html', 'json']); - * this.accepts('html', 'json'); + * this.types(['html', 'json']); + * this.types('html', 'json'); * // => "json" * * @param {String|Array} type(s)...
docs: fix typos in accept.types examples The examples for accept.types uses the presumably old API method name `this.accepts` instead of `this.types`. closes #3
jshttp_accepts
train
js
ce581c70ac8764c4d9aa6c27da89c0e5e1ec5f44
diff --git a/packages/reactstrap-validation-date/src/AvDateRange.js b/packages/reactstrap-validation-date/src/AvDateRange.js index <HASH>..<HASH> 100644 --- a/packages/reactstrap-validation-date/src/AvDateRange.js +++ b/packages/reactstrap-validation-date/src/AvDateRange.js @@ -115,11 +115,17 @@ export default class AvDateRange extends Component { this.guid = `date-range-${count}-btn`; } - static getDerivedStateFromProps(props, prevState) { - return { - startValue: props.start.value || prevState.startValue, - endValue: props.end.value || prevState.endValue + static getDerivedStateFromProps({ start, end }, { startValue, endValue }) { + if ( + (start.value && start.value !== startValue) || + (end.value && end.value !== endValue) + ) { + return { + startValue: start.value || startValue, + endValue: end.value || endValue, + }; } + return null; } open = () => {
refactor(reactstrap-validation-date): updated derived state func to check before return
Availity_availity-react
train
js
ce1ba54d34c4fc4154e19e3edb75136bd30a0e54
diff --git a/packages/node_modules/samples/browser-single-party-call-with-mute/app.js b/packages/node_modules/samples/browser-single-party-call-with-mute/app.js index <HASH>..<HASH> 100644 --- a/packages/node_modules/samples/browser-single-party-call-with-mute/app.js +++ b/packages/node_modules/samples/browser-single-party-call-with-mute/app.js @@ -266,12 +266,12 @@ document.getElementById('stop-sending-video').addEventListener('click', () => { // the video element document.getElementById('start-receiving-audio').addEventListener('click', () => { - document.getElementById('remote-view-audio').muted = false; + document.getElementById('remote-view-audio').play(); document.getElementById('microphone-state-remote').innerHTML = 'on'; }); document.getElementById('stop-receiving-audio').addEventListener('click', () => { - document.getElementById('remote-view-audio').muted = true; + document.getElementById('remote-view-audio').pause(); document.getElementById('microphone-state-remote').innerHTML = 'off'; });
fix(samples): use play and pause for muting
webex_spark-js-sdk
train
js
8bcd4a03caabb265b66c384b7138c606e95d9954
diff --git a/tools/rollup.config.dev.js b/tools/rollup.config.dev.js index <HASH>..<HASH> 100644 --- a/tools/rollup.config.dev.js +++ b/tools/rollup.config.dev.js @@ -43,7 +43,11 @@ module.exports = { }, }), babel({ - exclude: 'node_modules/**', + exclude: ['node_modules/**'], + plugins: ['external-helpers'], + }), + babel({ + include: ['node_modules/markdown-it/**'], plugins: ['external-helpers'], }), replace({
chore(devenv): transpile pseudo module created in build process (#<I>)
carbon-design-system_carbon-components
train
js
c8c85e0d94d7a7211b000650f01af714663611ad
diff --git a/lib/clientsidescripts.js b/lib/clientsidescripts.js index <HASH>..<HASH> 100644 --- a/lib/clientsidescripts.js +++ b/lib/clientsidescripts.js @@ -150,7 +150,9 @@ clientSideScripts.findBindings = function(binding, exactMatch, using) { var elem = repeatElems[i]; while (elem.nodeType != 8 || elem.nodeValue.indexOf(repeater) == -1) { - rows.push(elem); + if (elem.nodeType == 1) { + rows.push(elem); + } elem = elem.nextSibling; } }
fix(locators): fix by.repeater finding all rows for IE Previously, element.all(by.repeater('foo in foos')) would find non-element nodes for ng-repeat-start elements, which could cause IEDriver to fall over if the test tried to get text from those nodes.
angular_protractor
train
js
21d86fac2d3c24459d645c28b8226a1e5b923b85
diff --git a/js/index.js b/js/index.js index <HASH>..<HASH> 100644 --- a/js/index.js +++ b/js/index.js @@ -56,6 +56,7 @@ class SentryCli { * @returns {Promise.<string>} A promise that resolves to the standard output. */ execute(args, live) { + // eslint-disable-next-line class-methods-use-this return helper.execute(args, live); } }
fix: make eslint happy
getsentry_sentry-cli
train
js
b7bc2470f0c155d24c60ea19449dd7944d92d3b0
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -105,25 +105,17 @@ function parse(repo, revision) { } function peel(obj) { - let result; - switch (obj.type()) { case 1: - result = Promise.resolve(obj.id()); - break; + return Promise.resolve(obj.id()); case 4: - result = obj.peel(1).then(peel); - break; + return obj.peel(1).then(peel); /* istanbul ignore next */ default: throw Promise.reject(new Error('Unsuported type')); } - - obj.free(); - - return result; } diff --git a/src/range.js b/src/range.js index <HASH>..<HASH> 100644 --- a/src/range.js +++ b/src/range.js @@ -32,11 +32,7 @@ class Range extends Array { walker.sorting(...[].concat(sorting)); resolve(walker); - }).then(walker => walker.getCommits(limit).then(commits => { - walker.free(); - - return commits; - })); + }).then(walker => walker.getCommits(limit)); } }
chore: remove calls to nodegit objects free method
dinoboff_git-range
train
js,js
061dfa3deb4c649007d9e0ab09f5cab84fb20f9c
diff --git a/packages/color-picker/src/color.js b/packages/color-picker/src/color.js index <HASH>..<HASH> 100644 --- a/packages/color-picker/src/color.js +++ b/packages/color-picker/src/color.js @@ -249,7 +249,7 @@ export default class Color { } } else if (value.indexOf('#') !== -1) { const hex = value.replace('#', '').trim(); - if (!/^(?:[0-9a-fA-F]{3}){1,2}$/.test(hex)) return; + if (!/^(?:[0-9a-fA-F]{3}){1,2}|[0-9a-fA-F]{8}$/.test(hex)) return; let r, g, b; if (hex.length === 3) {
fix(color-picker): fix color-picker can't select 8-digit hex color (#<I>)
ElemeFE_element
train
js
08218e959ab8dd9c95731e8699b54e2bf707ffa3
diff --git a/crd-generator/src/main/java/io/dekorate/crd/handler/CustomResourceHandler.java b/crd-generator/src/main/java/io/dekorate/crd/handler/CustomResourceHandler.java index <HASH>..<HASH> 100644 --- a/crd-generator/src/main/java/io/dekorate/crd/handler/CustomResourceHandler.java +++ b/crd-generator/src/main/java/io/dekorate/crd/handler/CustomResourceHandler.java @@ -41,7 +41,7 @@ import io.dekorate.crd.visitor.SpecReplicasPathDetector; import io.dekorate.crd.visitor.StatusReplicasPathDetector; import io.dekorate.kubernetes.decorator.Decorator; import io.dekorate.utils.Strings; -import io.fabric8.kubernetes.api.model.apiextensions.v1.CustomResourceDefinitionBuilder; +import io.fabric8.kubernetes.api.model.apiextensions.v1beta1.CustomResourceDefinitionBuilder; import io.sundr.codegen.functions.ElementTo; import io.sundr.codegen.model.ClassRef; import io.sundr.codegen.model.Property;
fix: import proper version of builder That tiny change breaks the generator without any obvious way to figure it out unless you step debug the code or know exactly what all the decorators expect. :angry:
fabric8io_kubernetes-client
train
java
671436cbb89f7f48bd9ae0ccb9dd75a376cc5281
diff --git a/src/structures/Message.js b/src/structures/Message.js index <HASH>..<HASH> 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -163,7 +163,7 @@ class Message extends Base { * The timestamp the message was last edited at (if applicable) * @type {?number} */ - this.editedTimestamp = 'edited_timestamp' in data ? new Date(data.edited_timestamp).getTime() : null; + this.editedTimestamp = data.edited_timestamp ? new Date(data.edited_timestamp).getTime() : null; /** * A manager of the reactions belonging to this message @@ -290,7 +290,7 @@ class Message extends Base { patch(data) { const clone = this._clone(); - if ('edited_timestamp' in data) this.editedTimestamp = new Date(data.edited_timestamp).getTime(); + if (data.edited_timestamp) this.editedTimestamp = new Date(data.edited_timestamp).getTime(); if ('content' in data) this.content = data.content; if ('pinned' in data) this.pinned = data.pinned; if ('tts' in data) this.tts = data.tts;
fix(Message): editedTimestamp defaulting to 0 (#<I>)
discordjs_discord.js
train
js
7fbe3dc38f67667513da736db3a7cd2ce3b9a963
diff --git a/ohm-js/test/test-semantics.js b/ohm-js/test/test-semantics.js index <HASH>..<HASH> 100644 --- a/ohm-js/test/test-semantics.js +++ b/ohm-js/test/test-semantics.js @@ -220,13 +220,17 @@ test("attributes - same-named attributes don't collide", function(t) { var s1 = g.createSemantics(); var s2 = g.createSemantics(); - s1.addAttribute('attr', {start: function() { return 1; }}); - s2.addAttribute('attr', {start: function() { return 2; }}); + var val = 1; + s1.addAttribute('attr', {start: function() { return val++; }}); + s2.addAttribute('attr', {start: function() { return val++; }}); var m = g.match(''); t.equal(s1(m).attr, 1); t.equal(s2(m).attr, 2); + t.equal(s1(m).attr, 1, 's1.attr is memoized'); + t.equal(s2(m).attr, 2, 's2.attr is memoized'); + t.end(); });
chore: Improve test for non-collision of attributes
harc_ohm
train
js
b45e66bfb0863b834a21c85960b331741c854e41
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ setup( url='https://github.com/andreroggeri/pynubank', author='André Roggeri Campos', author_email='a.roggeri.c@gmail.com', - license='BSD', + license='MIT', packages=['pynubank'], package_data={'pynubank': ['queries/*.gql']}, install_requires=['requests', 'qrcode'],
fix: Wrong licensing on the package
andreroggeri_pynubank
train
py
3d7bbb83599bd9d28a63daae95bf9899f4c96c85
diff --git a/core/src/elements/ons-pull-hook.js b/core/src/elements/ons-pull-hook.js index <HASH>..<HASH> 100755 --- a/core/src/elements/ons-pull-hook.js +++ b/core/src/elements/ons-pull-hook.js @@ -256,7 +256,7 @@ export default class PullHookElement extends BaseElement { * [ja][/ja] */ get onPull() { - return this._onSwipe; + return this._onPull; } set onPull(value) {
fix(ons-pull-hook): Return correct variable in getter.
OnsenUI_OnsenUI
train
js
14c6a3cdf435abea786b5a44868234bdf87b0272
diff --git a/packages/project-utils/bundling/app/config/webpack.config.js b/packages/project-utils/bundling/app/config/webpack.config.js index <HASH>..<HASH> 100644 --- a/packages/project-utils/bundling/app/config/webpack.config.js +++ b/packages/project-utils/bundling/app/config/webpack.config.js @@ -23,7 +23,6 @@ const ForkTsCheckerWebpackPlugin = require("react-dev-utils/ForkTsCheckerWebpack const typescriptFormatter = require("react-dev-utils/typescriptFormatter"); const WebpackBar = require("webpackbar"); const postcssNormalize = require("postcss-normalize"); -const aliases = require("./aliases"); const materialNodeModules = require.resolve("@material/base/package.json").split("@material")[0]; const sassIncludePaths = [ @@ -303,8 +302,7 @@ module.exports = function(webpackEnv, { paths, babelCustomizer }) { "react-dom$": "react-dom/profiling", "scheduler/tracing": "scheduler/tracing-profiling" }), - ...(modules.webpackAliases || {}), - ...aliases + ...(modules.webpackAliases || {}) }, plugins: [ // Adds support for installing with Plug'n'Play, leading to faster installs and adding
fix: remove webpack aliases in favor of repo package linking
Webiny_webiny-js
train
js
0a33c2f21997b0e9a36a489e743a36f8ce8ca803
diff --git a/lib/remove.js b/lib/remove.js index <HASH>..<HASH> 100644 --- a/lib/remove.js +++ b/lib/remove.js @@ -9,7 +9,12 @@ require('shelljs/global') module.exports = function (version) { try { - config.set('current', null) + const current = config.get('current') + + if (current === version) { + config.set('current', null) + } + const dir = `${home}/.nwjs/${version}` rm('-r', dir) } catch (e) {
fix: unset current version when it matches the removed version (#<I>) Closes #<I>
egoist_nwjs
train
js
e1ecd815df729b74e523c8e7cec4f717395031e7
diff --git a/lib/ui/Slap.js b/lib/ui/Slap.js index <HASH>..<HASH> 100644 --- a/lib/ui/Slap.js +++ b/lib/ui/Slap.js @@ -61,6 +61,9 @@ Slap.prototype.open = Promise.method(function (filePath, current) { .catch(function (err) { pane.close(); switch ((err.cause || err).code) { + case 'EACCES': + self.screen.header.message(err.message, 'error'); + break; case 'EISDIR': self.fileBrowser.refresh(filePath, _.noop); self.fileBrowser.focus();
refactor(editor-widget): add EACCES handling from Editor
slap-editor_slap
train
js
489194dd82a2ce2b137ff5ca490445b1a00a01bf
diff --git a/lib/plugins/load-plugin.js b/lib/plugins/load-plugin.js index <HASH>..<HASH> 100644 --- a/lib/plugins/load-plugin.js +++ b/lib/plugins/load-plugin.js @@ -106,12 +106,12 @@ var execCallback = function(id, cbs, item) { item = item || ''; defineProps(item.req); defineProps(item.res); + delete cbs[id]; cbList.forEach(function(cb) { try { cb(item); } catch(e) {} }); - delete cbs[id]; } };
refactor: getSession
avwo_whistle
train
js
c892a5d7461a43120063f612e46c0eae1ca933f2
diff --git a/vaex/export.py b/vaex/export.py index <HASH>..<HASH> 100644 --- a/vaex/export.py +++ b/vaex/export.py @@ -157,6 +157,8 @@ def export_fits(dataset, path, column_names=None, shuffle=False, selection=False column_names.append(random_index_name) data_types.append(np.int64().dtype) data_shapes.append((N,)) + ucds.append(None) + units.append(None) else: random_index_name = None
fix: ucds and units error when shuffling fixed
vaexio_vaex
train
py
8fb93f03c27904b5fc83ada02c664003c5b64dee
diff --git a/routes/account.js b/routes/account.js index <HASH>..<HASH> 100644 --- a/routes/account.js +++ b/routes/account.js @@ -81,6 +81,10 @@ function accountRoutes (server, options, next) { if (error.name === 'not_found') { return sessions.find(sessionId, { include: request.query.include === 'profile' ? 'account.profile' : undefined + }).catch(function (error) { + if (error.status === 404) { + throw errors.INVALID_SESSION + } }) } @@ -127,6 +131,11 @@ function accountRoutes (server, options, next) { .catch(function (error) { if (error.name === 'not_found') { return sessions.find(sessionId) + .catch(function (error) { + if (error.status === 404) { + throw errors.INVALID_SESSION + } + }) } throw error }) @@ -174,6 +183,10 @@ function accountRoutes (server, options, next) { if (error.name === 'not_found') { return sessions.find(sessionId, { include: request.query.include === 'profile' ? 'account.profile' : undefined + }).catch(function (error) { + if (error.status === 404) { + throw errors.INVALID_SESSION + } }) }
fix(routes): /session/account <I> responses
hoodiehq_hoodie-account-server
train
js
5f2447976ccc2857436748aa5c995e8bf36099e6
diff --git a/pkg/models/timeseries.go b/pkg/models/timeseries.go index <HASH>..<HASH> 100644 --- a/pkg/models/timeseries.go +++ b/pkg/models/timeseries.go @@ -16,6 +16,8 @@ type TimeSeries struct { type TimeSeriesSlice []*TimeSeries func NewTimeSeries(name string, points [][2]float64) *TimeSeries { + //Todo: This should be made safer :) + ts := &TimeSeries{ Name: name, Points: points,
style(alerting): add note about making timeseries model safer
grafana_grafana
train
go
196c9c6bd9f5466f45436aec58e325c583b6baf5
diff --git a/packages/uikit-workshop/src/scripts/components/pl-viewport/pl-viewport.js b/packages/uikit-workshop/src/scripts/components/pl-viewport/pl-viewport.js index <HASH>..<HASH> 100755 --- a/packages/uikit-workshop/src/scripts/components/pl-viewport/pl-viewport.js +++ b/packages/uikit-workshop/src/scripts/components/pl-viewport/pl-viewport.js @@ -347,7 +347,10 @@ class IFrame extends BaseComponent { if (window.patternData) { patternParam = window.patternData.patternPartial; } else { - patternParam = 'components-overview'; + patternParam = + window.config && window.config.defaultPattern + ? window.config.defaultPattern + : 'all'; } }
fix: re-add the ability to use Pattern Lab's built-in config for defining the default pattern / component that shows up when initially loading
bolt-design-system_bolt
train
js
bc16de70ae7f58474ba46ae4bf24497fab09ae70
diff --git a/docs/referenceConf.js b/docs/referenceConf.js index <HASH>..<HASH> 100644 --- a/docs/referenceConf.js +++ b/docs/referenceConf.js @@ -234,7 +234,7 @@ exports.config = { // and can be accessed from your test as browser.params. It is an arbitrary // object and can contain anything you may need in your test. // This can be changed via the command line as: - // --params.login.user 'Joe' + // --params.login.user "Joe" params: { login: { user: 'Jane',
chore(docs): Correct quotation marks for Windows cmd.
angular_protractor
train
js
3d358ff0397fc051882c426f7fbe01cb61bab6d5
diff --git a/src/resources/views/character/contacts.blade.php b/src/resources/views/character/contacts.blade.php index <HASH>..<HASH> 100644 --- a/src/resources/views/character/contacts.blade.php +++ b/src/resources/views/character/contacts.blade.php @@ -6,12 +6,12 @@ @section('character_content') - <div class="panel panel-default"> - <div class="panel-heading"> - <h3 class="panel-title">{{ trans('web::seat.contacts') }}</h3> + <div class="card"> + <div class="card-header"> + <h3 class="card-title">{{ trans('web::seat.contacts') }}</h3> </div> - <div class="panel-body"> - <div class="margin-bottom"> + <div class="card-body"> + <div class="mb-3"> <select multiple="multiple" id="dt-character-selector" class="form-control"> @foreach($characters as $character) @if($character->id == $request->character_id)
feat(deps): upgrade character contacts
eveseat_web
train
php
2a16bb0e8bde1632acd5617453a39eda7a6f6bcc
diff --git a/scenarios/api.github.com/git-refs/test.js b/scenarios/api.github.com/git-refs/test.js index <HASH>..<HASH> 100644 --- a/scenarios/api.github.com/git-refs/test.js +++ b/scenarios/api.github.com/git-refs/test.js @@ -10,7 +10,7 @@ test('Git references', async (t) => { // returns a single reference for the master branch, pointing to sha for 2nd commit await axios({ method: 'get', - url: 'https://api.github.com/repos/octokit-fixture-org/git-refs/git/refs', + url: 'https://api.github.com/repos/octokit-fixture-org/git-refs/git/refs/', headers: { Accept: 'application/vnd.github.v3+json', Authorization: `token 0000000000000000000000000000000000000001` @@ -52,7 +52,7 @@ test('Git references', async (t) => { // Now returns both branches: master & test await axios({ method: 'get', - url: 'https://api.github.com/repos/octokit-fixture-org/git-refs/git/refs', + url: 'https://api.github.com/repos/octokit-fixture-org/git-refs/git/refs/', headers: { Accept: 'application/vnd.github.v3+json', Authorization: `token 0000000000000000000000000000000000000001`
test: record fixtures for "Get all references" with trailing "/"
octokit_fixtures
train
js
31c50d0ded697be4eedb10035030e0e4e9e45661
diff --git a/test/ext/max-age.js b/test/ext/max-age.js index <HASH>..<HASH> 100644 --- a/test/ext/max-age.js +++ b/test/ext/max-age.js @@ -296,7 +296,7 @@ module.exports = function () { }); }; - mfn = memoize(fn, { promise: true, primitive: true, maxAge: 100 }); + mfn = memoize(fn, { promise: true, primitive: true, maxAge: 500 }); mfn(3, 7).done(function (res) { a.deep(res, 10, "Result #1"); }); mfn(3, 7).done(function (res) { a.deep(res, 10, "Result #2"); }); @@ -322,8 +322,8 @@ module.exports = function () { a(i, 4, "Call After clear"); d(); }); - }, 100); - }, 20); + }, 500); + }, 100); } }, Refetch: {
test: increase time resolution to prevent accidental fails
medikoo_memoizee
train
js
f0e8df07b855219866f35f86903e557a10ef260a
diff --git a/workflow/controller/controller.go b/workflow/controller/controller.go index <HASH>..<HASH> 100644 --- a/workflow/controller/controller.go +++ b/workflow/controller/controller.go @@ -217,10 +217,15 @@ func (wfc *WorkflowController) Run(ctx context.Context, wfWorkers, workflowTTLWo } logCtx := log.WithField("id", nodeID) + instanceID := "default-instance-id" + if wfc.Config.InstanceID != "" { + instanceID = wfc.Config.InstanceID + } + var cancel context.CancelFunc go leaderelection.RunOrDie(ctx, leaderelection.LeaderElectionConfig{ Lock: &resourcelock.LeaseLock{ - LeaseMeta: metav1.ObjectMeta{Name: "workflow-controller", Namespace: wfc.namespace}, Client: wfc.kubeclientset.CoordinationV1(), + LeaseMeta: metav1.ObjectMeta{Name: instanceID, Namespace: wfc.namespace}, Client: wfc.kubeclientset.CoordinationV1(), LockConfig: resourcelock.ResourceLockConfig{Identity: nodeID, EventRecorder: wfc.eventRecorderManager.Get(wfc.namespace)}, }, ReleaseOnCancel: true,
fix(controller): Leader Lease Shared Name (#<I>)
argoproj_argo
train
go
93575086b3458f56fc62abb5985607a1011507b7
diff --git a/optlang/interface.py b/optlang/interface.py index <HASH>..<HASH> 100644 --- a/optlang/interface.py +++ b/optlang/interface.py @@ -168,6 +168,9 @@ class Variable(symbolics.Symbol): if six.PY2: name = str(name) + if len(name) < 1: + raise ValueError('Variable name must not be empty string') + for char in name: if char.isspace(): raise ValueError( diff --git a/optlang/tests/test_interface.py b/optlang/tests/test_interface.py index <HASH>..<HASH> 100644 --- a/optlang/tests/test_interface.py +++ b/optlang/tests/test_interface.py @@ -178,6 +178,9 @@ class TestVariable(TestCase): def setUp(self): self.x = Variable("x") + def test_init_variable(self): + self.assertRaises(ValueError, Variable, '') + def test_set_wrong_bounds_on_binary_raises(self): self.assertRaises(ValueError, Variable, 'x', lb=-33, ub=0.3, type='binary') x = Variable('x', type='binary')
fix: ensure that variable names are not empty str (#<I>) Variables with empty names trigger's segfaults in glpk interface. Easiest fix appears to simply not allow them as anyway not meaningful.
biosustain_optlang
train
py,py
f7cc534d50d8e157d67367b754df8a43434cebc5
diff --git a/github/Repository.py b/github/Repository.py index <HASH>..<HASH> 100644 --- a/github/Repository.py +++ b/github/Repository.py @@ -2931,7 +2931,7 @@ class Repository(github.GithubObject.CompletableGithubObject): def get_releases(self): """ - :calls: `GET /repos/:owner/:repo/releases <http://developer.github.com/v3/repos>`_ + :calls: `GET /repos/:owner/:repo/releases <https://developer.github.com/v3/repos/releases/#list-releases-for-a-repository`_ :rtype: :class:`github.PaginatedList.PaginatedList` of :class:`github.GitRelease.GitRelease` """ return github.PaginatedList.PaginatedList(
docs(repository): correct releases link (#<I>)
PyGithub_PyGithub
train
py
821e230a6dd1a4d1f120f023398299192176c608
diff --git a/lib/compile/ast.js b/lib/compile/ast.js index <HASH>..<HASH> 100644 --- a/lib/compile/ast.js +++ b/lib/compile/ast.js @@ -211,7 +211,7 @@ class Ast { this.parent = this.parent.parent; if (p.tag !== tagName) { - if (!p.else && !p.elseif) { + if (!p.else && !p.elseif && !p.elif) { utils.warn(`${p.tag} was not closed`, p); } return this.closeTag(tagName);
fix: add elif support
whxaxes_mus
train
js
dece355c30ab66c82e0f563346834233dad37944
diff --git a/test/math.js b/test/math.js index <HASH>..<HASH> 100644 --- a/test/math.js +++ b/test/math.js @@ -34,6 +34,12 @@ describe('Math', function() { }); describe('.lowest(numbers, amount)', function() { + + it('should return the lowest number', function() { + var numbers = [99,6,41,32,7]; + assert.equal(6, Math.lowest(numbers)); + }); + it('should return the wanted amount of numbers', function() { var numbers = [1,99,3,470,5,2,63], @@ -44,6 +50,12 @@ describe('Math', function() { }); describe('.highest(numbers, amount)', function() { + + it('should return the highest number', function() { + var numbers = [99,6,41,32,7]; + assert.equal(99, Math.highest(numbers)); + }); + it('should return the wanted amount of numbers', function() { var numbers = [1,99,3,470,5,2,63],
test: Math.lowest and Math.highest unit test
skerit_protoblast
train
js
6ce738d7329ecd81c249b454a9144642a27f828b
diff --git a/app.js b/app.js index <HASH>..<HASH> 100755 --- a/app.js +++ b/app.js @@ -122,14 +122,14 @@ var ontorrent = function(torrent) { vlc = proc.exec('vlc '+href+' '+VLC_ARGS+' || /Applications/VLC.app/Contents/MacOS/VLC '+href+' '+VLC_ARGS, function(error, stdout, stderror){ if (error) quit(); }); + + vlc.on('exit', function(code){ + console.log("\n[ VLC ]--> EXIT code: " + code); + process.exit(0); + }); } } - vlc.on('exit', function(code){ - console.log("\n[ VLC ]--> EXIT code: " + code); - process.exit(0); - }); - if (argv.omx) proc.exec(OMX_EXEC+' '+href); if (argv.mplayer) proc.exec(MPLAYER_EXEC+' '+href); if (argv.quiet) return console.log('server is listening on '+href);
fix: properly adding vlc events; avoids crash when not using vlc
mafintosh_peerflix
train
js
256acd231fec31f85b3321f909e62ef719c80fff
diff --git a/src/kids/__init__.py b/src/kids/__init__.py index <HASH>..<HASH> 100644 --- a/src/kids/__init__.py +++ b/src/kids/__init__.py @@ -1,6 +1,4 @@ -# See http://peak.telecommunity.com/DevCenter/setuptools#namespace-packages -try: - __import__('pkg_resources').declare_namespace(__name__) -except ImportError: - from pkgutil import extend_path - __path__ = extend_path(__path__, __name__) +## From https://docs.python.org/3/library/pkgutil.html + +from pkgutil import extend_path +__path__ = extend_path(__path__, __name__)
fix: better namespacing scheme The previous would import ``pkg_resources`` which could take some linear time depending on the number of installed packages.
0k_kids.cmd
train
py
068ba868727d8624c2508c9937608dc5a041e38c
diff --git a/modules/plugins/browser/index.js b/modules/plugins/browser/index.js index <HASH>..<HASH> 100644 --- a/modules/plugins/browser/index.js +++ b/modules/plugins/browser/index.js @@ -27,6 +27,8 @@ function browserPluginFactory(opts = {}, browser = safeBrowser) { } else { routerStart(...args); } + + return router; }; router.replaceHistoryState = function(name, params = {}) {
fix: make sure decorated start function returns the router instance
router5_router5
train
js
51b174674464065b52aaf07c2efb8a2faf1e1c7d
diff --git a/src/Leevel/Router/MiddlewareParser.php b/src/Leevel/Router/MiddlewareParser.php index <HASH>..<HASH> 100644 --- a/src/Leevel/Router/MiddlewareParser.php +++ b/src/Leevel/Router/MiddlewareParser.php @@ -94,9 +94,7 @@ class MiddlewareParser return str_replace(':', '@'.$method.':', $item); }, $middlewares); - $middlewares = array_values(array_unique(array_filter($middlewares))); - - return $middlewares; + return array_values(array_unique(array_filter($middlewares))); } /**
refactor(router): Clean code
hunzhiwange_framework
train
php
3f7401ca0397225496c8c6e691ac2178ca208e9c
diff --git a/packages/react/mixin.server.js b/packages/react/mixin.server.js index <HASH>..<HASH> 100644 --- a/packages/react/mixin.server.js +++ b/packages/react/mixin.server.js @@ -6,6 +6,7 @@ const { createElement } = require('react'); const { renderToString } = require('react-dom/server'); const { default: StaticRouter } = require('react-router-dom/es/StaticRouter'); const { Helmet } = require('react-helmet'); +const url = require('url'); const { async: { compose, parallel, pipe }, @@ -67,7 +68,11 @@ class ReactMixin extends Mixin { ); } bootstrap(req, res) { - this.options.location = req.path; + const { pathname, search } = url.parse(req.url); + this.options.location = { + pathname, + search, + }; this.stats = res.locals.stats; } enhanceElement(element) {
feat(react): pass search to StaticRouter so it can be used in Routes on server
untool_untool
train
js
401887059919104517c8989f5c0c04dc93abbc09
diff --git a/api/src/opentrons/drivers/thermocycler/driver.py b/api/src/opentrons/drivers/thermocycler/driver.py index <HASH>..<HASH> 100644 --- a/api/src/opentrons/drivers/thermocycler/driver.py +++ b/api/src/opentrons/drivers/thermocycler/driver.py @@ -55,7 +55,7 @@ SERIAL_ACK = '\r\n' TC_COMMAND_TERMINATOR = SERIAL_ACK TC_ACK = 'ok' + SERIAL_ACK + 'ok' + SERIAL_ACK ERROR_KEYWORD = 'error' -DEFAULT_TC_TIMEOUT = 10 +DEFAULT_TC_TIMEOUT = 17 # Lid open worst case takes about 16sec to respond DEFAULT_COMMAND_RETRIES = 3 DEFAULT_STABILIZE_DELAY = 0.1 POLLING_FREQUENCY_MS = 1000
fix(api): increase serial response timeout for thermocycler (#<I>)
Opentrons_opentrons
train
py
df42fdfc421f1190f0a2267a66efd3c921ec2348
diff --git a/packages/discord.js/src/structures/Presence.js b/packages/discord.js/src/structures/Presence.js index <HASH>..<HASH> 100644 --- a/packages/discord.js/src/structures/Presence.js +++ b/packages/discord.js/src/structures/Presence.js @@ -238,7 +238,7 @@ class Activity { * Creation date of the activity * @type {number} */ - this.createdTimestamp = Date.parse(data.created_at); + this.createdTimestamp = data.created_at; } /**
fix(Presence): Do not return NaN for activity timestamp (#<I>)
discordjs_discord.js
train
js
d71575a4f85ab0f11a24e9a8c45d873dd6fa01db
diff --git a/src/runPipelineBrowser.js b/src/runPipelineBrowser.js index <HASH>..<HASH> 100644 --- a/src/runPipelineBrowser.js +++ b/src/runPipelineBrowser.js @@ -2,7 +2,7 @@ import WebworkerPromise from 'webworker-promise' import config from './itkConfig' -import IOTypes from 'IOTypes' +import IOTypes from './IOTypes' const worker = new window.Worker( config.itkModulesPath + '/WebWorkers/Pipeline.worker.js'
fix(runPipelineBrowser): Fix IOTypes path when used as a package
InsightSoftwareConsortium_itk-js
train
js
b60582d8a596f817b8fb056a5fc2531bab8eb956
diff --git a/lib/features/palette/Palette.js b/lib/features/palette/Palette.js index <HASH>..<HASH> 100644 --- a/lib/features/palette/Palette.js +++ b/lib/features/palette/Palette.js @@ -349,12 +349,14 @@ Palette.prototype.updateToolHighlight = function(name) { return; } + var toolClasses = domClasses(tool); + actionName = actionName.replace('-tool', ''); - if (tool.classList.contains('entry') && actionName === name) { - domClasses(tool).add('highlighted-entry'); + if (toolClasses.contains('entry') && actionName === name) { + toolClasses.add('highlighted-entry'); } else { - domClasses(tool).remove('highlighted-entry'); + toolClasses.remove('highlighted-entry'); } }); };
chore(palette): consistently use classes depenendency
bpmn-io_diagram-js
train
js
20a62fd20eafed2fd1fee2e5e2aa88de8f09fb24
diff --git a/lib/rules/index.js b/lib/rules/index.js index <HASH>..<HASH> 100644 --- a/lib/rules/index.js +++ b/lib/rules/index.js @@ -1,15 +1,13 @@ var Pac = require('node-pac'); var net = require('net'); +var parseUrl = require('url').parse; +var parseQuery = require('querystring').parse; var lookup = require('./dns'); var Rules = require('./rules'); var values = require('./util').values; var util = require('../util'); var logger = require('../util/logger'); var config = require('../config'); -var rulesFileUtil = { - url: require('url'), - query: require('querystring') -}; var rules = new Rules(); var tempRules = new Rules(); @@ -196,7 +194,8 @@ function resolveRulesFile(req, callback) { rules: [], values: {}, getValue: values.get, - util: rulesFileUtil, + parseUrl: parseUrl, + parseQuery: parseQuery, tpl: tpl }; if (util.execScriptSync(fileRules, context) && Array.isArray(context.rules)) {
feat: Add parseUrl, parseQuery in the context of rulesFile
avwo_whistle
train
js
891ec1d9d100b88c4deb10919fbbb6c4d532d41a
diff --git a/client/extensions/targetedPublishing/TargetedPublishing.js b/client/extensions/targetedPublishing/TargetedPublishing.js index <HASH>..<HASH> 100644 --- a/client/extensions/targetedPublishing/TargetedPublishing.js +++ b/client/extensions/targetedPublishing/TargetedPublishing.js @@ -63,8 +63,9 @@ export class TargetedPublishing extends React.Component { return axios.post(this.state.apiUrl + 'organization/rules/evaluate',this.state.item, {headers: this.state.apiHeader}) .then(res => { if (!_.isEmpty(res.data)) { + let rules = res.data.tenants.filter(rule => rule.route && rule.published); this.setState({ - rules: res.data.tenants + rules: rules }); } return res; @@ -128,7 +129,7 @@ export class TargetedPublishing extends React.Component { </div> } {this.state.rules.map((rule, index) => { - return rule.route && rule.published ? ( + return ( <Tenant rule={rule} key={rule.tenant.code} @@ -137,7 +138,7 @@ export class TargetedPublishing extends React.Component { item={this.state.item} done={this.reload.bind(this)} /> - ) : null; + ); })} </div> );
fix: targeted publishing empty (#<I>) * fix: SWP-<I> theme settings switch * add: SWP-<I> remove route error message * fix: targeted publishing empty
superdesk_superdesk-publisher
train
js
677362c350bae90981737023650221c064425e34
diff --git a/lib/uploadbox/engine.rb b/lib/uploadbox/engine.rb index <HASH>..<HASH> 100644 --- a/lib/uploadbox/engine.rb +++ b/lib/uploadbox/engine.rb @@ -10,6 +10,13 @@ require 'resque' require 'heroku_resque_auto_scale' require 'dotenv-rails' +# Allows redirects from https to http as facebook does +module OpenURI + def self.redirectable?(uri1,uri2) + uri1.scheme.downcase == uri2.scheme.downcase || (/\A(?:https?|ftp)\z/i =~ uri1.scheme && /\A(?:https?|ftp)\z/i =~ uri2.scheme) + end +end + module Uploadbox class Engine < ::Rails::Engine config.generators do |g|
fix: allows redirects https -> http as facebook does
startae_uploadbox
train
rb
fe61fd8398c66eb3a0f4155ae020ad459e54f1f2
diff --git a/lib/index.js b/lib/index.js index <HASH>..<HASH> 100644 --- a/lib/index.js +++ b/lib/index.js @@ -55,11 +55,12 @@ const fastifyMetrics = ( }; if (register) { - defaultOpts.register = register; if (Array.isArray(register)) { + defaultOpts.register = register[0]; opts.histogram.registers = register; opts.summary.registers = register; } else { + defaultOpts.register = register; opts.histogram.registers = [register]; opts.summary.registers = [register]; }
fix(registers): use first register for default metrics
SkeLLLa_fastify-metrics
train
js
aa1587e88c4dbde80049818686a15468ec658901
diff --git a/lib/processes/proxy/proxy.js b/lib/processes/proxy/proxy.js index <HASH>..<HASH> 100644 --- a/lib/processes/proxy/proxy.js +++ b/lib/processes/proxy/proxy.js @@ -62,6 +62,7 @@ function stripHash(url) { } function isNewPage(url) { + if (!newPageOptions.url) return false; return url === stripHash(newPageOptions.url); }
fix: Initial URL is never the new page URL
testiumjs_testium-core
train
js
a7d40be68dd85c1531b87c4b2ca1be66513c6412
diff --git a/kmb.js b/kmb.js index <HASH>..<HASH> 100644 --- a/kmb.js +++ b/kmb.js @@ -4,12 +4,12 @@ const querystring = require('querystring'); const fetchJson = require('./fetchJson'); const helper = require('./helper'); -function extractRouteInfo (stop, options) { +function extractRouteInfo (basicInfo, route, options) { return { - route: stop.Route, - bound: Number.parseInt(stop.Bound), - origin: stop[options.ORIGIN_FIELD], - dest: stop[options.DEST_FIELD] + route: route.route, + bound: route.bound, + origin: basicInfo[options.ORIGIN_FIELD], + dest: basicInfo[options.DEST_FIELD] }; } @@ -122,10 +122,10 @@ KMBInfo.prototype.getStops = function (route, bound) { console.log(JSON.stringify(result, null, 2)); } assert(result.result); - const route = extractRouteInfo(result.data.routeStops[0], this.options); - route.stops = result.data.routeStops.map( + const ret = extractRouteInfo(result.data.basicInfo, result.data.route, this.options); + ret.stops = result.data.routeStops.map( stop => transformStop(stop, this.options)); - return route; + return ret; }); }); });
fix: updated `extractRouteInfo()` due to API change Changes to be committed: modified: kmb.js
leesei_hkbus
train
js
8d91a85fb72490c996fd953925a9e3a856c35b5f
diff --git a/lib/api/github.js b/lib/api/github.js index <HASH>..<HASH> 100644 --- a/lib/api/github.js +++ b/lib/api/github.js @@ -256,7 +256,10 @@ async function getFileList(branchName) { .sort(); } catch (err) { // TODO: change this from warn to info once we know exactly why it happens - logger.warn({ repository: config.repoName }, 'Error retrieving git tree'); + logger.info( + { repository: config.repoName }, + 'Error retrieving git tree - no files detected' + ); config.fileList = []; } diff --git a/lib/api/gitlab.js b/lib/api/gitlab.js index <HASH>..<HASH> 100644 --- a/lib/api/gitlab.js +++ b/lib/api/gitlab.js @@ -131,7 +131,7 @@ async function getFileList(branchName) { .map(item => item.path) .sort(); } catch (err) { - logger.warn('Error retrieving git tree'); + logger.info('Error retrieving git tree - no files detected'); config.fileList = []; } return config.fileList;
refactor: downgrade git tree warn to log (#<I>)
renovatebot_renovate
train
js,js
64601113e3a0f7843e0ffaf6a9d757dbafdffa3f
diff --git a/test/test_scheduler.go b/test/test_scheduler.go index <HASH>..<HASH> 100644 --- a/test/test_scheduler.go +++ b/test/test_scheduler.go @@ -243,7 +243,7 @@ func waitForJobEvents(t *c.C, events chan *ct.JobEvent, diff map[string]int) (la if processesEqual(diff, actual) { return } - case <-time.After(5 * time.Second): + case <-time.After(20 * time.Second): t.Fatal("timed out waiting for job events: ", diff) } }
test: Wait upto <I> seconds for job events
flynn_flynn
train
go
80e27551b76ab5626bde702198618f175875ec7b
diff --git a/Upstart.php b/Upstart.php index <HASH>..<HASH> 100644 --- a/Upstart.php +++ b/Upstart.php @@ -40,6 +40,13 @@ class Upstart protected $request; /** + * $service + * + * @var \App\Resolvers\AppServiceResolver + */ + protected $service; + + /** * $response * * @var mixed @@ -114,9 +121,14 @@ class Upstart private function startApp(bool $isConsole) { /** + * Create a new instance of the service resolver + */ + $this->service = new AppServiceResolver; + + /** * Start the App Service Resolver */ - (new AppServiceResolver)->start(Application::prototype($isConsole)); + $this->service->start(Application::prototype($isConsole)); /** * Load framework plugins @@ -142,6 +154,17 @@ class Upstart } /** + * Undocumented function + * + * @param mixed $response + * @return bool + */ + public function parseResponse($response) : bool + { + return $this->service->onExit($response); + } + + /** * Set application request * * @param \Modulus\Http\Request $request
feat: Create a new instance of the app service resolver Start the app service reslver
modulusphp_framework
train
php
dc3f7555044dabbeba54e844f2f5bcfc98fadceb
diff --git a/test/spec/directives/snap-toggle.js b/test/spec/directives/snap-toggle.js index <HASH>..<HASH> 100644 --- a/test/spec/directives/snap-toggle.js +++ b/test/spec/directives/snap-toggle.js @@ -20,20 +20,20 @@ describe('Directive: snapToggle', function() { })); describe('behaviour', function() { - it('should call snapper toggle method on the left snap', inject(function($compile) { + it('should call snapper toggle method on the left snap', function() { var element = angular.element(button); element = compile(element)(scope); element[0].click(); expect(snapRemote.toggle.mostRecentCall.args[0]).toEqual('left'); expect(snapRemote.toggle.mostRecentCall.args[1]).toBeUndefined(); - })); + }); - it('should call snapper toggle method on the right snap', inject(function($rootScope, $compile) { + it('should call snapper toggle method on the right snap', function() { var element = angular.element(rightButton); element = compile(element)(scope); element[0].click(); expect(snapRemote.toggle.mostRecentCall.args[0]).toEqual('right'); expect(snapRemote.toggle.mostRecentCall.args[1]).toEqual('mySnapId'); - })); + }); }); });
test: Remove some cruft Was injecting dependencies we don't need...
jtrussell_angular-snap.js
train
js
b362b1f4b2a5aa0aedeb6a336132d146e11224b0
diff --git a/packages/components/bolt-icon/src/icon.standalone.js b/packages/components/bolt-icon/src/icon.standalone.js index <HASH>..<HASH> 100644 --- a/packages/components/bolt-icon/src/icon.standalone.js +++ b/packages/components/bolt-icon/src/icon.standalone.js @@ -1,13 +1,13 @@ import { - spacingSizes, - css, colorContrast, + css, define, + h, hasNativeShadowDomSupport, props, rgb2hex, + spacingSizes, supportsCSSVars, - h, withPreact, } from '@bolt/core';
chore: reorder bolt core deps pulled into the icon component
bolt-design-system_bolt
train
js
d564a5402b4818b3d87639a0a6d245460df73e5a
diff --git a/docs/conf.py b/docs/conf.py index <HASH>..<HASH> 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -28,6 +28,7 @@ author = 'Jonathon Reinhart' # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom # ones. extensions = [ + 'sphinx.ext.autosectionlabel', ] # Add any paths that contain templates here, relative to this directory.
docs: Add sphinx.ext.autosectionlabel extension This allows us to reference section headings simply by name.
JonathonReinhart_scuba
train
py
ff897712f84162eaf0ea517267332c9cc81f0187
diff --git a/lib/plugin/components/services/rbac/apply-default-blueprint-docs.js b/lib/plugin/components/services/rbac/apply-default-blueprint-docs.js index <HASH>..<HASH> 100644 --- a/lib/plugin/components/services/rbac/apply-default-blueprint-docs.js +++ b/lib/plugin/components/services/rbac/apply-default-blueprint-docs.js @@ -1,4 +1,3 @@ -'use strict' const async = require('async') module.exports = function applyBlueprintDocs (options, callback) {
refactor: remove 'use strict' because we're ES6, it's already strict affects: tymly
wmfs_tymly-core
train
js
44e5cecdcaee14c15055d20d6b9a72e80cd4794d
diff --git a/cmd/tiller/tiller.go b/cmd/tiller/tiller.go index <HASH>..<HASH> 100644 --- a/cmd/tiller/tiller.go +++ b/cmd/tiller/tiller.go @@ -28,10 +28,12 @@ import ( "path/filepath" "strconv" "strings" + "time" goprom "github.com/grpc-ecosystem/go-grpc-prometheus" "google.golang.org/grpc" "google.golang.org/grpc/credentials" + "google.golang.org/grpc/keepalive" "k8s.io/helm/pkg/kube" "k8s.io/helm/pkg/proto/hapi/services" @@ -155,6 +157,10 @@ func start() { logger.Fatalf("Could not create server TLS configuration: %v", err) } opts = append(opts, grpc.Creds(credentials.NewTLS(cfg))) + opts = append(opts, grpc.KeepaliveParams(keepalive.ServerParameters{ + MaxConnectionIdle: 10 * time.Minute, + // If needed, we can configure the max connection age + })) } rootServer = tiller.NewServer(opts...)
fix(tiller): Forces close of idle gRPC connections Possibly fixes #<I>. This forces idle connections to drop after <I> minutes
helm_helm
train
go
961fc4a53c15e600f18d3625dc2a698fed959499
diff --git a/src/dht/findprovs.js b/src/dht/findprovs.js index <HASH>..<HASH> 100644 --- a/src/dht/findprovs.js +++ b/src/dht/findprovs.js @@ -27,7 +27,7 @@ module.exports = (send) => { if (Array.isArray(res)) { res = res[0] } - + // callback with an empty array if no providers are found if (!res) { const responses = []
chore: appease linter License: MIT
ipfs_js-ipfs
train
js
e74a635c13a02b27acbe68004df999fa6625a166
diff --git a/go/vt/orchestrator/logic/topology_recovery.go b/go/vt/orchestrator/logic/topology_recovery.go index <HASH>..<HASH> 100644 --- a/go/vt/orchestrator/logic/topology_recovery.go +++ b/go/vt/orchestrator/logic/topology_recovery.go @@ -28,6 +28,8 @@ import ( "sync/atomic" "time" + "vitess.io/vitess/go/vt/topo/topoproto" + "github.com/patrickmn/go-cache" "github.com/rcrowley/go-metrics" @@ -1677,6 +1679,9 @@ func GracefulPrimaryTakeover(clusterName string, designatedKey *inst.InstanceKey return topologyRecovery, nil, err } designatedTabletAlias = designatedTablet.Alias + AuditTopologyRecovery(topologyRecovery, fmt.Sprintf("started PlannedReparentShard, new primary will be %s.", topoproto.TabletAliasString(designatedTabletAlias))) + } else { + AuditTopologyRecovery(topologyRecovery, "started PlannedReparentShard with automatic primary selection.") } ev, err := reparentutil.NewPlannedReparenter(ts, tmclient.NewTabletManagerClient(), logutil.NewCallbackLogger(func(event *logutilpb.Event) {
refactor: add a log statement at the start of PRS
vitessio_vitess
train
go
474389c5a373240f20e96e05cab7f171a685ea37
diff --git a/tooling/commands/exec.js b/tooling/commands/exec.js index <HASH>..<HASH> 100644 --- a/tooling/commands/exec.js +++ b/tooling/commands/exec.js @@ -2,6 +2,7 @@ * Copyright (c) 2015-2017 Cisco Systems, Inc. See LICENSE file. */ +const debug = require(`debug`)(`tooling:command:exec`); const wrapHandler = require(`../lib/wrap-handler`); const {list, spawn} = require(`../util/package`); @@ -11,6 +12,7 @@ module.exports = { builder: {}, handler: wrapHandler(async ({cmd, args}) => { for (const packageName of await list()) { + debug(`running ${cmd} ${args.join(` `)} in ${packageName}`); await spawn(packageName, cmd, args); } })
chore(tooling): add log statements
webex_spark-js-sdk
train
js
0ba7965d62c766c78d1bff9f7a3f616980f8fd95
diff --git a/src/components/calendar/calendar.js b/src/components/calendar/calendar.js index <HASH>..<HASH> 100644 --- a/src/components/calendar/calendar.js +++ b/src/components/calendar/calendar.js @@ -83,10 +83,11 @@ function CalendarCtrl($element, $attrs, $scope, $animate, $q, $mdConstant, $$mdDateUtil, $$mdDateLocale, $mdInkRipple, $mdUtil) { - /** @type {Array<number>} + /** * Dummy array-like object for virtual-repeat to iterate over. The length is the total - * number of months that can be viewed. - * */ + * number of months that can be viewed. This is shorter than ideal because of (potential) + * Firefox bug https://bugzilla.mozilla.org/show_bug.cgi?id=1181658. + */ this.items = {length: 2000}; /** @final {!angular.$animate} */ @@ -160,7 +161,7 @@ this.displayDate = null; /** - * The date that has or should have browser focus. + * The date that has or should have focus. * @type {Date} */ this.focusDate = null;
chore(calendar): add some comments
angular_material
train
js
da2b59e83de3c8f6b90e69eee032ff07b16a51fc
diff --git a/packages/ad/ad-init.js b/packages/ad/ad-init.js index <HASH>..<HASH> 100644 --- a/packages/ad/ad-init.js +++ b/packages/ad/ad-init.js @@ -47,10 +47,10 @@ const adInit = args => { el.innerHTML = ` <div id="${data.pos}" - style="display: table-cell; vertical-align: middle" ></div> `; - el.style.display = "table"; + el.style.display = "flex"; + el.style.alignItems = "center"; el.style.margin = "0 auto"; const mapping = googletag.sizeMapping();
fix: vertically align the ads (#<I>)
newsuk_times-components
train
js
a6ca6a712477cf0f361fd29d6e4705219dc9abd1
diff --git a/lib/navigation/zoomscroll/ZoomScroll.js b/lib/navigation/zoomscroll/ZoomScroll.js index <HASH>..<HASH> 100644 --- a/lib/navigation/zoomscroll/ZoomScroll.js +++ b/lib/navigation/zoomscroll/ZoomScroll.js @@ -45,20 +45,13 @@ function ZoomScroll(events, canvas) { y = event.deltaY * factor; if (isZoom) { - var offset = {}; - - // gecko=layer*, other=offset* - if (isNaN(event.offsetX)) { - offset = { - x: event.layerX, - y: event.layerY - }; - } else { - offset = { - x: event.offsetX, - y: event.offsetY - }; - } + + var elementRect = element.getBoundingClientRect(); + + var offset = { + x: event.x - elementRect.left, + y: event.y - elementRect.top + }; // zoom in relative to diagram {x,y} coordinates zoom(y * -1, offset); @@ -79,7 +72,7 @@ function ZoomScroll(events, canvas) { } events.on('canvas.init', function(e) { - init(e.svg.node); + init(canvas._container); }); // API
fix(navigation): zoom+scroll on top of overlays
bpmn-io_diagram-js
train
js
9f68207f7424a5b3ff0792adb59cc5eebb4c2c7e
diff --git a/drivers/python/rethinkdb/asyncio_net/net_asyncio.py b/drivers/python/rethinkdb/asyncio_net/net_asyncio.py index <HASH>..<HASH> 100644 --- a/drivers/python/rethinkdb/asyncio_net/net_asyncio.py +++ b/drivers/python/rethinkdb/asyncio_net/net_asyncio.py @@ -177,7 +177,7 @@ class ConnectionInstance(object): 'Connection interrupted during handshake with %s:%s. Error: %s' % (self._parent.host, self._parent.port, str(err))) except Exception as err: - yield self.close() + yield from self.close() raise ReqlDriverError('Could not connect to %s:%s. Error: %s' % (self._parent.host, self._parent.port, str(err)))
fix: asyncio ConnectionInstance should yield from on Exception (#<I>) Thanks! I got the other two cases yesterday, but missed that one.
rethinkdb_rethinkdb
train
py
8dde97c5979810438a1a44ddc3b8ee0be935a1d3
diff --git a/internal/pipe/brew/brew.go b/internal/pipe/brew/brew.go index <HASH>..<HASH> 100644 --- a/internal/pipe/brew/brew.go +++ b/internal/pipe/brew/brew.go @@ -408,7 +408,7 @@ func split(s string) []string { func formulaNameFor(name string) string { name = strings.ReplaceAll(name, "-", " ") name = strings.ReplaceAll(name, "_", " ") - name = strings.ReplaceAll(name, ".", "_") + name = strings.ReplaceAll(name, ".", "") name = strings.ReplaceAll(name, "@", "AT") return strings.ReplaceAll(strings.Title(name), " ", "") // nolint:staticcheck } diff --git a/internal/pipe/brew/brew_test.go b/internal/pipe/brew/brew_test.go index <HASH>..<HASH> 100644 --- a/internal/pipe/brew/brew_test.go +++ b/internal/pipe/brew/brew_test.go @@ -28,7 +28,7 @@ func TestNameWithUnderline(t *testing.T) { } func TestNameWithDots(t *testing.T) { - require.Equal(t, formulaNameFor("binaryv0.0.0"), "Binaryv0_0_0") + require.Equal(t, formulaNameFor("binaryv0.0.0"), "Binaryv000") } func TestNameWithAT(t *testing.T) {
fix: Modified brew formula class generation to remove dots to match what homebrew expects (#<I>)
goreleaser_goreleaser
train
go,go
973e76890e4cf09621292835893070013ed77672
diff --git a/packages/cli/src/tools/loadMetroConfig.js b/packages/cli/src/tools/loadMetroConfig.js index <HASH>..<HASH> 100644 --- a/packages/cli/src/tools/loadMetroConfig.js +++ b/packages/cli/src/tools/loadMetroConfig.js @@ -53,7 +53,7 @@ export const getDefaultConfig = (ctx: ConfigT) => { require(path.join(ctx.reactNativePath, 'rn-get-polyfills'))(), }, server: { - port: process.env.RCT_METRO_PORT || 8081, + port: Number(process.env.RCT_METRO_PORT) || 8081, }, transformer: { babelTransformerPath: require.resolve(
fix: make sure the port passed to Metro is a number (#<I>)
react-native-community_cli
train
js
00bbb9cfec1ef56df797706761e3cf39cc584973
diff --git a/test/k8sT/DatapathConfiguration.go b/test/k8sT/DatapathConfiguration.go index <HASH>..<HASH> 100644 --- a/test/k8sT/DatapathConfiguration.go +++ b/test/k8sT/DatapathConfiguration.go @@ -575,7 +575,6 @@ var _ = Describe("K8sDatapathConfig", func() { }) Context("Etcd", func() { - // Flaky on pipelines other than K8s 1.11/Linux net-next. It("Check connectivity", func() { deploymentManager.Deploy(helpers.CiliumNamespace, StatelessEtcd) deploymentManager.WaitUntilReady()
test: Remove incorrect comment on flakyness This comment was added in <I>d<I> when the test was disabled, but it wasn't removed once the test was fixed and reenabled in 6fe8d<I>. Fixes: 6fe8d<I> ("test: Fix and re-enable test reliant on managed etcd")
cilium_cilium
train
go
5a2abfab65f5eac95a4376ab2319528ba82975f1
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -149,7 +149,7 @@ setup( "impala": ["impyla>0.16.2, <0.17"], "kusto": ["sqlalchemy-kusto>=1.0.1, <2"], "kylin": ["kylinpy>=2.8.1, <2.9"], - "mmsql": ["pymssql>=2.1.4, <2.2"], + "mssql": ["pymssql>=2.1.4, <2.2"], "mysql": ["mysqlclient>=2.1.0, <3"], "oracle": ["cx-Oracle>8.0.0, <8.1"], "pinot": ["pinotdb>=0.3.3, <0.4"],
fix: correction from mmsql to mssql in setup.py (#<I>)
apache_incubator-superset
train
py
96063f57f749578ee9ae7255fa807529ebf4a858
diff --git a/src/npm-test.js b/src/npm-test.js index <HASH>..<HASH> 100644 --- a/src/npm-test.js +++ b/src/npm-test.js @@ -1,3 +1,6 @@ +'use strict'; + +var debug = require('debug')('next-update'); var check = require('check-more-types'); var spawn = require('child_process').spawn; var q = require('q'); @@ -11,7 +14,7 @@ function findNpmPath() { } var NPM_PATH = findNpmPath(); -console.log('found npm path %s', NPM_PATH); +debug('found npm path %s', NPM_PATH); function argsToString(arrayLike) { return Array.prototype.slice.call(arrayLike, 0).join(' ');
fix(log): moved npm path console log into debug mode
bahmutov_next-update
train
js
ecc723046e42335a61c0faaa28cfc1094bc2bf23
diff --git a/src/ae/universal.js b/src/ae/universal.js index <HASH>..<HASH> 100644 --- a/src/ae/universal.js +++ b/src/ae/universal.js @@ -30,6 +30,7 @@ import Oracle from './oracle' import GeneralizeAccount from '../contract/ga' import AccountMultiple from '../account/multiple' import Contract from './contract' +import Channel from '../channel' /** * Universal Stamp @@ -42,4 +43,4 @@ import Contract from './contract' * @param {Object} [options={}] - Initializer object * @return {Object} Universal instance */ -export default Ae.compose(AccountMultiple, Chain, Transaction, Aens, Contract, Oracle, GeneralizeAccount) +export default Ae.compose(AccountMultiple, Chain, Transaction, Aens, Contract, Oracle, GeneralizeAccount, Channel)
refactor: make channel part of universal stamp
aeternity_aepp-sdk-js
train
js
7fdbb57a838ae10392ec760ec5b54976ddcdfe62
diff --git a/packages/badge/src/react/index.js b/packages/badge/src/react/index.js index <HASH>..<HASH> 100644 --- a/packages/badge/src/react/index.js +++ b/packages/badge/src/react/index.js @@ -37,7 +37,9 @@ const Badge = glamorous.div( border: `1px solid ${colorHexMap[color].stroke}` } : { - color: core.colors.white, + color: color === colors.yellow + ? core.colors.black + : core.colors.white, backgroundColor: colorHexMap[color].bg } )
fix(badge): color contrast for yellow
pluralsight_design-system
train
js
10cdfe59eeab64225dcb75966192b3685baabe7b
diff --git a/protractor.conf.js b/protractor.conf.js index <HASH>..<HASH> 100644 --- a/protractor.conf.js +++ b/protractor.conf.js @@ -54,7 +54,7 @@ if (travis) { },{ browserName: 'firefox', platform: 'Windows 10', - 'version': '48.0', + version: '45.0', 'tunnel-identifier': process.env.TRAVIS_JOB_NUMBER, build: process.env.TRAVIS_BUILD_NUMBER, name: 'Redoc Firefox Latest/Win build ' + process.env.TRAVIS_BUILD_NUMBER,
chore: downgrade ff to <I> to fix e2e tests FF after <I> crashes when selenium tries to get browser logs
Rebilly_ReDoc
train
js
92e8a4ea398da0ddeb650171fccb48761af3ffb2
diff --git a/components/serverless-apollo-service/serverless.js b/components/serverless-apollo-service/serverless.js index <HASH>..<HASH> 100644 --- a/components/serverless-apollo-service/serverless.js +++ b/components/serverless-apollo-service/serverless.js @@ -25,7 +25,7 @@ class ApolloService extends Component { await trackComponent({ track, context: this.context, component }); const { - extraEndpoints = [], + endpoints = [], name: componentName, plugins = [], env = {}, @@ -153,7 +153,7 @@ class ApolloService extends Component { endpointTypes, endpoints: [ { path: "/graphql", method: "ANY", function: lambdaOut.arn }, - ...extraEndpoints + ...endpoints ] });
feat: rename extraEndpoints to endpoints
Webiny_webiny-js
train
js
a28b52971398f7df60adbae77524621ba510739d
diff --git a/source/php/Module/Contacts/views/contacts.blade.php b/source/php/Module/Contacts/views/contacts.blade.php index <HASH>..<HASH> 100644 --- a/source/php/Module/Contacts/views/contacts.blade.php +++ b/source/php/Module/Contacts/views/contacts.blade.php @@ -3,9 +3,16 @@ @if ($thumbnail !== false) <img class="box-image" src="{{ $thumbnail[0] }}" alt="{{ $first_name }} {{ $last_name }}"> @endif - + @if (!$hideTitle && !empty($postTitle)) - <h4 class="box-title">{!! $postTitle !!}</h4> + @typography([ + 'id' => 'mod-text-' . $ID .'-label', + 'element' => 'h4', + 'variant' => 'h2', + 'classList' => ['module-title'] + ]) + {!! $postTitle !!} + @endtypography @endif <div class="box-content">
fix: remove red banner from contacts module. Replace with typhography component.
helsingborg-stad_Modularity
train
php
56704b8d7920487301828dd7393065567a9304be
diff --git a/teslajsonpy/connection.py b/teslajsonpy/connection.py index <HASH>..<HASH> 100644 --- a/teslajsonpy/connection.py +++ b/teslajsonpy/connection.py @@ -1,7 +1,8 @@ -# SPDX-License-Identifier: Apache-2.0 """ Python Package for controlling Tesla API. +SPDX-License-Identifier: Apache-2.0 + Underlying connection logic. For more details about this api, please refer to the documentation at
refactor: move spdx-id into docstring
zabuldon_teslajsonpy
train
py
e9ea36bd44cd93dc56a790cc0611b0be055ea582
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -39,6 +39,7 @@ required_packages = [ "protobuf>=3.1", "scipy>=0.19.0", "protobuf3-to-dict>=0.1.5", + "PyYAML>=3.10, <5", # required for session "requests>=2.20.0, <2.21", ]
fix: add pyyaml dependencies to the required list. (#<I>)
aws_sagemaker-python-sdk
train
py
9dd3451721b96bbaca23f98d81eece2413c0d2ac
diff --git a/src/main/java/com/bugsnag/Bugsnag.java b/src/main/java/com/bugsnag/Bugsnag.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/bugsnag/Bugsnag.java +++ b/src/main/java/com/bugsnag/Bugsnag.java @@ -521,6 +521,27 @@ public class Bugsnag { } /** + * Set the endpoints to send data to. By default we'll send error reports to + * https://notify.bugsnag.com, and sessions to https://sessions.bugsnag.com, but you can + * override this if you are using Bugsnag Enterprise to point to your own Bugsnag endpoint. + * + * Please note that it is recommended that you set both endpoints. If the notify endpoint is + * missing, an exception will be thrown. If the session endpoint is missing, a warning will be + * logged and sessions will not be sent automatically. + * + * Note that if you are setting a custom {@link Delivery}, this method should be called after + * the custom implementation has been set. + * + * @param notify the notify endpoint + * @param sessions the sessions endpoint + * + * @throws IllegalArgumentException if the notify endpoint is empty or null + */ + public void setEndpoints(String notify, String sessions) throws IllegalArgumentException { + config.setEndpoints(notify, sessions); + } + + /** * Close the connection to Bugsnag and unlink the exception handler. */ public void close() {
feat: add setEndpoints API to bugsnag, as well as config
bugsnag_bugsnag-java
train
java
f42f67ff1dd6cd72cc7cc6752dde04cda543b487
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -3,6 +3,7 @@ module.exports = Hoodie var Store = require('pouchdb-hoodie-store') var Account = require('account-client') var Task = function () {} +var Log = require('hoodie-client-log') var getState = require('./lib/get-state') var id = require('./lib/id').id @@ -19,6 +20,7 @@ function Hoodie (options) { api.account = new Account({ url: '/hoodie/account/api' }) api.task = new Task('/hoodie/task/api') + api.log = new Log('hoodie') return api }
feat: hoodie.log API
hoodiehq_hoodie-client
train
js
c6fc63468f136f89933fe3c78a7002eac73c72bc
diff --git a/packages/help/Help.js b/packages/help/Help.js index <HASH>..<HASH> 100644 --- a/packages/help/Help.js +++ b/packages/help/Help.js @@ -127,6 +127,7 @@ export const FieldHelpIcon = ({ color, size, id, labelId }) => ( onClick={() => triggerFieldHelp(id)} tabIndex={0} onKeyPress={(e) => handleKeyPress(e, id)} + aria-hidden="false" aria-label="help" aria-describedby={labelId || ''} />
fix(help): made field help icon link not aria-hidden
Availity_availity-react
train
js
23976872ffe260f962ebcc079088829869598199
diff --git a/library/Theme/Sidebars.php b/library/Theme/Sidebars.php index <HASH>..<HASH> 100644 --- a/library/Theme/Sidebars.php +++ b/library/Theme/Sidebars.php @@ -17,6 +17,15 @@ class Sidebars add_filter('Modularity/Display/BeforeModule', array($this, 'replaceGridClasses'), 10, 1); add_action('admin_enqueue_scripts', array($this, 'filterVisibleWigets')); + + add_filter('Modularity/Templates/Sidebars', array($this, 'filterAvailableSidebars')); + } + + public function filterAvailableSidebars($sidebars) + { + return array_filter($sidebars, function($sidebar) { + return strpos($sidebar['id'], 'footer-') !== 0; + }); } public function filterVisibleWigets($page)
fix: remove sidebars from template areas (#<I>)
helsingborg-stad_Municipio
train
php
f45d2714e3b837790d587e0e477d1bc478a47fc1
diff --git a/src/DataExport/SourceResponse.php b/src/DataExport/SourceResponse.php index <HASH>..<HASH> 100644 --- a/src/DataExport/SourceResponse.php +++ b/src/DataExport/SourceResponse.php @@ -207,8 +207,7 @@ class SourceResponse } elseif ($this->oSource instanceof \PDOStatement) { // unsupported } elseif ($this->oSource instanceof \CI_DB_mysqli_result) { - // @todo (Pablo - 2018-02-19) - Watch compatibility with this function as it's marked as private - $this->oSource->_data_seek(0); + $this->oSource->data_seek(0); } }
fix: Corrected method call Method data_seek() is now public
nails_module-admin
train
php
d98fc92bdc7bba8ef8de8b9e5285e7a9e3637f14
diff --git a/src/scaffolder.js b/src/scaffolder.js index <HASH>..<HASH> 100644 --- a/src/scaffolder.js +++ b/src/scaffolder.js @@ -15,7 +15,7 @@ import {questionNames} from './prompts/question-names'; import buildBadgesDetails from './badges'; export async function scaffold(options) { - console.log(chalk.blue('Initializing JavaScript project')); // eslint-disable-line no-console + console.error(chalk.blue('Initializing JavaScript project')); // eslint-disable-line no-console const { projectRoot, @@ -58,7 +58,7 @@ export async function scaffold(options) { const nodeVersion = await determineLatestVersionOf(nodeVersionCategory); - console.log(chalk.grey('Writing project files')); // eslint-disable-line no-console + console.error(chalk.grey('Writing project files')); // eslint-disable-line no-console const packageData = buildPackage({ projectName, @@ -106,7 +106,7 @@ export async function scaffold(options) { await installNodeVersion(nodeVersionCategory); - console.log(chalk.grey('Installing devDependencies')); // eslint-disable-line no-console + console.error(chalk.grey('Installing devDependencies')); // eslint-disable-line no-console await install(devDependencies); return {
fix(status): wrote message to stderr instead of stdout
travi_javascript-scaffolder
train
js
391fe6b416c5855eab0c7c82cd939b57db7315d3
diff --git a/test/test_ci.rb b/test/test_ci.rb index <HASH>..<HASH> 100644 --- a/test/test_ci.rb +++ b/test/test_ci.rb @@ -77,6 +77,35 @@ module EnvPullRequest end.pull_request_id == pull_id end end + + sub_test_case 'superior user definition' do + env_pull_id = 900 + setup do + ENV['TRAVIS_PULL_REQUEST'] = env_pull_id.to_s + end + + teardown do + ENV.delete 'TRAVIS_PULL_REQUEST' + end + test '#pull_request?' do + assert do + EnvPullRequest.new do + if Utils.integral_string? ENV['PULL_REQUEST_ID'] + ENV['PULL_REQUEST_ID'].to_i + end + end.pull_request? == true + end + end + test '#pull_request_id' do + assert do + EnvPullRequest.new do + if Utils.integral_string? ENV['PULL_REQUEST_ID'] + ENV['PULL_REQUEST_ID'].to_i + end + end.pull_request_id == pull_id + end + end + end end end
test(block): superior user definition
packsaddle_ruby-env_pull_request
train
rb
68b1023ba0b267b1cbf3093b38a854526ee690c4
diff --git a/vyper/context/validation/utils.py b/vyper/context/validation/utils.py index <HASH>..<HASH> 100644 --- a/vyper/context/validation/utils.py +++ b/vyper/context/validation/utils.py @@ -426,6 +426,15 @@ def get_index_value(node: vy_ast.Index) -> int: """ if not isinstance(node.get("value"), vy_ast.Int): + if hasattr(node, "value"): + # even though the subscript is an invalid type, first check if it's a valid _something_ + # this gives a more accurate error in case of e.g. a typo in a constant variable name + try: + get_possible_types_from_node(node.value) + except StructureException: + # StructureException is a very broad error, better to raise InvalidType in this case + pass + raise InvalidType("Subscript must be a literal integer", node) if node.value.value <= 0:
fix: better exception on invalid subscript
ethereum_vyper
train
py
b8d386547f30ee3701e1f6ee6cacc0be08df426a
diff --git a/test/fixtures/programmatic/curated-plugins/_setup.js b/test/fixtures/programmatic/curated-plugins/_setup.js index <HASH>..<HASH> 100644 --- a/test/fixtures/programmatic/curated-plugins/_setup.js +++ b/test/fixtures/programmatic/curated-plugins/_setup.js @@ -3,7 +3,12 @@ const path = require('path'); const fsp = require('fs').promises; -const slsDependencyDir = path.resolve(__dirname, 'node_modules/serverless'); +const nodeModulesDir = path.resolve(__dirname, 'node_modules'); // Ensure to remove "serverless" installed as peer-dependency to avoid local fallback -module.exports = async () => fsp.rm(slsDependencyDir, { recursive: true, force: true }); +module.exports = async () => + Promise.all([ + fsp.rm(path.resolve(nodeModulesDir, 'serverless'), { recursive: true, force: true }), + fsp.unlink(path.resolve(nodeModulesDir, '.bin/serverless')).catch(() => {}), + fsp.unlink(path.resolve(nodeModulesDir, '.bin/sls')).catch(() => {}), + ]);
test(Plugins): Ensure to not leave broken symlinks in a setup fixture Otherwise it leaves a broken symlink of which copying crashes `fse.copy`
serverless_serverless
train
js
f6b7230591957e69232cde13719c3bab4f729274
diff --git a/src/foremast/pipeline/construct_pipeline_block.py b/src/foremast/pipeline/construct_pipeline_block.py index <HASH>..<HASH> 100644 --- a/src/foremast/pipeline/construct_pipeline_block.py +++ b/src/foremast/pipeline/construct_pipeline_block.py @@ -41,7 +41,7 @@ def construct_pipeline_block(env='', user_data = generate_encoded_user_data(env=env, region=region, app_name=generated.app, - group_name=generated.project), + group_name=generated.project) # Use different variable to keep template simple data = settings
fix: Remove trailing comma Trailing commas turn normal assignments into tuple assignments, very hidden and confusing. See also: PSOBAT-<I>
foremast_foremast
train
py
d3ed6b8d2daa6bab15293d4708c55bf6ad405f8d
diff --git a/src/Contracts/Models/View.php b/src/Contracts/Models/View.php index <HASH>..<HASH> 100644 --- a/src/Contracts/Models/View.php +++ b/src/Contracts/Models/View.php @@ -23,9 +23,9 @@ use Illuminate\Database\Eloquent\Relations\MorphTo; interface View { /** - * Create the polymorphic relation. + * Get all of the owning viewable models. * * @return \Illuminate\Database\Eloquent\Relations\MorphTo */ - public function model(): MorphTo; + public function viewable(): MorphTo; }
refactor: update View interface See <I>
cyrildewit_eloquent-viewable
train
php
a0ae1cb002d55f0edda79074b1a9fff7d292acb7
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -5,7 +5,7 @@ import subprocess from setuptools import find_packages, setup -__version__ = "0.2.9" +__version__ = "0.2.10" extras_require = { "test": [
chore: bumpversion to <I>
ethereum_vyper
train
py
b2484946fffe93dbb6bc51750116a2a058a38e13
diff --git a/packages/cozy-scripts/config/webpack.environment.dev.js b/packages/cozy-scripts/config/webpack.environment.dev.js index <HASH>..<HASH> 100644 --- a/packages/cozy-scripts/config/webpack.environment.dev.js +++ b/packages/cozy-scripts/config/webpack.environment.dev.js @@ -25,8 +25,9 @@ let plugins = [ } ]), new HtmlWebpackIncludeAssetsPlugin({ - assets: [buildCozyBarCss], - append: false + assets: ['cozy-bar.css'], + append: false, + publicPath: true }) ]
fix: :bug: cozy-bar css include path
CPatchane_create-cozy-app
train
js