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 |
|---|---|---|---|---|---|
6ffc1d5bcabd1d797feaf96f4ff3ee33ae0fbbaf
|
diff --git a/actor-apps/core/src/main/java/im/actor/core/modules/internal/messages/OwnReadActor.java b/actor-apps/core/src/main/java/im/actor/core/modules/internal/messages/OwnReadActor.java
index <HASH>..<HASH> 100644
--- a/actor-apps/core/src/main/java/im/actor/core/modules/internal/messages/OwnReadActor.java
+++ b/actor-apps/core/src/main/java/im/actor/core/modules/internal/messages/OwnReadActor.java
@@ -84,6 +84,9 @@ public class OwnReadActor extends ModuleActor {
// Saving read state
context().getMessagesModule().saveReadState(peer, sortingDate);
+
+ // Clearing notifications
+ context().getNotificationsModule().onOwnRead(peer, sortingDate);
}
// Messages
|
fix(core): Fixing notifications
|
actorapp_actor-platform
|
train
|
java
|
31cf0a1563f4b4119750dd6b7f125fc543e96923
|
diff --git a/packages/bonde-admin/src/mobilizations/paths.js b/packages/bonde-admin/src/mobilizations/paths.js
index <HASH>..<HASH> 100644
--- a/packages/bonde-admin/src/mobilizations/paths.js
+++ b/packages/bonde-admin/src/mobilizations/paths.js
@@ -1,5 +1,5 @@
export const mobilizations = () => '/mobilizations'
-export const mobilization = (mobilization, domain = process.env.REACT_APP_DOMAIN_ADMIN) => {
+export const mobilization = (mobilization, domain = process.env.REACT_APP_DOMAIN_PUBLIC) => {
if (domain && domain.indexOf('staging') !== -1) {
return `http://${mobilization.slug}.${domain}`
}
|
fix(admin): change env redirect to mobilization on public version
|
nossas_bonde-client
|
train
|
js
|
03259e803d01b1e5ed900c20258431357a2fd14a
|
diff --git a/packages/site/pages/core/motion.js b/packages/site/pages/core/motion.js
index <HASH>..<HASH> 100644
--- a/packages/site/pages/core/motion.js
+++ b/packages/site/pages/core/motion.js
@@ -181,15 +181,15 @@ const Travel = _ => (
}
.pill1 {
width: 50%;
- animation: 3000ms 500ms infinite pill1;
+ animation: 4000ms 500ms infinite pill1;
}
.pill2Container {
width: calc(100% - 44px);
- animation: 3000ms 500ms infinite pill2;
+ animation: 4000ms 500ms infinite pill2;
}
.pill3Container {
width: calc(100% - 44px);
- animation: 3000ms 500ms infinite pill3;
+ animation: 4000ms 500ms infinite pill3;
}
.pill2,
.pill3 {
|
refactor(site): add more time to motion travel example
|
pluralsight_design-system
|
train
|
js
|
91648e4be3b5cf4771ccfecefaeed36a51af3193
|
diff --git a/packages/cozy-client/src/cli/index.js b/packages/cozy-client/src/cli/index.js
index <HASH>..<HASH> 100644
--- a/packages/cozy-client/src/cli/index.js
+++ b/packages/cozy-client/src/cli/index.js
@@ -192,4 +192,22 @@ const createClientInteractive = (clientOptions, serverOpts) => {
})
}
+const main = async () => {
+ const client = await createClientInteractive({
+ scope: ['io.cozy.files'],
+ uri: 'http://cozy.tools:8080',
+ oauth: {
+ softwareID: 'io.cozy.client.cli'
+ }
+ })
+ console.log(client.toJSON())
+}
+
+if (require.main === module) {
+ main().catch(e => {
+ console.error(e)
+ process.exit(1)
+ })
+}
+
export { createClientInteractive }
|
feat: Add test CLI for createClientInteractive
|
cozy_cozy-client
|
train
|
js
|
b2d890a1e03d4c01be1be0075251da8915257e7d
|
diff --git a/src/main/java/io/fabric8/maven/docker/service/QueryService.java b/src/main/java/io/fabric8/maven/docker/service/QueryService.java
index <HASH>..<HASH> 100644
--- a/src/main/java/io/fabric8/maven/docker/service/QueryService.java
+++ b/src/main/java/io/fabric8/maven/docker/service/QueryService.java
@@ -169,18 +169,4 @@ public class QueryService {
public boolean hasImage(String name) throws DockerAccessException {
return docker.hasImage(name);
}
-
- /**
- * Check whether an image needs to be pulled.
- *
- * @param mode the auto pull mode coming from the configuration
- * @param imageName name of the image to check
- * @param always whether to a alwaysPull mode would be active or is always ignored
- * @param previouslyPulled cache holding all previously pulled images
- * @return true if the image needs to be pulled, false otherwise
- *
- * @throws DockerAccessException
- * @throws MojoExecutionException
- */
-
}
|
chore: Removed bogus comment
|
fabric8io_docker-maven-plugin
|
train
|
java
|
23383cef851a1e9635779e5867a53d03d33885fa
|
diff --git a/src/geshi.php b/src/geshi.php
index <HASH>..<HASH> 100644
--- a/src/geshi.php
+++ b/src/geshi.php
@@ -2015,7 +2015,7 @@ class GeSHi {
}
// Other whitespace
// BenBE: Fix to reduce the number of replacements to be done
- $result = str_replace("\n ", "\n ", $result);
+ $result = preg_replace('/^ /m', ' ', $result);
$result = str_replace(' ', ' ', $result);
if ($this->line_numbers == GESHI_NO_LINE_NUMBERS) {
|
fix: #<I>: wrong indentation of first line
|
GeSHi_geshi-1.0
|
train
|
php
|
3c832b4e995487813bdb31eb533947f69460fe62
|
diff --git a/packages/core-js/modules/web.url.js b/packages/core-js/modules/web.url.js
index <HASH>..<HASH> 100644
--- a/packages/core-js/modules/web.url.js
+++ b/packages/core-js/modules/web.url.js
@@ -31,7 +31,7 @@ var INVALID_HOST = 'Invalid host';
var INVALID_PORT = 'Invalid port';
var ALPHA = /[A-Za-z]/;
-var ALPHANUMERIC = /[\d+\-.A-Za-z]/;
+var ALPHANUMERIC = /[\d+.A-Za-z\-]/;
var DIGIT = /\d/;
var HEX_START = /^(0x|0X)/;
var OCT = /^[0-7]+$/;
|
chore: Make unicorn/regex-shorthand happy
|
zloirock_core-js
|
train
|
js
|
8c713ef1bd0ca9f83e1b1b8560190245c80b688e
|
diff --git a/lib/BrowserFetcher.js b/lib/BrowserFetcher.js
index <HASH>..<HASH> 100644
--- a/lib/BrowserFetcher.js
+++ b/lib/BrowserFetcher.js
@@ -233,7 +233,12 @@ function downloadFile(url, destinationPath, progressCallback) {
* @return {!Promise<?Error>}
*/
function extractZip(zipPath, folderPath) {
- return new Promise(fulfill => extract(zipPath, {dir: folderPath}, fulfill));
+ return new Promise((fulfill, reject) => extract(zipPath, {dir: folderPath}, err => {
+ if (err)
+ reject(err);
+ else
+ fulfill();
+ }));
}
function httpRequest(url, method, response) {
|
fix(browserfetcher): handle extract-zip errors (#<I>)
|
GoogleChrome_puppeteer
|
train
|
js
|
e7ba976ba390a8801c3a3fad69db6bd07ebef0a3
|
diff --git a/bin/cli.js b/bin/cli.js
index <HASH>..<HASH> 100755
--- a/bin/cli.js
+++ b/bin/cli.js
@@ -15,7 +15,7 @@ function cliMain () {
return new Installer(parseArgs()).run().then(details => {
console.error(`added ${details.pkgCount} packages in ${
details.runTime / 1000
- }s.`)
+ }s`)
}, err => {
console.error(`Error!\n${err.message}\n${err.stack}`)
})
|
fix(output): npm does not punctuate this
|
zkat_cipm
|
train
|
js
|
bd802c0aaf49d47ae1698ced54686b04abf7de0b
|
diff --git a/src/utils/to-path-components.js b/src/utils/to-path-components.js
index <HASH>..<HASH> 100644
--- a/src/utils/to-path-components.js
+++ b/src/utils/to-path-components.js
@@ -4,7 +4,7 @@ const toPathComponents = (path = '') => {
// split on / unless escaped with \
return (path
.trim()
- .match(/([^\\\^/]|\\\/)+/g) || [])
+ .match(/([^\\^/]|\\\/)+/g) || [])
.filter(Boolean)
}
|
chore: fix up linting errors
|
ipfs_js-ipfs-unixfs
|
train
|
js
|
bdaff7b64d8437f4af82f6aa0f69fabba27ea20e
|
diff --git a/lib/workers/pr/index.js b/lib/workers/pr/index.js
index <HASH>..<HASH> 100644
--- a/lib/workers/pr/index.js
+++ b/lib/workers/pr/index.js
@@ -237,7 +237,7 @@ async function ensurePr(prConfig) {
logger.debug(
{
prTitle,
- oldPrBody: existingPr.body,
+ oldPrBody: existingPrBody,
newPrBody: prBody,
},
'PR body changed'
|
refactor: fix oldPrBody log
|
renovatebot_renovate
|
train
|
js
|
0957c24646244d5c8bf68c2036b17a332881aca5
|
diff --git a/client/consul/consul.go b/client/consul/consul.go
index <HASH>..<HASH> 100644
--- a/client/consul/consul.go
+++ b/client/consul/consul.go
@@ -6,7 +6,7 @@ import (
)
// ConsulServiceAPI is the interface the Nomad Client uses to register and
-// remove services and checks from Consul.css
+// remove services and checks from Consul.
//
// ACL requirements
// - service:write
|
docs: remove erroneous characters from comment
|
hashicorp_nomad
|
train
|
go
|
5c37a1a897837212270c28fe5be9d0512cd8a7bd
|
diff --git a/templates/webpack.angular.js b/templates/webpack.angular.js
index <HASH>..<HASH> 100644
--- a/templates/webpack.angular.js
+++ b/templates/webpack.angular.js
@@ -90,7 +90,7 @@ module.exports = env => {
const ngCompilerPlugin = new AngularCompilerPlugin({
hostReplacementPaths: nsWebpack.getResolver([platform, "tns"]),
platformTransformers: ngCompilerTransformers.map(t => t(() => ngCompilerPlugin, resolve(appFullPath, entryModule))),
- mainPath: resolve(appPath, entryModule),
+ mainPath: join(appFullPath, entryModule),
tsConfigPath: join(__dirname, tsConfigName),
skipCodeGeneration: !aot,
sourceMap: !!sourceMap,
|
chore: merge release into master (#<I>)
* release: cut the <I> release
* fix: add support for ts files on test command when `--bundle` is provided (#<I>)
Rel to:
<URL>
* fix: fix "ERROR in Must have a source file to refactor." error from ngCompilerPlugin on `test` command (#<I>)
|
NativeScript_nativescript-dev-webpack
|
train
|
js
|
e0ceeee6a1c8543bd840b93abf9177025e3cec44
|
diff --git a/cts/analytics/ab_testing_test.go b/cts/analytics/ab_testing_test.go
index <HASH>..<HASH> 100644
--- a/cts/analytics/ab_testing_test.go
+++ b/cts/analytics/ab_testing_test.go
@@ -7,6 +7,7 @@ import (
"github.com/stretchr/testify/require"
"github.com/algolia/algoliasearch-client-go/v3/algolia/analytics"
+ "github.com/algolia/algoliasearch-client-go/v3/algolia/opt"
"github.com/algolia/algoliasearch-client-go/v3/algolia/wait"
"github.com/algolia/algoliasearch-client-go/v3/cts"
)
@@ -66,7 +67,7 @@ func TestABTesting(t *testing.T) {
{
found := false
- res, err := analyticsClient.GetABTests()
+ res, err := analyticsClient.GetABTests(opt.Limit(100))
require.NoError(t, err)
for _, b := range res.ABTests {
if b.ABTestID == abTestID {
|
test: prevent flakiness for TestABTesting test
|
algolia_algoliasearch-client-go
|
train
|
go
|
df2566e3905bbddc0987e099f790d2767fb1ea1a
|
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -916,8 +916,9 @@ if (shadowDomV1) {
Object.keys(members).forEach(memberName => {
const memberProperty = members[memberName];
- // All properties should be configurable.
+ // All properties should be configurable and enumerable.
memberProperty.configurable = true;
+ memberProperty.enumerable = true;
// Applying to the data properties only since we can't have writable accessor properties.
if (memberProperty.hasOwnProperty('value')) { // eslint-disable-line no-prototype-builtins
|
fix(enumeration): make all added member properties enumerable
|
skatejs_named-slots
|
train
|
js
|
7a4e47eb0970dd1cdd496449d97d03253f856d76
|
diff --git a/src/tabs/index.js b/src/tabs/index.js
index <HASH>..<HASH> 100644
--- a/src/tabs/index.js
+++ b/src/tabs/index.js
@@ -267,7 +267,7 @@ export default createComponent({
},
// emit event when clicked
- onClick(index) {
+ onClick(item, index) {
const { title, disabled, computedName } = this.children[index];
if (disabled) {
this.$emit('disabled', computedName, title);
@@ -275,6 +275,7 @@ export default createComponent({
this.setCurrentIndex(index);
this.scrollToCurrentContent();
this.$emit('click', computedName, title);
+ route(item.$router, item);
}
},
@@ -360,8 +361,7 @@ export default createComponent({
default: () => item.slots('title'),
}}
onClick={() => {
- this.onClick(index);
- route(item.$router, item);
+ this.onClick(item, index);
}}
/>
));
|
fix(Tab): should not trigger route when disabled (#<I>)
|
youzan_vant
|
train
|
js
|
4c27d574b81a321d0d5088cdb161bbd18a30e7ef
|
diff --git a/lib/ditty/controllers/component.rb b/lib/ditty/controllers/component.rb
index <HASH>..<HASH> 100644
--- a/lib/ditty/controllers/component.rb
+++ b/lib/ditty/controllers/component.rb
@@ -42,7 +42,7 @@ module Ditty
end
# Create Form
- get '/new' do
+ get '/new/?' do
authorize settings.model_class, :create
entity = settings.model_class.new(permitted_attributes(settings.model_class, :create))
@@ -66,7 +66,7 @@ module Ditty
end
# Read
- get '/:id' do |id|
+ get '/:id/?' do |id|
entity = read(id)
halt 404 unless entity
authorize entity, :read
@@ -76,7 +76,7 @@ module Ditty
end
# Update Form
- get '/:id/edit' do |id|
+ get '/:id/edit/?' do |id|
entity = read(id)
halt 404 unless entity
authorize entity, :update
@@ -87,7 +87,7 @@ module Ditty
end
# Update
- put '/:id' do |id|
+ put '/:id/?' do |id|
entity = read(id)
halt 404 unless entity
authorize entity, :update
@@ -101,7 +101,7 @@ module Ditty
update_response(entity)
end
- delete '/:id' do |id|
+ delete '/:id/?' do |id|
entity = read(id)
halt 404 unless entity
authorize entity, :delete
|
chore: Allow trailing / on certain component routes
|
EagerELK_ditty
|
train
|
rb
|
d55def28016ecb7ec834ca152a254fb35700193e
|
diff --git a/bingo/image.py b/bingo/image.py
index <HASH>..<HASH> 100644
--- a/bingo/image.py
+++ b/bingo/image.py
@@ -66,7 +66,7 @@ def get_texts(bingo_fields, font):
if bingo_field.is_middle():
text += _("\n{time}\nBingo #{board_id}").format(
time=bingo_field.board.get_created(),
- board_id=bingo_field.board.id)
+ board_id=bingo_field.board.board_id)
texts.append(Text(draw, font, text))
return texts
|
fix: show the correct board_id on the images.
The correct id is board.board_id and not board.id,
as "id" is the internal id assigned by django,
and "board_id" is the board number on the current site.
|
allo-_django-bingo
|
train
|
py
|
fa3b90fea03cea88a3f36c9f8d1b974641f46023
|
diff --git a/src/pubsub.js b/src/pubsub.js
index <HASH>..<HASH> 100644
--- a/src/pubsub.js
+++ b/src/pubsub.js
@@ -63,7 +63,9 @@ module.exports = (common) => {
const getTopic = () => 'pubsub-tests-' + Math.random()
- describe('callback API', () => {
+ describe('callback API', function () {
+ this.timeout(80 * 1000)
+
let ipfs1
let ipfs2
let ipfs3
@@ -599,7 +601,9 @@ module.exports = (common) => {
})
})
- describe('promise API', () => {
+ describe('promise API', function () {
+ this.timeout(80 * 1000)
+
let ipfs1
before((done) => {
|
chore: increase timeout for CI
|
ipfs_interface-js-ipfs-core
|
train
|
js
|
0c5979ec68dda37860b9109c2ad14cee7c3c0df2
|
diff --git a/src/utils/helper.js b/src/utils/helper.js
index <HASH>..<HASH> 100644
--- a/src/utils/helper.js
+++ b/src/utils/helper.js
@@ -273,6 +273,7 @@ export const parseHits = (hits) => {
_id: data._id,
_index: data._index,
_type: data._type,
+ _score: data._score,
highlight: data.highlight || {},
...data._source,
...streamProps,
|
feat: Expose _score in hits (#<I>)
|
appbaseio_reactivecore
|
train
|
js
|
33f8f61ffac193c7ccdeeb65a294925253460e6f
|
diff --git a/packages/onesignal/index.js b/packages/onesignal/index.js
index <HASH>..<HASH> 100755
--- a/packages/onesignal/index.js
+++ b/packages/onesignal/index.js
@@ -33,7 +33,7 @@ function addOneSignal (moduleOptions) {
cdn: true,
GcmSenderId: '482941778795',
importScripts: [
- '/sw.js'
+ '/sw.js?' + Date.now()
],
init: {
allowLocalhostAsSecureOrigin: true,
|
fix(onesignal): add cache query to sw.js
|
nuxt-community_pwa-module
|
train
|
js
|
56c92d888b4fbe9172c78bbb5bdea61945cb41fd
|
diff --git a/scenarios/api.github.com/paginate-issues/test.js b/scenarios/api.github.com/paginate-issues/test.js
index <HASH>..<HASH> 100644
--- a/scenarios/api.github.com/paginate-issues/test.js
+++ b/scenarios/api.github.com/paginate-issues/test.js
@@ -18,7 +18,7 @@ test('paginate issues', async (t) => {
}
await axios.request(Object.assign(options, {
- url: baseUrl
+ url: `${baseUrl}&page=1`
})).catch(mock.explain)
for (let i = 2; i <= 5; i++) {
|
test: pass ?page=1 to first request of paginate issues
|
octokit_fixtures
|
train
|
js
|
602453855ea57e9c9ddf04f473a7e18f5ad9a8e5
|
diff --git a/test.js b/test.js
index <HASH>..<HASH> 100644
--- a/test.js
+++ b/test.js
@@ -273,13 +273,19 @@ describe('InfluxDB', function () {
})
describe('#dropDatabase', function () {
- this.timeout(25000)
+ beforeEach(function (done) {
+ client.createDatabase(info.db.name, done)
+ })
it('should delete the database without error', function (done) {
client.dropDatabase(info.db.name, done)
})
- it('should not error if database didn\'t exist', function (done) {
+ it('should error if database didn\'t exist', function (done) {
client.dropDatabase(info.db.name, function (err) {
- done(err)
+ if (err) return done(err)
+ client.dropDatabase(info.db.name, function (err) {
+ assert(err instanceof Error)
+ done()
+ })
})
})
})
|
test: dropping a non-existant database should err
|
node-influx_node-influx
|
train
|
js
|
5ac908bcdcbd429bda63616e5dba26bb81b8f227
|
diff --git a/packages/react/src/components/DatePicker/DatePicker.js b/packages/react/src/components/DatePicker/DatePicker.js
index <HASH>..<HASH> 100644
--- a/packages/react/src/components/DatePicker/DatePicker.js
+++ b/packages/react/src/components/DatePicker/DatePicker.js
@@ -382,7 +382,7 @@ function DatePicker({
// Flatpickr's calendar dialog is not rendered in a landmark causing an
// error with IBM Equal Access Accessibility Checker so we add an aria
// role to the container div.
- calendar.calendarContainer.setAttribute('role', 'region');
+ calendar.calendarContainer.setAttribute('role', 'application');
// IBM EAAC requires an aria-label on a role='region'
calendar.calendarContainer.setAttribute(
'aria-label',
|
fix(Datepicker): change role on calendar container to 'application' (#<I>)
|
carbon-design-system_carbon-components
|
train
|
js
|
2e0f1afca926b14d03478f8445651edfecf555ee
|
diff --git a/packages/core/parcel/src/cli.js b/packages/core/parcel/src/cli.js
index <HASH>..<HASH> 100755
--- a/packages/core/parcel/src/cli.js
+++ b/packages/core/parcel/src/cli.js
@@ -179,11 +179,15 @@ async function run(entries: Array<string>, command: any) {
}
let Parcel = require('@parcel/core').default;
let options = await normalizeOptions(command);
- let packageManager = new NodePackageManager(new NodeFS());
+ let fs = new NodeFS();
+ let packageManager = new NodePackageManager(fs);
let parcel = new Parcel({
entries,
packageManager,
- defaultConfig: '@parcel/config-default',
+ // $FlowFixMe - flow doesn't know about the `paths` option (added in Node v8.9.0)
+ defaultConfig: require.resolve('@parcel/config-default', {
+ paths: [fs.cwd(), __dirname],
+ }),
patchConsole: true,
...options,
});
|
fix: use require.resolve when resolving default config (#<I>)
|
parcel-bundler_parcel
|
train
|
js
|
03a2a3513ea7fb026dab40316d4dcf046af5c75e
|
diff --git a/webapps/ui/cockpit/plugins/base/app/views/processInstance/jobRetryBulkDialog.js b/webapps/ui/cockpit/plugins/base/app/views/processInstance/jobRetryBulkDialog.js
index <HASH>..<HASH> 100644
--- a/webapps/ui/cockpit/plugins/base/app/views/processInstance/jobRetryBulkDialog.js
+++ b/webapps/ui/cockpit/plugins/base/app/views/processInstance/jobRetryBulkDialog.js
@@ -55,7 +55,8 @@ module.exports = [
JobResource.count({
processInstanceId: processInstance.id,
- withException: true
+ withException: true,
+ noRetriesLeft: true
}).$promise.then(function(data) {
jobPages.total = data.count;
|
fix(cockpit): show error message in "Increment Number of Retries" modal dialog
related to CAM-<I>
|
camunda_camunda-bpm-platform
|
train
|
js
|
c1b5981e872427ee0ca5d41d6afc7a0f8bebb051
|
diff --git a/webapps/ui/cockpit/client/scripts/navigation/controllers/cam-header-views-ctrl.js b/webapps/ui/cockpit/client/scripts/navigation/controllers/cam-header-views-ctrl.js
index <HASH>..<HASH> 100644
--- a/webapps/ui/cockpit/client/scripts/navigation/controllers/cam-header-views-ctrl.js
+++ b/webapps/ui/cockpit/client/scripts/navigation/controllers/cam-header-views-ctrl.js
@@ -1,10 +1,6 @@
'use strict';
function checkActive(plugin, path) {
- var checked = plugin.id;
- if (checked === 'processes') {
- checked = 'process';
- }
return path.indexOf(plugin.id) > -1;
}
|
refactor(navigation): remove dead code
Related to CAM-<I>
|
camunda_camunda-bpm-platform
|
train
|
js
|
2a368a9192bbfc76731d4197fb3628ec0b23f7df
|
diff --git a/anyconfig/backend/tests/xml.py b/anyconfig/backend/tests/xml.py
index <HASH>..<HASH> 100644
--- a/anyconfig/backend/tests/xml.py
+++ b/anyconfig/backend/tests/xml.py
@@ -57,7 +57,7 @@ CNF_0_S = """\
class Test_00(unittest.TestCase):
- def test__namespaces_from_file(self):
+ def test_10__namespaces_from_file(self):
ref = {"http://example.com/ns/config": '',
"http://example.com/ns/config/val": "val"}
xmlfile = anyconfig.compat.StringIO(XML_W_NS_S)
|
refactor: rename test methods to keep the order in .backend.tests.xml.Test_<I>
|
ssato_python-anyconfig
|
train
|
py
|
ea6a57e927189b75d647f252f05efd4ac4d87ffa
|
diff --git a/src/structures/MessagePayload.js b/src/structures/MessagePayload.js
index <HASH>..<HASH> 100644
--- a/src/structures/MessagePayload.js
+++ b/src/structures/MessagePayload.js
@@ -209,7 +209,7 @@ class MessagePayload {
/**
* Resolves a single file into an object sendable to the API.
* @param {BufferResolvable|Stream|FileOptions|MessageAttachment} fileLike Something that could be resolved to a file
- * @returns {MessageFile}
+ * @returns {Promise<MessageFile>}
*/
static async resolveFile(fileLike) {
let attachment;
|
docs(MessagePayload): Correct return type of `resolveFile()` (#<I>)
|
discordjs_discord.js
|
train
|
js
|
4e16d2d712ec3fb8cfb94abdb0443e5c1b7d15f5
|
diff --git a/app.js b/app.js
index <HASH>..<HASH> 100644
--- a/app.js
+++ b/app.js
@@ -1,2 +1,2 @@
require('./index')();
-console.log(new Date().toLocaleString())
+console.log(new Date().toLocaleString());
|
refactor: fix eslint
|
avwo_whistle
|
train
|
js
|
5c10ac6579543d79642c65b70210264c1b488e51
|
diff --git a/packages/posts/photos/instagram/photoSource.js b/packages/posts/photos/instagram/photoSource.js
index <HASH>..<HASH> 100644
--- a/packages/posts/photos/instagram/photoSource.js
+++ b/packages/posts/photos/instagram/photoSource.js
@@ -46,7 +46,7 @@ class InstagramSource extends CachedDataSource {
posts = posts.concat(await this.allPostsGetter(
searchParams
.set("all", true)
- .set("beforeId", lastPost)
+ .set("beforeId", lastPost.id)
));
}
|
fix(posts): Instagram `allPostsGetter` passes an id into `beforeId`.
We're only grabbing <I> posts anyways so it's not like we actually have to have this implementation...
|
randytarampi_me
|
train
|
js
|
dae2de5ddd6b31ce3861eac3ee229a08641f5771
|
diff --git a/api/src/opentrons/api/session.py b/api/src/opentrons/api/session.py
index <HASH>..<HASH> 100755
--- a/api/src/opentrons/api/session.py
+++ b/api/src/opentrons/api/session.py
@@ -135,6 +135,7 @@ class Session(object):
self.modules = None
self.metadata = {}
self.api_level = None
+ self.protocol_text = protocol.text
self.startTime = None
self._motion_lock = motion_lock
diff --git a/api/tests/opentrons/api/test_session.py b/api/tests/opentrons/api/test_session.py
index <HASH>..<HASH> 100755
--- a/api/tests/opentrons/api/test_session.py
+++ b/api/tests/opentrons/api/test_session.py
@@ -138,6 +138,7 @@ async def test_load_and_run_v2(
session.run()
assert len(session.command_log) == 4, \
"Clears command log on the next run"
+ assert session.protocol_text == protocol.text
@pytest.mark.api1_only
@@ -183,6 +184,7 @@ async def test_load_and_run(
session.run()
assert len(session.command_log) == 6, \
"Clears command log on the next run"
+ assert session.protocol_text == protocol.text
def test_init(run_session):
|
fix(api): reflect protocol text over rpc (#<I>)
The session needs a protocol text member exposed via rpc to let apps that aren't
the one that uploaded the protocol see what the protocol was. The app also
relies on it (perhaps incorrectly) in a couple ways, for instance the creation
method, and without this exposed it can't decide what it is.
In addition, add a test to catch the regression in the future.
|
Opentrons_opentrons
|
train
|
py,py
|
583b2438d9531ef85f882ddf9f90ba71ea2e06da
|
diff --git a/pipes/iam/__main__.py b/pipes/iam/__main__.py
index <HASH>..<HASH> 100644
--- a/pipes/iam/__main__.py
+++ b/pipes/iam/__main__.py
@@ -20,7 +20,7 @@ def main():
help='Set DEBUG output')
parser.add_argument('-e',
'--env',
- choices=('build', 'dev', 'stage', 'prod'),
+ choices=('build', 'dev', 'stage', 'prod', 'sox', 'pci'),
default='dev',
help='Deploy environment')
parser.add_argument('-a',
|
fix: Add environments for IAM
See also: PSOBAT-<I>
|
foremast_foremast
|
train
|
py
|
3d88b5637f879e2fb0b6316661534d7aa94db3fb
|
diff --git a/dist/protractor-helpers.js b/dist/protractor-helpers.js
index <HASH>..<HASH> 100644
--- a/dist/protractor-helpers.js
+++ b/dist/protractor-helpers.js
@@ -155,7 +155,7 @@ Helpers.prototype.selectOption = function (optionElement) {
Helpers.prototype.scrollToElement = function (element) {
return element.getLocation().then(function (location) {
- return browser.executeScript('window.scrollTo(0, ' + location.y + ');');
+ return browser.executeScript('window.scrollTo(' + location.x + ', ' + location.y + ');');
});
};
diff --git a/src/helpers.js b/src/helpers.js
index <HASH>..<HASH> 100644
--- a/src/helpers.js
+++ b/src/helpers.js
@@ -117,7 +117,7 @@ Helpers.prototype.selectOption = function (optionElement) {
Helpers.prototype.scrollToElement = function (element) {
return element.getLocation().then(function (location) {
- return browser.executeScript('window.scrollTo(0, ' + location.y + ');');
+ return browser.executeScript('window.scrollTo(' + location.x + ', ' + location.y + ');');
});
};
|
feat(Helpers): add ability to scroll to an element and click it with x axis too
|
wix_protractor-helpers
|
train
|
js,js
|
afea15885851c72b28a78cb319b181bd8d534a72
|
diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -37,9 +37,10 @@ function proxy(callback) {
if (!socket.writable) {
return socket.destroy(err);
}
- var stack = util.getErrorStack('clientError: Bad request');
- var code = err && err.code === 'HPE_HEADER_OVERFLOW' ? 431 : 400;
- socket.end('HTTP/1.1 ' + code + ' Bad Request\r\n\r\n' + stack);
+ var errCode = err && err.code;
+ var statusCode = errCode === 'HPE_HEADER_OVERFLOW' ? 431 : 400;
+ var stack = util.getErrorStack('clientError: Bad request' + (errCode ? ' (' + errCode + ')' : ''));
+ socket.end('HTTP/1.1 ' + statusCode + ' Bad Request\r\n\r\n' + stack);
});
initSocketMgr(proxyEvents);
setupHttps(server, proxyEvents);
|
refactor: clientError
|
avwo_whistle
|
train
|
js
|
d71b21ca89f0013d27ef042983ebd2f6fe86f5af
|
diff --git a/lib/topologies/replset.js b/lib/topologies/replset.js
index <HASH>..<HASH> 100644
--- a/lib/topologies/replset.js
+++ b/lib/topologies/replset.js
@@ -1022,7 +1022,6 @@ ReplSet.prototype.destroy = function(options) {
// Clear out all monitoring
for (var i = 0; i < this.intervalIds.length; i++) {
this.intervalIds[i].stop();
- this.intervalIds[i].stop();
}
// Reset list of intervalIds
|
chore(topology): removing double timeout clear
This was accidentally introduced during the following refactor:
cd<I>d<I>f<I>ad<I>c6a<I>ffcfa<I>d1e7d3a2
|
mongodb-js_mongodb-core
|
train
|
js
|
1844babce474d113d635a8e90351af9382cfb0de
|
diff --git a/packages/tooltip/src/Tooltip.js b/packages/tooltip/src/Tooltip.js
index <HASH>..<HASH> 100644
--- a/packages/tooltip/src/Tooltip.js
+++ b/packages/tooltip/src/Tooltip.js
@@ -80,5 +80,10 @@ Tooltip.propTypes = {
/** When provided, it overrides the flyout's open state */
open: PropTypes.bool,
/** Whether flyout should open when the target is hovered over */
- openOnHover: PropTypes.bool
+ openOnHover: PropTypes.bool,
+ /**
+ * If openOnHover is true, this prop will determine the delay
+ * from when mouseEnter begins until the Tooltip visually opens
+ */
+ openOnHoverDelay: PropTypes.number
};
|
feat: Add openOnHoverDelay prop
|
Autodesk_hig
|
train
|
js
|
f4b762b4e322bc7d6a4c448b63c4a7765222b7f4
|
diff --git a/build/extract-css.js b/build/extract-css.js
index <HASH>..<HASH> 100644
--- a/build/extract-css.js
+++ b/build/extract-css.js
@@ -11,7 +11,7 @@ files.forEach((file) => {
sass.render({
file: `./src/css/${file}.scss`,
outputStyle: 'compressed',
- importer: tildeImporter,
+ importer: tildeImporter(),
}, function(err, result) {
if (err) {
console.log(chalk.red('error!', err));
|
fix(css): fix utilities and reset build
this file previously used `node-sass-tilde-importer`, which was
passed in like `importer: tildeImporter`.
during the winter release, that package was replaced with
`node-sass-package-importer` which must be invoked like
this `importer: tildeImporter()`
|
rei_rei-cedar
|
train
|
js
|
45cc4a3e6306ef16126a32ecda016f530cbaefde
|
diff --git a/public/js/editors/editors.js b/public/js/editors/editors.js
index <HASH>..<HASH> 100644
--- a/public/js/editors/editors.js
+++ b/public/js/editors/editors.js
@@ -180,7 +180,7 @@ panels.restore = function () {
}
else {
// load from personal settings
- toopen = jsbin.settings.panels;
+ toopen = jsbin.mobile ? [jsbin.settings.panels[0]] : jsbin.settings.panels;
}
}
|
fix: open first valid panel on mobile
Originally it was tryingt open all panels which always included the output, and since in mobile we only show one panel at a time, output was last and would close all other panels.
|
jsbin_jsbin
|
train
|
js
|
5dde80800a24c610f42637355a9b64ccb50ff153
|
diff --git a/examples/pages/basic/index.js b/examples/pages/basic/index.js
index <HASH>..<HASH> 100644
--- a/examples/pages/basic/index.js
+++ b/examples/pages/basic/index.js
@@ -49,7 +49,7 @@ class Examples extends Component {
const Item = glamorous(Autocomplete.Item, {
rootEl: 'div',
- forwardProps: ['index', 'item', 'key'],
+ forwardProps: ['index', 'value', 'key'],
})(
{
cursor: 'pointer',
diff --git a/examples/pages/semantic-ui/index.js b/examples/pages/semantic-ui/index.js
index <HASH>..<HASH> 100644
--- a/examples/pages/semantic-ui/index.js
+++ b/examples/pages/semantic-ui/index.js
@@ -28,7 +28,7 @@ function Examples() {
const Item = glamorous(Autocomplete.Item, {
rootEl: 'div',
- forwardProps: ['index', 'item'],
+ forwardProps: ['index', 'value'],
})(
{
position: 'relative',
|
docs(examples): update forwarded prop item -> value (#<I>)
|
downshift-js_downshift
|
train
|
js,js
|
88da3da58fcc1d155a39300690d841292839f777
|
diff --git a/lib/gruff/base.rb b/lib/gruff/base.rb
index <HASH>..<HASH> 100644
--- a/lib/gruff/base.rb
+++ b/lib/gruff/base.rb
@@ -206,6 +206,9 @@ module Gruff
@raw_columns.freeze
@raw_rows.freeze
+ @scale = @columns / @raw_columns
+ @scale.freeze
+
@marker_count = nil
@maximum_value = @minimum_value = nil
@increment = nil
@@ -215,8 +218,6 @@ module Gruff
@title = nil
@title_font = nil
- @scale = @columns / @raw_columns
-
@font = nil
@bold_title = true
|
refactor: Freeze @scale as constant
|
topfunky_gruff
|
train
|
rb
|
bc15841c1da63846b9517a6abc01a1522cf99414
|
diff --git a/lib/markdown/highlightLines.js b/lib/markdown/highlightLines.js
index <HASH>..<HASH> 100644
--- a/lib/markdown/highlightLines.js
+++ b/lib/markdown/highlightLines.js
@@ -39,7 +39,7 @@ module.exports = md => {
})
if (inRange) {
return {
- code: `<span class="highlighted-line">${split}</span>`,
+ code: `<span class="highlighted-line">${split || '\n'}</span>`,
highlighted: true
}
}
|
fix: highlight line issue for empty lines
|
vuejs_vuepress
|
train
|
js
|
014e3d1ce134257cbed049b8aa4402bcb5a284c2
|
diff --git a/client/createReducer.js b/client/createReducer.js
index <HASH>..<HASH> 100644
--- a/client/createReducer.js
+++ b/client/createReducer.js
@@ -10,6 +10,9 @@ from '~routes/admin/authenticated/sidebar/community-settings/recipient/page'
// Reapop
import { reducer as notificationsReducer } from 'reapop'
+// Apollo
+import { client } from './store'
+
// Application
import auth from '~client/account/redux/reducers'
import wait from '~client/components/await/redux/reducers'
@@ -36,6 +39,7 @@ export default function createReducer (asyncReducers) {
recurringForm,
communityRecipientForm
}),
+ apollo: client.reducer(),
notifications: notificationsReducer(),
auth,
wait,
diff --git a/client/store.js b/client/store.js
index <HASH>..<HASH> 100644
--- a/client/store.js
+++ b/client/store.js
@@ -53,6 +53,8 @@ export function configureStore (initialState, thunkExtraArgument) {
})
)
+ middlewares.push(client.middleware())
+
let store = createStore(
createReducer(),
initialState,
|
chore(graphql): add reducer mode on apollo client
|
nossas_bonde-client
|
train
|
js,js
|
41016566a6f72dd036907bb0d26d9f781ad3c346
|
diff --git a/src/modules/Parallax.js b/src/modules/Parallax.js
index <HASH>..<HASH> 100644
--- a/src/modules/Parallax.js
+++ b/src/modules/Parallax.js
@@ -84,10 +84,10 @@ class Parallax extends Component {
return true;
}
- componentDidUpdate(nextProps) {
- const { parent, bgImage, bgImageSrcSet, bgImageSizes } = nextProps;
+ componentDidUpdate() {
+ const { parent, bgImage, bgImageSrcSet, bgImageSizes } = this.props;
const { bgImage: stateBgImage } = this.state;
- this.splitChildren = getSplitChildren(nextProps);
+ this.splitChildren = getSplitChildren(this.props);
if (parent && this.parent !== parent) {
this.parent = parent;
this.removeListeners();
|
fix: reference current this.props in cDU
|
RRutsche_react-parallax
|
train
|
js
|
51706c436fb24b4a89548b6afac7d8c909c6a63e
|
diff --git a/tests/integ/test_training_compiler.py b/tests/integ/test_training_compiler.py
index <HASH>..<HASH> 100644
--- a/tests/integ/test_training_compiler.py
+++ b/tests/integ/test_training_compiler.py
@@ -32,6 +32,10 @@ def gpu_instance_type(request):
integ.test_region() not in integ.TRAINING_COMPILER_SUPPORTED_REGIONS,
reason="SageMaker Training Compiler is not supported in this region",
)
+@pytest.mark.skipif(
+ integ.test_region() in integ.TRAINING_NO_P3_REGIONS,
+ reason="no ml.p3 instances in this region",
+)
def test_huggingface_pytorch(
sagemaker_session,
gpu_instance_type,
@@ -78,6 +82,10 @@ def test_huggingface_pytorch(
integ.test_region() not in integ.TRAINING_COMPILER_SUPPORTED_REGIONS,
reason="SageMaker Training Compiler is not supported in this region",
)
+@pytest.mark.skipif(
+ integ.test_region() in integ.TRAINING_NO_P3_REGIONS,
+ reason="no ml.p3 instances in this region",
+)
def test_huggingface_tensorflow(
sagemaker_session,
gpu_instance_type,
|
fix: integs for training compiler in non-PDX regions (#<I>)
|
aws_sagemaker-python-sdk
|
train
|
py
|
da2aa57879ecd82b3089d931d49c845e8f3ae100
|
diff --git a/lib/features/complex-cell/ComplexCell.js b/lib/features/complex-cell/ComplexCell.js
index <HASH>..<HASH> 100644
--- a/lib/features/complex-cell/ComplexCell.js
+++ b/lib/features/complex-cell/ComplexCell.js
@@ -15,8 +15,8 @@ var assign = require('lodash/object/assign'),
* Complex Property:
* - template: {DOMNode}
* HTML template of the complex content
- * - className: {String} (optional, defaults to 'complex-cell')
- * Defines the className which is set on the container of the complex cell
+ * - className: {String | String[]} (optional, defaults to 'complex-cell')
+ * Defines the classNames which are set on the container of the complex cell
* - offset: {Object} (option, defaults to {x: 0, y: 0})
* Defines the offset of the template from the top left corner of the cell
*
@@ -124,7 +124,13 @@ ComplexCell.prototype._createContainer = function(className, position) {
event.stopPropagation();
});
- domClasses(container).add(className);
+ if(typeof className === 'string') {
+ domClasses(container).add(className);
+ } else {
+ for(var i = 0; i < className.length; i++) {
+ domClasses(container).add(className[i]);
+ }
+ }
return container;
};
|
feat(complex-cell): allow setting multiple class names
related to CAM-<I>
|
bpmn-io_table-js
|
train
|
js
|
85a1df9a18d61708a829e0a2cbfda6f2bea0ba8b
|
diff --git a/src/Ufo/Widgets/WidgetsStorageInterface.php b/src/Ufo/Widgets/WidgetsStorageInterface.php
index <HASH>..<HASH> 100644
--- a/src/Ufo/Widgets/WidgetsStorageInterface.php
+++ b/src/Ufo/Widgets/WidgetsStorageInterface.php
@@ -13,5 +13,22 @@ use Ufo\Core\Section;
interface WidgetsStorageInterface
{
+ /**
+ * @param \Ufo\Core\Section $section
+ * @return array
+ *
+ * return array structure:
+ * [
+ * 'place 1 name' => [
+ * Widget $widget1,
+ * Widget $widget2,
+ * ...
+ * ],
+ * 'place 2 name' => [
+ * ...
+ * ],
+ * ...
+ * ]
+ */
public function getWidgets(Section $section): array;
}
|
chore: describe returning value structure in phpdoc
|
enikeishik_ufoframework
|
train
|
php
|
5275078dfa98d7e78487ade524cd9c9c7ab055e6
|
diff --git a/test/unit/gulp.spec.js b/test/unit/gulp.spec.js
index <HASH>..<HASH> 100644
--- a/test/unit/gulp.spec.js
+++ b/test/unit/gulp.spec.js
@@ -9,7 +9,7 @@ var
_ = require('lodash')
;
-describe.only('gulp', function() {
+describe('gulp', function() {
var folder = process.cwd() + '/test-project/';
var program = {
|
chore: Removed *only* for one test suite
|
quasarframework_quasar-cli
|
train
|
js
|
e959c5d71c32c51e501b309c0f415d4623f3e2d5
|
diff --git a/cmd/global-heal.go b/cmd/global-heal.go
index <HASH>..<HASH> 100644
--- a/cmd/global-heal.go
+++ b/cmd/global-heal.go
@@ -68,6 +68,9 @@ func newBgHealSequence() *healSequence {
}
func getLocalBackgroundHealStatus() (madmin.BgHealState, bool) {
+ if globalBackgroundHealState == nil {
+ return madmin.BgHealState{}, false
+ }
bgSeq, ok := globalBackgroundHealState.getHealSequenceByToken(bgHealingUUID)
if !ok {
return madmin.BgHealState{}, false
|
fix: server panic in FS mode (#<I>)
fixes #<I>
|
minio_minio
|
train
|
go
|
a99a266962bb190093930d1ac238d516bbce045d
|
diff --git a/lib/features/context-pad/ContextPad.js b/lib/features/context-pad/ContextPad.js
index <HASH>..<HASH> 100644
--- a/lib/features/context-pad/ContextPad.js
+++ b/lib/features/context-pad/ContextPad.js
@@ -138,12 +138,13 @@ ContextPad.prototype.trigger = function(action, event, autoActivate) {
* Open the context pad for the given element
*
* @param {djs.model.Base} element
+ * @param {Boolean} force if true, force reopening the context pad
*/
-ContextPad.prototype.open = function(element) {
+ContextPad.prototype.open = function(element, force) {
if (this._current && this._current.open) {
- if (this._current.element === element) {
+ if (force !== true && this._current.element === element) {
// no change needed
return;
}
|
feat(context-pad): add ability to force reopening it
Related to bpmn-io/bpmn-js#<I>
|
bpmn-io_diagram-js
|
train
|
js
|
4737e525866a06768f6bfc921631dc12c3acd153
|
diff --git a/ChunkSplittingPlugin.js b/ChunkSplittingPlugin.js
index <HASH>..<HASH> 100644
--- a/ChunkSplittingPlugin.js
+++ b/ChunkSplittingPlugin.js
@@ -118,13 +118,13 @@ function extractOriginsOfChunkWithExtractedModules(chunk, reason = 'async common
// from CommonsChunkPlugin (async methods):
function extractOriginsOfChunksWithExtractedModules(chunks, reason) {
return flatMap(
- chunks,
+ Array.from(chunks),
chunk => extractOriginsOfChunkWithExtractedModules(chunk, reason)
)
}
function breakChunksIntoPieces(chunksToSplit, compilation, {
- getPartName = (sourceChunk, idx) => sourceChunk.name && `${sourceChunk.name}-part-${leadingZeros(idx + 1, 2)}`,
+ getPartName = (sourceChunk, idx, extractableModules) => sourceChunk.name && `${sourceChunk.name}-part-${leadingZeros(idx + 1, 2)}`,
maxModulesPerChunk = 100,
maxModulesPerEntry = 1,
segregator =
@@ -161,7 +161,7 @@ function breakChunksIntoPieces(chunksToSplit, compilation, {
// return new chunks
return freshChunkModuleGroups.map((extractableModules, idx) => {
- let targetName = getPartName(chunk, idx)
+ let targetName = getPartName(chunk, idx, extractableModules)
const targetChunk = compilation.addChunk(targetName)
// Remove modules that are moved to commons chunk from their original chunks
|
fix(plugin): properly iterate chunks inside 'extractOriginsOfChunkWithExtractedModules' and pass additional data to 'getPartName' (#9)
- lodash is expecting an Array, but a Set is passed to it, so the iterator is never used and the "async split" string is not added to the chunk origins as expected.
- pass set of modules to getPartName() to provide additional data for those who need it
|
niieani_chunk-splitting-plugin
|
train
|
js
|
4926614fc1201bee08d6b0d973431472ba32e86b
|
diff --git a/test.js b/test.js
index <HASH>..<HASH> 100644
--- a/test.js
+++ b/test.js
@@ -22,6 +22,12 @@ test('kind-error:', function () {
test.throws(fixture, /Call KindError.*/)
done()
})
+ test('should composed error object be instanceof Error', function (done) {
+ var err = new KindError()
+
+ test.equal(err instanceof Error, true)
+ done()
+ })
test('should have proper name and dont have stack by default', function (done) {
var err = new KindError()
|
test: composed error is instanceof Error
|
tunnckoCore_kind-error
|
train
|
js
|
c4198b5e751383523bcc1f616a237354efd1b593
|
diff --git a/src/Response/Api/BaseResponse.php b/src/Response/Api/BaseResponse.php
index <HASH>..<HASH> 100644
--- a/src/Response/Api/BaseResponse.php
+++ b/src/Response/Api/BaseResponse.php
@@ -10,6 +10,7 @@ namespace ZEROSPAM\Framework\SDK\Response\Api;
use Carbon\Carbon;
use ZEROSPAM\Framework\SDK\Response\Api\Helper\RateLimitedTrait;
+use ZEROSPAM\Framework\SDK\Utils\Contracts\Arrayable;
use ZEROSPAM\Framework\SDK\Utils\Str;
/**
@@ -20,7 +21,7 @@ use ZEROSPAM\Framework\SDK\Utils\Str;
*
* @package ZEROSPAM\Framework\SDK\Response\Api
*/
-abstract class BaseResponse implements IRateLimitedResponse
+abstract class BaseResponse implements IRateLimitedResponse, Arrayable
{
use RateLimitedTrait;
@@ -139,4 +140,14 @@ abstract class BaseResponse implements IRateLimitedResponse
{
return $this->get($name);
}
+
+ /**
+ * Return the object as Array.
+ *
+ * @return array
+ */
+ public function toArray(): array
+ {
+ return $this->data;
+ }
}
|
perf(Response): Makes response arrayable
|
zerospam_sdk-framework
|
train
|
php
|
92c2356d4c640135f7e4dae56abeba18158ce5ae
|
diff --git a/example-expo/AccessoryBar.js b/example-expo/AccessoryBar.js
index <HASH>..<HASH> 100644
--- a/example-expo/AccessoryBar.js
+++ b/example-expo/AccessoryBar.js
@@ -10,8 +10,7 @@ import {
export default class AccessoryBar extends React.Component {
render() {
- const { onSend } = this.props
- const isTyping = this.props.isTyping
+ const { onSend, isTyping } = this.props
return (
<View style={styles.container}>
|
refactor(typing-indicator): DRY in example
|
FaridSafi_react-native-gifted-chat
|
train
|
js
|
123bdd4572959d7d647f7a0b4a70999dc4c40e35
|
diff --git a/lib/workers/branch/parent.js b/lib/workers/branch/parent.js
index <HASH>..<HASH> 100644
--- a/lib/workers/branch/parent.js
+++ b/lib/workers/branch/parent.js
@@ -28,7 +28,14 @@ async function getParentBranch(config) {
}
if (pr.labels && pr.labels.includes(config.rebaseLabel)) {
logger.info('Manual rebase requested via PR labels for #' + pr.number);
- await platform.deleteLabel(pr.number, config.rebaseLabel);
+ // istanbul ignore if
+ if (config.dryRun) {
+ logger.info(
+ `DRY-RUN: Would delete label ${config.rebaseLabel} from #${pr.number}`
+ );
+ } else {
+ await platform.deleteLabel(pr.number, config.rebaseLabel);
+ }
return { parentBranch: undefined };
}
}
|
fix: ignore delete label if dry-run (#<I>)
|
renovatebot_renovate
|
train
|
js
|
46f3b4f950af5171d178c1c535fdc16fb52fe73e
|
diff --git a/lib/espresso-runner.js b/lib/espresso-runner.js
index <HASH>..<HASH> 100644
--- a/lib/espresso-runner.js
+++ b/lib/espresso-runner.js
@@ -143,11 +143,18 @@ class EspressoRunner {
async buildNewModServer () {
let buildConfiguration = {};
if (this.espressoBuildConfig) {
- logger.info(`Using build configuration JSON from: '${this.espressoBuildConfig}'`);
+ let buildConfigurationStr;
+ if (await fs.exists(this.espressoBuildConfig)) {
+ logger.info(`Loading the build configuration from '${this.espressoBuildConfig}'`);
+ buildConfigurationStr = await fs.readFile(this.espressoBuildConfig, 'utf8');
+ } else {
+ logger.info(`Loading the build configuration from 'espressoBuildConfig' capability`);
+ buildConfigurationStr = this.espressoBuildConfig;
+ }
try {
- buildConfiguration = JSON.parse(await fs.readFile(this.espressoBuildConfig, 'utf8'));
+ buildConfiguration = JSON.parse(buildConfigurationStr);
} catch (e) {
- logger.error('Failed to parse build configuration JSON', e);
+ logger.error('Cannot parse the build configuration JSON', e);
throw e;
}
}
|
feat: Make it possible to provide a build config directly from capabilities (#<I>)
|
appium_appium-espresso-driver
|
train
|
js
|
be9ae36376e98aa6ee9eebb311217e15868198a7
|
diff --git a/jest/base.config.js b/jest/base.config.js
index <HASH>..<HASH> 100644
--- a/jest/base.config.js
+++ b/jest/base.config.js
@@ -1,6 +1,9 @@
const path = require('path')
module.exports = {
+ collectCoverage: true,
+ coverageDirectory: '<rootDir>/coverage',
+ coverageReporters: ['lcov'],
modulePathIgnorePatterns: ['<rootDir>/scripts/'],
rootDir: path.resolve(__dirname, '..'),
setupFiles: ['raf/polyfill', '<rootDir>/jest/setup.js']
|
feat: test coverage output; just because
|
pluralsight_design-system
|
train
|
js
|
76bdde5854de8b3a00f6cf0f6d6b26fd2ae94500
|
diff --git a/src/suggestions.js b/src/suggestions.js
index <HASH>..<HASH> 100644
--- a/src/suggestions.js
+++ b/src/suggestions.js
@@ -19,7 +19,7 @@ function makeSuggestion(queryName, element, content, {variant, name}) {
let warning = ''
const queryOptions = {}
const queryArgs = [
- queryName === 'Role' || queryName === 'TestId'
+ ['Role', 'TestId'].includes(queryName)
? content
: getRegExpMatcher(content),
]
|
chore: Update suggestions.js (#<I>)
|
testing-library_dom-testing-library
|
train
|
js
|
dee437229e4a036bc8b519bc8288c2456b64a0fa
|
diff --git a/lib/commands/touch.js b/lib/commands/touch.js
index <HASH>..<HASH> 100644
--- a/lib/commands/touch.js
+++ b/lib/commands/touch.js
@@ -27,7 +27,7 @@ commands.performActions = async function (actions) {
}
} : {}));
this.log.debug(`Preprocessed actions: ${JSON.stringify(preprocessedActions, null, ' ')}`);
- return await this.uiautomator2.jwproxy.command('/actions', 'POST', {actions});
+ return await this.uiautomator2.jwproxy.command('/actions', 'POST', {actions: preprocessedActions});
};
Object.assign(extensions, commands);
|
fix: wrong parameter in performActions (#<I>)
ActionChains in selenium have a PointerInput whose kind(pointerType) is
"mouse".
We should change this to "touch" for android devices to work properly.
(I confired "mouse" doesn't work and "touch" works.)
There is code for converting "mouse" to "touch" ("preprocessedActions")
But wrong old variable was used.
|
appium_appium-uiautomator2-driver
|
train
|
js
|
aaf412259a358238e25af7c4053983719945f064
|
diff --git a/packages/lingui-react/src/I18nProvider.js b/packages/lingui-react/src/I18nProvider.js
index <HASH>..<HASH> 100644
--- a/packages/lingui-react/src/I18nProvider.js
+++ b/packages/lingui-react/src/I18nProvider.js
@@ -28,9 +28,13 @@ class I18nManager {
development?: Object,
i18n?: I18n
}) {
- this.i18n = i18n || new I18n(language, messages, languageData)
+ this.i18n = i18n || new I18n()
if (development) this.i18n.development(development)
+
+ if (messages) this.i18n.load(messages)
+ if (languageData) this.i18n.loadLanguageData(languageData)
+ this.i18n.activate(language)
}
subscribe = (callback: Function) => {
diff --git a/packages/lingui-react/src/dev/index.js b/packages/lingui-react/src/dev/index.js
index <HASH>..<HASH> 100644
--- a/packages/lingui-react/src/dev/index.js
+++ b/packages/lingui-react/src/dev/index.js
@@ -1,4 +1,3 @@
// Most React projects will import everything from lingui-react module.
// Reexport dev from lingui-i18n to make it easier.
export { default } from 'lingui-i18n/dev'
-
|
fix: Load messages after dev data are setup
|
lingui_js-lingui
|
train
|
js,js
|
80dbb042cf3936e48f6edb160ac2f62b86483281
|
diff --git a/tests/Parts/Channel/ChannelTest.php b/tests/Parts/Channel/ChannelTest.php
index <HASH>..<HASH> 100644
--- a/tests/Parts/Channel/ChannelTest.php
+++ b/tests/Parts/Channel/ChannelTest.php
@@ -266,7 +266,7 @@ final class ChannelTest extends DiscordTestCase
/**
* @covers \Discord\Parts\Channel\Channel::allowVoice
*/
- public function testVoiceChannelDoesNotAllowText()
+ public function testVoiceChannelAllowVoice()
{
/**
* @var Channel
@@ -275,7 +275,6 @@ final class ChannelTest extends DiscordTestCase
return $channel->type == Channel::TYPE_VOICE;
})->first();
- $this->assertFalse($vc->allowText());
$this->assertTrue($vc->allowVoice());
}
}
|
test: remove allowText assertion on voice channel
|
teamreflex_DiscordPHP
|
train
|
php
|
0226cc8520cef910819e78949338de1488848276
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100755
--- a/index.js
+++ b/index.js
@@ -286,6 +286,8 @@ function attemptInstall (packages, attempts, cb) {
log('-- installing %j', packages)
var done = once(function (err) {
+ clearTimeout(timeout)
+
if (!err) return cb()
if (++attempts <= 10) {
@@ -301,6 +303,14 @@ function attemptInstall (packages, attempts, cb) {
var opts = { noSave: true, command: npmCmd }
if (argv.verbose) opts.stdio = 'inherit'
+ // npm on Travis have a tendency to hang every once in a while
+ // (https://twitter.com/wa7son/status/1006859826549477378). We'll use a
+ // timeout to abort and retry the install in case it hasn't finished within 2
+ // minutes.
+ var timeout = setTimeout(function () {
+ done(new Error('npm install took too long'))
+ }, 2 * 60 * 1000)
+
install(packages, opts, done).on('error', done)
}
|
fix: gracefully handle npm timeouts (#6)
|
watson_test-all-versions
|
train
|
js
|
a372397b90332001b92812b1dcf73d95cb72df12
|
diff --git a/test.js b/test.js
index <HASH>..<HASH> 100644
--- a/test.js
+++ b/test.js
@@ -35,6 +35,22 @@ test('split two lines on two writes', function (t) {
input.end()
})
+test('split four lines on three writes', function (t) {
+ t.plan(2)
+
+ var input = split()
+
+ input.pipe(strcb(function (err, list) {
+ t.error(err)
+ t.deepEqual(list, ['hello', 'world', 'bye', 'world'])
+ }))
+
+ input.write('hello\nwor')
+ input.write('ld\nbye\nwo')
+ input.write('rld')
+ input.end()
+})
+
test('accumulate multiple writes', function (t) {
t.plan(2)
|
test: add a test case for char-grouped streams
Given the other test cases, I could not determine if split supports such a use case in that chunks are split in-line.
|
mcollina_split2
|
train
|
js
|
3631ee0841cda651fc8fb06192faa3741e0e2a22
|
diff --git a/src/Core/Request/AbstractApiRequest.php b/src/Core/Request/AbstractApiRequest.php
index <HASH>..<HASH> 100644
--- a/src/Core/Request/AbstractApiRequest.php
+++ b/src/Core/Request/AbstractApiRequest.php
@@ -250,12 +250,12 @@ abstract class AbstractApiRequest implements ClientRequestInterface, ContextAwar
/**
* @param Client $client
- * @param array $headers
+ * @param array|null $headers
* @return ApiResponseInterface
*/
public function executeWithClient(Client $client, array $headers = null)
{
- if (!is_null($this->externalUserId)) {
+ if (!is_null($this->externalUserId) && !isset($headers[self::EXTERNAL_USER_HEADER])) {
$headers[self::EXTERNAL_USER_HEADER] = $this->externalUserId;
}
return $client->execute($this, $headers);
|
fix(ClientLogging): change priority of headers for external user id
|
commercetools_commercetools-php-sdk
|
train
|
php
|
1d256ea66fc1318ac12c19d5e526abf6fa25876b
|
diff --git a/lib/index.js b/lib/index.js
index <HASH>..<HASH> 100644
--- a/lib/index.js
+++ b/lib/index.js
@@ -141,7 +141,7 @@ function tunnelProxy(server, proxy) {
delete headers[pluginMgr.HOST_PORT_HEADER];
}
- var realUrl = _rules.rule && _rules.rule.url;
+ var realUrl = _rules.rule && _rules.rule.url.replace('https:', 'tunnel:');
if (/^tunnel:\/\//.test(realUrl) && realUrl != tunnelUrl) {
tunnelUrl = realUrl;
data.realUrl = realUrl.replace('tunnel://', '');
|
refactor: Change https: to tunnel:
|
avwo_whistle
|
train
|
js
|
d913b156f8d4aac0e2837b93443d0ee2004285a8
|
diff --git a/www/plugins.FileOpener2.js b/www/plugins.FileOpener2.js
index <HASH>..<HASH> 100644
--- a/www/plugins.FileOpener2.js
+++ b/www/plugins.FileOpener2.js
@@ -27,9 +27,9 @@ var exec = require('cordova/exec');
function FileOpener2() {}
FileOpener2.prototype.open = function (fileName, contentType, options) {
- contentType = contentType || '';
+ contentType = contentType || '';
options = options || {};
- exec(callbackContext.success || null, callbackContext.error || null, 'FileOpener2', 'open', [fileName, contentType, false, options.position]);
+ exec(options.success || null, options.error || null, 'FileOpener2', 'open', [fileName, contentType, false, options.position]);
};
FileOpener2.prototype.showOpenWithDialog = function (fileName, contentType, callbackContext) {
|
fix: fixed reference bug in open method
|
pwlin_cordova-plugin-file-opener2
|
train
|
js
|
37570de30e71d34e6db94c39d2726b7383765ecb
|
diff --git a/intranet/apps/eighth/notifications.py b/intranet/apps/eighth/notifications.py
index <HASH>..<HASH> 100644
--- a/intranet/apps/eighth/notifications.py
+++ b/intranet/apps/eighth/notifications.py
@@ -59,7 +59,7 @@ def signup_status_email(user, next_blocks):
def absence_email(signup):
user = signup.user
- em = user.tj_email if user.tj_email else user.emails.first() if user.emails and user.emails.count() >= 1 else None
+ em = user.notification_email
if em:
emails = [em]
else:
|
refactor(eighth): use user.notification_email for absence emails
|
tjcsl_ion
|
train
|
py
|
1170b28ab9c4c55f2d84e600a6a00dcdd1de6d6c
|
diff --git a/src/components/Table/head/__test__/header.spec.js b/src/components/Table/head/__test__/header.spec.js
index <HASH>..<HASH> 100644
--- a/src/components/Table/head/__test__/header.spec.js
+++ b/src/components/Table/head/__test__/header.spec.js
@@ -10,7 +10,7 @@ document.addEventListener = jest.fn((event, cb) => {
const preventDefault = jest.fn();
describe('<Header />', () => {
- it('should set the right class names in th element when sortable, isSelected, and is resizable are passed', () => {
+ it('should set the right class names in th element when sortable and isSelected are passed and is resizable', () => {
const component = mount(
<Header
sortable
|
fix: fix some typo (#<I>)
|
90milesbridge_react-rainbow
|
train
|
js
|
ed4cc4d8561c63b86950313ee4d553f6958223ef
|
diff --git a/go/vt/vtgate/planbuilder/route.go b/go/vt/vtgate/planbuilder/route.go
index <HASH>..<HASH> 100644
--- a/go/vt/vtgate/planbuilder/route.go
+++ b/go/vt/vtgate/planbuilder/route.go
@@ -37,11 +37,6 @@ var _ logicalPlan = (*route)(nil)
type route struct {
gen4Plan
- // Redirect may point to another route if this route
- // was merged with it. The Resolve function chases
- // this pointer till the last un-redirected route.
- Redirect *route
-
// Select is the AST for the query fragment that will be
// executed by this route.
Select sqlparser.SelectStatement
|
refactor: remove unused field
|
vitessio_vitess
|
train
|
go
|
53482c2cf26dac4b5c1c4fa79e506f0224634357
|
diff --git a/mapillary_tools/uploader.py b/mapillary_tools/uploader.py
index <HASH>..<HASH> 100644
--- a/mapillary_tools/uploader.py
+++ b/mapillary_tools/uploader.py
@@ -512,7 +512,7 @@ def upload_file(filepath, root, url, permission, signature, key=None):
else:
s3_key = key + s3_filename
- parameters = {"key": s3_key, "AWSAccessKeyId": "AKIAI2X3BJAT2W75HILA", "acl": "private",
+ parameters = {"key": s3_key, "AWSAccessKeyId": "AKIAILU27ZWSOZX2FZ7Q", "acl": "private",
"policy": permission, "signature": signature, "Content-Type": "image/jpeg"}
with open(filepath, "rb") as f:
|
fix: update key for s3 upload
|
mapillary_mapillary_tools
|
train
|
py
|
a6dbea1e25351bc60298bf40b2edaaad1276259e
|
diff --git a/glances/static_list.py b/glances/static_list.py
index <HASH>..<HASH> 100644
--- a/glances/static_list.py
+++ b/glances/static_list.py
@@ -54,7 +54,7 @@ class GlancesStaticServer(object):
for s in ['name', 'port', 'alias']:
new_server[s] = config.get_value(self._section, '%s%s' % (postfix, s))
if new_server['name'] is not None:
- # Manage optionnal information
+ # Manage optional information
if new_server['port'] is None:
new_server['port'] = '61209'
new_server['username'] = 'glances'
|
docs: fix simple typo, optionnal -> optional
There is a small typo in glances/static_list.py.
Should read `optional` rather than `optionnal`.
|
nicolargo_glances
|
train
|
py
|
59bdf8f495ea26a3a31f7b48ad10a767b0ca8ef7
|
diff --git a/lib/components/viewers/route-viewer.js b/lib/components/viewers/route-viewer.js
index <HASH>..<HASH> 100644
--- a/lib/components/viewers/route-viewer.js
+++ b/lib/components/viewers/route-viewer.js
@@ -15,9 +15,9 @@ import {
} from '../../actions/ui'
import { findRoutes, findRoute } from '../../actions/api'
import {
- getSortedFilteredRoutes,
+ getAgenciesFromRoutes,
getModesForActiveAgencyFilter,
- getAgenciesFromRoutes
+ getSortedFilteredRoutes
} from '../../util/state'
import { ComponentContext } from '../../util/contexts'
import { getModeFromRoute } from '../../util/viewer'
@@ -255,7 +255,7 @@ const RouteDetails = styled.div`
`
class RouteRow extends PureComponent {
- static contextType = ComponentContext;
+ static contextType = ComponentContext
_onClick = () => {
const { findRoute, isActive, route, setViewedRoute } = this.props
|
refactor(route-viewer): address pr comments
|
opentripplanner_otp-react-redux
|
train
|
js
|
25ffe7f74a9379c165e905cf1f33db38d64949ea
|
diff --git a/lib/rack/app/singleton_methods/route_handling.rb b/lib/rack/app/singleton_methods/route_handling.rb
index <HASH>..<HASH> 100644
--- a/lib/rack/app/singleton_methods/route_handling.rb
+++ b/lib/rack/app/singleton_methods/route_handling.rb
@@ -57,8 +57,8 @@ module Rack::App::SingletonMethods::RouteHandling
@namespaces ||= []
@namespaces.push(request_path_namespace)
yield
+ ensure
@namespaces.pop
- nil
end
end
|
refactor: move namespace pop part to ensure block
|
rack-app_rack-app
|
train
|
rb
|
aec0f4517cbfa38c6b4502a884a6db0f1a71fb0d
|
diff --git a/components/input/__tests__/textarea.test.js b/components/input/__tests__/textarea.test.js
index <HASH>..<HASH> 100644
--- a/components/input/__tests__/textarea.test.js
+++ b/components/input/__tests__/textarea.test.js
@@ -115,6 +115,7 @@ describe('TextArea', () => {
},
},
]);
+ await Promise.resolve();
expect(onResize).toHaveBeenCalledWith(
expect.objectContaining({
diff --git a/components/page-header/__tests__/index.test.js b/components/page-header/__tests__/index.test.js
index <HASH>..<HASH> 100644
--- a/components/page-header/__tests__/index.test.js
+++ b/components/page-header/__tests__/index.test.js
@@ -112,9 +112,10 @@ describe('PageHeader', () => {
expect(render(wrapper)).toMatchSnapshot();
});
- it('change container width', () => {
+ it('change container width', async () => {
const wrapper = mount(<PageHeader title="Page Title" extra="extra" />);
wrapper.triggerResize();
+ await Promise.resolve();
wrapper.update();
expect(wrapper.find('.ant-page-header').hasClass('ant-page-header-compact')).toBe(true);
});
|
test: Fix resize related test case
|
ant-design_ant-design
|
train
|
js,js
|
46a6a99b73f5d8e77b9711b9763dc711d20e40f3
|
diff --git a/src/clappr-dash-shaka-playback.js b/src/clappr-dash-shaka-playback.js
index <HASH>..<HASH> 100644
--- a/src/clappr-dash-shaka-playback.js
+++ b/src/clappr-dash-shaka-playback.js
@@ -121,10 +121,8 @@ class DashShakaPlayback extends HTML5Video {
}
pause() {
- super.pause()
-
- if (this.dvrEnabled)
- this._updateDvr(true)
+ this.el.pause()
+ this.dvrEnabled && this._updateDvr(true)
}
play () {
|
refactor: overwrite pause method
|
clappr_dash-shaka-playback
|
train
|
js
|
58e05f72a1f11dc42e62871cbe4e9ec14372a4e0
|
diff --git a/src/Env/index.js b/src/Env/index.js
index <HASH>..<HASH> 100644
--- a/src/Env/index.js
+++ b/src/Env/index.js
@@ -75,7 +75,7 @@ class Env {
_.each(matches, (match) => {
const key = match.replace(/\$|{|}/g, '')
const variable = envConfig[key] || process.env[key] || ''
- env = env.replace(match, this._interpolate(variable))
+ env = env.replace(match, this._interpolate(variable, envConfig))
})
return env
}
|
fix(env): ensure envConfig is used to interpolate env file (#<I>)
|
adonisjs_adonis-framework
|
train
|
js
|
7170293536f1e303eed2e95bce6a44483cae074e
|
diff --git a/lib/sonos.js b/lib/sonos.js
index <HASH>..<HASH> 100644
--- a/lib/sonos.js
+++ b/lib/sonos.js
@@ -118,7 +118,7 @@ Sonos.prototype.searchMusicLibrary = async function (searchType, searchTerm, req
let searches = `${searchTypes[searchType]}${separator}`
if (searchTerm && searchTerm !== '') {
- searches = searches.concat(encodeURIComponent(searchTerm))
+ searches = searches.concat(searchType === 'share' ? searchTerm : encodeURIComponent(searchTerm))
}
var opts = {
|
fix: Stop encoding search term for shares.
Fixed #<I>
|
bencevans_node-sonos
|
train
|
js
|
a89e36a0e73df141a486b8a151bb2cfb228a9f5d
|
diff --git a/lib/classes/plugin-manager.js b/lib/classes/plugin-manager.js
index <HASH>..<HASH> 100644
--- a/lib/classes/plugin-manager.js
+++ b/lib/classes/plugin-manager.js
@@ -487,10 +487,10 @@ class PluginManager {
// Invalid command, can happen only when Framework is used programmatically,
// as otherwise command is validated in main script
- throw new new ServerlessError(
+ throw new ServerlessError(
`Unrecognized command "${commandsArray.join(' ')}"`,
'UNRECOGNIZED COMMAND'
- )();
+ );
},
{ commands: this.commands }
);
|
fix: Fix internal unrecognized command error processing
|
serverless_serverless
|
train
|
js
|
33682fcc51433a7660e107b7455d4885286c3b01
|
diff --git a/boot/logger.js b/boot/logger.js
index <HASH>..<HASH> 100644
--- a/boot/logger.js
+++ b/boot/logger.js
@@ -53,7 +53,7 @@ function errorLogging () {
module.exports = function (options) {
var logger
- var config = { name: 'request', streams: [], level: 'error' }
+ var config = { name: 'request', streams: [], level: 'info' }
if (!env.match(/test/i)) {
var logsPath = path.join(cwd, 'logs')
|
refactor(logger): default level is now at info level, matching bunyan's default
|
anvilresearch_connect
|
train
|
js
|
2377e4b8a2dcf3f67408b1517ad3dc97e2bac42a
|
diff --git a/lib/sinon-doublist-fs/index.js b/lib/sinon-doublist-fs/index.js
index <HASH>..<HASH> 100644
--- a/lib/sinon-doublist-fs/index.js
+++ b/lib/sinon-doublist-fs/index.js
@@ -45,6 +45,8 @@ function sinonDoublistFs(test) {
nodeConsole = requireNative('codeactual-node-console').create();
log = nodeConsole.set('time', false).set('traceDepth', true).create(null, console.log);
nodeConsole.traceMethods('FileStub', FileStub.prototype, log, null, /^(get|set)$/);
+ nodeConsole.traceMethods('customFsStub', customFsStub, log);
+ nodeConsole.traceMethods('mixin', mixin, log);
} else {
log = function() {};
}
|
fix(tracing): Wrap customFsStub, mixin methods
|
codeactual_sinon-doublist-fs
|
train
|
js
|
005bf8e65affe263492753742f02c58f36670205
|
diff --git a/cookies.py b/cookies.py
index <HASH>..<HASH> 100644
--- a/cookies.py
+++ b/cookies.py
@@ -721,20 +721,24 @@ class Cookie(object):
The main difference between this and Cookie(name, value, **kwargs) is
that the values in the argument to this method are parsed.
+
+ If ignore_bad_attributes=True (default), values which did not parse
+ are set to '' in order to avoid passing bad data.
"""
def parse(key):
value = cookie_dict.get(key)
parser = cls.attribute_parsers.get(key)
if parser:
try:
- value = parser(value)
+ parsed_value = parser(value)
except Exception as e:
reason = "did not parse with %s: %s" % (repr(parser), repr(e))
if not ignore_bad_attributes:
raise InvalidCookieAttributeError(
key, value, reason)
_report_invalid_attribute(key, value, reason)
- return value
+ parsed_value = ''
+ return parsed_value
name, value = parse('name'), parse('value')
cookie = Cookie(name, value)
|
fix: don't pass unparsed value strings as-is!
|
sashahart_cookies
|
train
|
py
|
c28c49c26eda22120a1672026de9557bfc3dc466
|
diff --git a/src/dialogs-wrapper.js b/src/dialogs-wrapper.js
index <HASH>..<HASH> 100644
--- a/src/dialogs-wrapper.js
+++ b/src/dialogs-wrapper.js
@@ -98,7 +98,13 @@ export default function modalWrapperFactory (wrapperOptions) {
})))
}
- return h('transition-group', wrapperOptions.transition, renderedDialogs)
+ return h('transition-group', {
+ class: wrapperOptions.wrapper.class,
+ props: {
+ tag: wrapperOptions.wrapper.tag,
+ ...wrapperOptions.wrapper.transition
+ }
+ }, renderedDialogs)
}
})
}
|
fix: renderOptions being watched by vue
|
hjkcai_vue-modal-dialogs
|
train
|
js
|
c4a236e2607d277bae2cbd14aa0a0faf89b3de9b
|
diff --git a/lib/util/index.js b/lib/util/index.js
index <HASH>..<HASH> 100644
--- a/lib/util/index.js
+++ b/lib/util/index.js
@@ -951,15 +951,19 @@ function decodePath(path) {
function getRuleFiles(rule) {
var files = rule.files || [getPath(getUrl(rule))];
var root = rule.root;
- return files.map(function(file) {
- var filename = '';
+ var result = [];
+ files.map(function(file) {
file = decodePath(file);
+ file = fileMgr.convertSlash(root ? join(root, file) : file);
if (END_WIDTH_SEP_RE.test(file)) {
- filename = 'index.html';
+ result.push(file.slice(0, -1));
+ file = root ? join(root, file, 'index.html') : join(file, 'index.html');
+ result.push(fileMgr.convertSlash(file));
+ } else {
+ result.push(file);
}
- file = root ? join(root, file, filename) : join(file, filename);
- return fileMgr.convertSlash(file);
});
+ return result;
}
exports.getRuleFiles = getRuleFiles;
|
refactor: getPath
|
avwo_whistle
|
train
|
js
|
f5381e4f5a2a33a4d8740ac8f4536826d2962ba5
|
diff --git a/src/count-down/test/index.spec.js b/src/count-down/test/index.spec.js
index <HASH>..<HASH> 100644
--- a/src/count-down/test/index.spec.js
+++ b/src/count-down/test/index.spec.js
@@ -1,4 +1,4 @@
-import { nextTick } from 'vue';
+import { KeepAlive, nextTick } from 'vue';
import CountDown from '..';
import { mount, later } from '../../../test';
@@ -178,11 +178,13 @@ test('should format S milliseconds correctly', () => {
test('should pause counting when deactivated', async () => {
const wrapper = mount({
- template: `
- <keep-alive>
- <van-count-down v-if="render" ref="countDown" time="100" />
- </keep-alive>
- `,
+ render() {
+ return (
+ <KeepAlive>
+ {this.render ? <CountDown ref="countDown" time="10000" /> : null}
+ </KeepAlive>
+ );
+ },
data() {
return {
render: true,
|
test(CountDown): fix test warning (#<I>)
|
youzan_vant
|
train
|
js
|
5e9eaf3e0f03b02e2c493fa44ada5601df8528b4
|
diff --git a/intranet/apps/eighth/views/api.py b/intranet/apps/eighth/views/api.py
index <HASH>..<HASH> 100644
--- a/intranet/apps/eighth/views/api.py
+++ b/intranet/apps/eighth/views/api.py
@@ -1,6 +1,7 @@
import logging
from datetime import datetime
+from django.core.exceptions import PermissionDenied
from django.http import Http404
from django.contrib.auth import get_user_model
@@ -126,7 +127,9 @@ class EighthUserSignupListAdd(generics.ListCreateAPIView):
return Response(serialized.data)
def create(self, request, user_id=None):
- if user_id:
+ if user_id and not request.user.is_eighth_admin:
+ raise PermissionDenied
+ elif user_id:
user = get_user_model().objects.get(id=user_id)
else:
user = request.user
|
fix(eighth): deny unauthorized signup API request
|
tjcsl_ion
|
train
|
py
|
23d20c446f8a574e828936130c7590d10ae3665c
|
diff --git a/test/helpers.js b/test/helpers.js
index <HASH>..<HASH> 100644
--- a/test/helpers.js
+++ b/test/helpers.js
@@ -3,7 +3,7 @@ import ParseError from "../src/ParseError";
import parseTree from "../src/parseTree";
import Settings from "../src/Settings";
-import diff from 'jest-diff';
+import {diff} from 'jest-diff';
import {RECEIVED_COLOR, printReceived, printExpected} from 'jest-matcher-utils';
import {formatStackTrace, separateMessageFromStack} from 'jest-message-util';
|
chore(tests): fix use of jest-diff (#<I>)
Jest <I> changed the signature for jest-diff.
This bug only arises from failing tests.
|
KaTeX_KaTeX
|
train
|
js
|
09a23a1082d787c678a91e76be491d68deab6184
|
diff --git a/src/validator.js b/src/validator.js
index <HASH>..<HASH> 100644
--- a/src/validator.js
+++ b/src/validator.js
@@ -54,7 +54,8 @@ function checkAnchor(dom, sourcefile, destinationPath, files) {
function checkStatics(dom, sourcefile, destinationPath, files) {
const validatableImage = image =>
!image.attribs.src.startsWith('http://') &&
- !image.attribs.src.startsWith('https://');
+ !image.attribs.src.startsWith('https://') &&
+ !image.attribs.src.startsWith('//');
const images = select(dom, 'img[src]');
images
|
fix: ignore images with protocol relative src
|
sinnerschrader_schlump
|
train
|
js
|
6955dd3482c95f454d52f95c4787305385240d2d
|
diff --git a/test/pipeline-test-2.js b/test/pipeline-test-2.js
index <HASH>..<HASH> 100644
--- a/test/pipeline-test-2.js
+++ b/test/pipeline-test-2.js
@@ -64,7 +64,6 @@ test('make the search index, removing the pipeline stage that bumps text to lowe
new docProc.RemoveStopWords(si.options),
new docProc.CalculateTermFrequency(si.options),
new docProc.CreateCompositeVector(si.options),
- new docProc.CreateSortVectors(si.options),
new docProc.FieldedSearch(si.options)
)).on('data', function (data) {
t.looseEqual(
|
test(tests): fix pipeline test
The new docproc doesnt create sort vectors, so remover sort vector stage from pipeline test
|
fergiemcdowall_search-index-adder
|
train
|
js
|
ca613f22860089e1f1e92f31d8dd5ecbf8c341a1
|
diff --git a/test/OIPIndex.test.js b/test/OIPIndex.test.js
index <HASH>..<HASH> 100644
--- a/test/OIPIndex.test.js
+++ b/test/OIPIndex.test.js
@@ -61,5 +61,15 @@ describe('OIPIndex API', () => {
expect(mp instanceof MPSingle).toBeTruthy()
}
})
+ it('GET Multiparts via Reference w/ Limit', async () => {
+ let ref = '8c204c5f39'
+ let limit = 3
+ let response = await index.getMultipartsByRef(ref, limit)
+ expect(response.success).toBeTruthy()
+ expect(response.multiparts.length).toEqual(response.limit)
+ for (let mp of response.multiparts) {
+ expect(mp instanceof MPSingle).toBeTruthy()
+ }
+ })
})
})
|
test: get mps via ref with limit
|
oipwg_oip-index
|
train
|
js
|
3f96698bbff5b33ee96ef39732fbdc02030e3b53
|
diff --git a/src/Normalizer/Normalizer.php b/src/Normalizer/Normalizer.php
index <HASH>..<HASH> 100644
--- a/src/Normalizer/Normalizer.php
+++ b/src/Normalizer/Normalizer.php
@@ -131,11 +131,11 @@ final class Normalizer implements NormalizerInterface
): array {
$data = [];
foreach ($normalizationFieldMappings as $normalizationFieldMapping) {
- if (!$this->isCompliant($context, $normalizationFieldMapping, $object)) {
+ if (true !== $this->isCompliant($context, $normalizationFieldMapping, $object)) {
continue;
}
- if (!$this->isWithinGroup($context, $normalizationFieldMapping)) {
+ if (true !== $this->isWithinGroup($context, $normalizationFieldMapping)) {
continue;
}
@@ -169,11 +169,11 @@ final class Normalizer implements NormalizerInterface
): array {
$links = [];
foreach ($normalizationLinkMappings as $normalizationLinkMapping) {
- if (!$this->isCompliant($context, $normalizationLinkMapping, $object)) {
+ if (true !== $this->isCompliant($context, $normalizationLinkMapping, $object)) {
continue;
}
- if (!$this->isWithinGroup($context, $normalizationLinkMapping)) {
+ if (true !== $this->isWithinGroup($context, $normalizationLinkMapping)) {
continue;
}
|
chore: make some bool comparisons more explicit
|
chubbyphp_chubbyphp-serialization
|
train
|
php
|
ead4a0a170b735e167a9b1e1eb94a3198f4d8b2f
|
diff --git a/bolt/onboarding.go b/bolt/onboarding.go
index <HASH>..<HASH> 100644
--- a/bolt/onboarding.go
+++ b/bolt/onboarding.go
@@ -117,11 +117,15 @@ func (c *Client) Generate(ctx context.Context, req *platform.OnboardingRequest)
if err = c.CreateBucket(ctx, bucket); err != nil {
return nil, err
}
+
+ perms := platform.OperPermissions()
+ perms = append(perms, platform.OrgAdminPermissions(o.ID)...)
+
auth := &platform.Authorization{
UserID: u.ID,
Description: fmt.Sprintf("%s's Token", u.Name),
OrgID: o.ID,
- Permissions: platform.OperPermissions(),
+ Permissions: perms,
}
if err = c.CreateAuthorization(ctx, auth); err != nil {
return nil, err
|
fix(bolt): grand first user org admin privileges during onboarding
|
influxdata_influxdb
|
train
|
go
|
ab31e7763bd20dd5cbb66e6d2a8f748d771d1f94
|
diff --git a/task/backend/analytical_storage_test.go b/task/backend/analytical_storage_test.go
index <HASH>..<HASH> 100644
--- a/task/backend/analytical_storage_test.go
+++ b/task/backend/analytical_storage_test.go
@@ -66,24 +66,22 @@ func TestAnalyticalStore(t *testing.T) {
ts.BucketService = storage.NewBucketService(ts.BucketService, ab.storageEngine)
- go func() {
- <-ctx.Done()
- ab.Close(t)
- }()
-
authCtx := icontext.SetAuthorizer(ctx, &influxdb.Authorization{
Permissions: influxdb.OperPermissions(),
})
return &servicetest.System{
- TaskControlService: svcStack,
- TaskService: svcStack,
- OrganizationService: ts.OrganizationService,
- UserService: ts.UserService,
- UserResourceMappingService: ts.UserResourceMappingService,
- AuthorizationService: authSvc,
- Ctx: authCtx,
- }, cancelFunc
+ TaskControlService: svcStack,
+ TaskService: svcStack,
+ OrganizationService: ts.OrganizationService,
+ UserService: ts.UserService,
+ UserResourceMappingService: ts.UserResourceMappingService,
+ AuthorizationService: authSvc,
+ Ctx: authCtx,
+ }, func() {
+ cancelFunc()
+ ab.Close(t)
+ }
},
)
}
|
chore: Closing in goroutine causes race with logging framework
|
influxdata_influxdb
|
train
|
go
|
8dc28df697a568b2afc792cab7e1f821c0e213fe
|
diff --git a/test/test_git_deploy.go b/test/test_git_deploy.go
index <HASH>..<HASH> 100644
--- a/test/test_git_deploy.go
+++ b/test/test_git_deploy.go
@@ -119,10 +119,9 @@ func (s *GitDeploySuite) runBuildpackTest(t *c.C, name string, resources []strin
t.Assert(push, Succeeds)
t.Assert(push, OutputContains, "Creating release")
t.Assert(push, OutputContains, "Application deployed")
+ t.Assert(push, OutputContains, "Added default web=1 formation")
t.Assert(push, OutputContains, "* [new branch] master -> master")
- t.Assert(r.flynn("scale", "web=1"), Succeeds)
-
route := name + ".dev"
newRoute := r.flynn("route", "add", "http", route)
t.Assert(newRoute, Succeeds)
|
test: Remove unnecessary scale after git push
The receiver already adds a web=1 formation, so the scale command after
the push always exits with "requested scale equals current scale,
nothing to do!".
|
flynn_flynn
|
train
|
go
|
4b3725d58de1a20d45ecdafef3fdac18ebdd389b
|
diff --git a/migrator.go b/migrator.go
index <HASH>..<HASH> 100644
--- a/migrator.go
+++ b/migrator.go
@@ -171,8 +171,7 @@ func (m Migrator) Reset() error {
// CreateSchemaMigrations sets up a table to track migrations. This is an idempotent
// operation.
-func (m Migrator) CreateSchemaMigrations() error {
- c := m.Connection
+func CreateSchemaMigrations(c *Connection) error {
mtn := c.MigrationTableName()
err := c.Open()
if err != nil {
@@ -197,6 +196,12 @@ func (m Migrator) CreateSchemaMigrations() error {
})
}
+// CreateSchemaMigrations sets up a table to track migrations. This is an idempotent
+// operation.
+func (m Migrator) CreateSchemaMigrations() error {
+ return CreateSchemaMigrations(m.Connection)
+}
+
// Status prints out the status of applied/pending migrations.
func (m Migrator) Status(out io.Writer) error {
err := m.CreateSchemaMigrations()
|
feat: make CreateSchemaMigrations independent of the migrator (#<I>)
|
gobuffalo_pop
|
train
|
go
|
af9589bffcd413169f86351fd3fed81e135a9b0b
|
diff --git a/lib/model.js b/lib/model.js
index <HASH>..<HASH> 100644
--- a/lib/model.js
+++ b/lib/model.js
@@ -459,12 +459,12 @@ assign(derived, {
Object.keys(CONNECTION_STRING_OPTIONS).forEach((item) => {
if (typeof this[item] !== 'undefined' && !req.query[item]) {
- if (item === 'compression' && this.compression) {
- if (this.compression.compressors) {
+ if (item === 'compression') {
+ if (this.compression && this.compression.compressors) {
req.query.compressors = this.compression.compressors.join(',');
}
- if (this.compression.zlibCompressionLevel) {
+ if (this.compression && this.compression.zlibCompressionLevel) {
req.query.zlibCompressionLevel = this.compression.zlibCompressionLevel;
}
} else if (item === 'authMechanismProperties') {
|
refactor: clean uri from an empty compression (#<I>)
|
mongodb-js_connection-model
|
train
|
js
|
db4c81794b12f663ec21c4db461f7c0041a42f68
|
diff --git a/lib/cistern/attributes.rb b/lib/cistern/attributes.rb
index <HASH>..<HASH> 100644
--- a/lib/cistern/attributes.rb
+++ b/lib/cistern/attributes.rb
@@ -135,9 +135,9 @@ module Cistern::Attributes
transform = Cistern::Attributes.transforms[options[:squash] ? :squash : :none] ||
Cistern::Attributes.default_transform
- parser = Cistern::Attributes.parsers[options[:type]] ||
- options[:parser] ||
- Cistern::Attributes.default_parser
+ parser = options[:parser] ||
+ Cistern::Attributes.parsers[options[:type]] ||
+ Cistern::Attributes.default_parser
transformed = transform.call(name, value, options)
|
fix(attributes): always use explicit :parser
|
lanej_cistern
|
train
|
rb
|
6449d80998fb1983951a3fce26825b1224469c34
|
diff --git a/src/stylable.js b/src/stylable.js
index <HASH>..<HASH> 100644
--- a/src/stylable.js
+++ b/src/stylable.js
@@ -5,7 +5,18 @@ import hoistStatics from 'hoist-non-react-statics'
import Node from './node'
function getDisplayName (comp) {
- return comp.displayName || comp.name || 'Component'
+ if (typeof comp.getName === 'function') {
+ return comp.getName()
+ }
+ if (typeof comp.tag === 'number') {
+ if (typeof comp.type === 'string') {
+ return comp.type
+ }
+ if (typeof comp.type === 'function') {
+ return comp.displayName || comp.name
+ }
+ }
+ return 'Component'
}
export default function stylable (name) {
|
fix: make getDisplayName to be almost equal to react getElementName
|
vovkasm_react-native-stylable
|
train
|
js
|
d8ce91dadfd4360b0e14f30e938f92a595227a87
|
diff --git a/framework/js/onsen.js b/framework/js/onsen.js
index <HASH>..<HASH> 100644
--- a/framework/js/onsen.js
+++ b/framework/js/onsen.js
@@ -549,7 +549,9 @@ limitations under the License.
}
};
- return ons._createPopoverOriginal(page, options);
+ return ons._createPopoverOriginal(page, options).then(function(popover) {
+ return angular.element(popover).data('ons-popover');
+ });
},
/**
|
fix(ons-popover): Changed ons.createPopover() to resolve component view object instead of ons-popover element on angular bindings.
|
OnsenUI_OnsenUI
|
train
|
js
|
c27d954016377bb0500251b7c8ba78895d4d87b7
|
diff --git a/http/query.go b/http/query.go
index <HASH>..<HASH> 100644
--- a/http/query.go
+++ b/http/query.go
@@ -117,7 +117,7 @@ func toSpec(p *ast.Program, now func() time.Time) (*flux.Spec, error) {
return nil, err
}
- if err := itrp.Eval(semProg); err != nil {
+ if err := itrp.Eval(semProg, nil); err != nil {
return nil, err
}
return flux.ToSpec(itrp, itrp.SideEffects()...), nil
|
fix: pass nil importer to Eval
|
influxdata_influxdb
|
train
|
go
|
2f1ab45f468caaa4119647f01dd8261885196e30
|
diff --git a/intranet/apps/eighth/serializers.py b/intranet/apps/eighth/serializers.py
index <HASH>..<HASH> 100644
--- a/intranet/apps/eighth/serializers.py
+++ b/intranet/apps/eighth/serializers.py
@@ -143,7 +143,9 @@ class EighthBlockDetailSerializer(serializers.Serializer):
"administrative": scheduled_activity.get_administrative(),
"presign": activity.presign,
"sticky": scheduled_activity.get_sticky(),
+ "finance": "", # TODO: refactor JS to remove this
"title": scheduled_activity.title,
+ "comments": scheduled_activity.comments, # TODO: refactor JS to remove this
"display_text": "",
# TODO: Remove together with other eighth waitlist functionality
"waitlist_count": 0,
|
fix(eighth): add finance and comments field
|
tjcsl_ion
|
train
|
py
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.