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 |
|---|---|---|---|---|---|
816823e216fe486376c8fa7caac9569b9c2b815a
|
diff --git a/utils/replace-html-placeholders.js b/utils/replace-html-placeholders.js
index <HASH>..<HASH> 100644
--- a/utils/replace-html-placeholders.js
+++ b/utils/replace-html-placeholders.js
@@ -32,10 +32,6 @@ const replaceHtmlPlaceholders = (indexHtmlContent, config) => {
.replace(
new RegExp('__LOADING_SCREEN_JS__', 'g'),
assets.loadingScreenScript
- )
- .replace(
- new RegExp('__LOADING_SCREEN_CSS__', 'g'),
- assets.loadingScreenStyles
);
};
|
refactor: inline css for loading screen
|
commercetools_merchant-center-application-kit
|
train
|
js
|
92fd7b0ca325d5990c333088409eff66bd7048ce
|
diff --git a/lib/dio.rb b/lib/dio.rb
index <HASH>..<HASH> 100644
--- a/lib/dio.rb
+++ b/lib/dio.rb
@@ -44,7 +44,12 @@ module Dio
class_methods do
def injectable(subkey = nil, &block)
key = subkey ? [self, subkey] : self
- factory = block || lambda { |*args| new(*args) }
+ factory = block || ->(*args) { new(*args) }
+ Dio.default_provider.register(key, &factory)
+ end
+
+ def provide(key, &factory)
+ raise "You must define a factory of #{key}" unless block_given?
Dio.default_provider.register(key, &factory)
end
|
feat(dio): Allow to register with arbitrary key
```ruby
class Configurer
include Dio
provide :foo do |key|
FooService.new(key)
end
provide :bar do
logger.log("bar is loaded")
BarModule.new(flag: true)
end
# ...
end
```
|
ryym_dio
|
train
|
rb
|
1b3205cbcc829e887a1fdfc7c3d1290bffef92c7
|
diff --git a/src/utils.js b/src/utils.js
index <HASH>..<HASH> 100644
--- a/src/utils.js
+++ b/src/utils.js
@@ -13,7 +13,7 @@ const arrify = require('arrify')
const _ = require('lodash')
const VerboseRenderer = require('listr-verbose-renderer')
-const { pkg, path: pkgPath } = readPkgUp.sync({
+const { package: pkg, path: pkgPath } = readPkgUp.sync({
cwd: fs.realpathSync(process.cwd())
})
const PKG_FILE = 'package.json'
|
fix: fix breaking change from read-pkg-up
|
ipfs_aegir
|
train
|
js
|
27a61c5d3950b08f7dc30e02140ea489f8ec005e
|
diff --git a/tests/integ/test_workflow.py b/tests/integ/test_workflow.py
index <HASH>..<HASH> 100644
--- a/tests/integ/test_workflow.py
+++ b/tests/integ/test_workflow.py
@@ -2116,6 +2116,7 @@ def test_one_step_ingestion_pipeline(
input_data_uri = os.path.join(
"s3://", sagemaker_session.default_bucket(), "py-sdk-ingestion-test-input/features.csv"
)
+
with open(input_file_path, "r") as data:
body = data.read()
S3Uploader.upload_string_as_file_body(
@@ -2152,6 +2153,10 @@ def test_one_step_ingestion_pipeline(
)
]
+ output_content_type = "CSV"
+ output_config = {output_name: {"content_type": output_content_type}}
+ job_argument = [f"--output-config '{json.dumps(output_config)}'"]
+
temp_flow_path = "./ingestion.flow"
with cleanup_feature_group(feature_group):
json.dump(ingestion_only_flow, open(temp_flow_path, "w"))
@@ -2166,7 +2171,11 @@ def test_one_step_ingestion_pipeline(
)
data_wrangler_step = ProcessingStep(
- name="ingestion-step", processor=data_wrangler_processor, inputs=inputs, outputs=outputs
+ name="ingestion-step",
+ processor=data_wrangler_processor,
+ inputs=inputs,
+ outputs=outputs,
+ job_arguments=job_argument,
)
pipeline = Pipeline(
|
fix: fix feature store ingestion via data wrangler test (#<I>)
|
aws_sagemaker-python-sdk
|
train
|
py
|
9ac4f22a4ca4cea622cd35f06f5fb461d01790dd
|
diff --git a/test/fs.tap.js b/test/fs.tap.js
index <HASH>..<HASH> 100644
--- a/test/fs.tap.js
+++ b/test/fs.tap.js
@@ -354,7 +354,11 @@ test("continuation-local state with MakeCallback and fs module", function (t) {
t.equal(namespace.get('test'), 'lstat',
"mutated state has persisted to fs.lstat's callback");
- t.equal(stats.mode.toString(8), '120777', "permissions should be as created");
+ t.equal(
+ (stats.mode ^ process.umask()).toString(8),
+ '120777',
+ "permissions should be as created"
+ );
deleteLink();
t.end();
|
test: deal better with umask
|
othiym23_node-continuation-local-storage
|
train
|
js
|
f5eb36fa0a313295694452f1f82c2d4315e8d91b
|
diff --git a/packages/spaces/src/SpacesLink.js b/packages/spaces/src/SpacesLink.js
index <HASH>..<HASH> 100644
--- a/packages/spaces/src/SpacesLink.js
+++ b/packages/spaces/src/SpacesLink.js
@@ -192,14 +192,7 @@ const Link = ({
className={classNames('spaces-hook-link', className, `spaces-${linkStyle}-link`, {
'p-2': linkStyle === 'default',
})}
- tabIndex={0}
- style={{
- ...style,
- cursor: link?.url ? 'pointer' : 'not-allowed',
- }}
- {...props}
- {...rest}
- aria-label={name}
+ style={{ ...style }}
>
<BodyTag
className={classNames('d-flex', `align-items-${!showDescription || stacked ? 'center' : 'start'}`, {
@@ -221,6 +214,13 @@ const Link = ({
'pt-3': stacked,
'text-center': stacked,
})}
+ tabIndex={0}
+ style={{
+ cursor: link?.url ? 'pointer' : 'not-allowed',
+ }}
+ {...props}
+ {...rest}
+ aria-label={name}
>
{name}
</TitleTag>
|
refactor(spaces): move click area to title
this allows for multiple click areas on a tile. e.g. the favorties heart and the title
|
Availity_availity-react
|
train
|
js
|
98d5198859d0bf1392585f3112f32d7d86949f5d
|
diff --git a/lib/Image.js b/lib/Image.js
index <HASH>..<HASH> 100644
--- a/lib/Image.js
+++ b/lib/Image.js
@@ -44,6 +44,8 @@ export default class Image extends React.Component {
}
componentDidMount() {
+ this._mounted = true;
+
const { lazy } = this.props;
const imageNode = $(ReactDOM.findDOMNode(this));
@@ -54,20 +56,28 @@ export default class Image extends React.Component {
}
}
+ componentWillUnmount() {
+ this._mounted = false;
+ }
+
addListeners(imageNode) {
// image needs to be initialized twice for safari
const image = new window.Image();
image.onload = () => {
- this.setState({ status: 'display' });
- if (imageNode) imageNode.off('inview');
+ if (this._mounted) {
+ this.setState({ status: 'display' });
+ if (imageNode) imageNode.off('inview');
- const { imageDidLoad } = this.props;
- if (imageDidLoad) imageDidLoad();
+ const { imageDidLoad } = this.props;
+ if (imageDidLoad) imageDidLoad();
+ }
};
image.onerror = () => {
- this.setState({ status: 'error' });
+ if (this._mounted) {
+ this.setState({ status: 'error' });
+ }
};
// used to reinitialize img source
|
fix: add mounted logic to prevent set state warnings and glitches
|
poetic_react-super-components
|
train
|
js
|
16071dbe90413d72f7e3f442d39d7bac9acda2a2
|
diff --git a/tests/test_test_with.py b/tests/test_test_with.py
index <HASH>..<HASH> 100644
--- a/tests/test_test_with.py
+++ b/tests/test_test_with.py
@@ -244,6 +244,7 @@ with open('moby_dick.txt') as file, open('not_moby_dick.txt') as not_file:
helper.with_line_info(res, *lines)
+@pytest.mark.skip
def test_test_with_destructuring():
code = """
with A() as (one, *others):
|
chore: temporarily skip test until travisci supports more recent python<I> version
|
datacamp_pythonwhat
|
train
|
py
|
d0a0ea3bc21a879b4e43619a52d3650730df810a
|
diff --git a/packages/cozy-jobs-cli/src/inject-dev-account.js b/packages/cozy-jobs-cli/src/inject-dev-account.js
index <HASH>..<HASH> 100644
--- a/packages/cozy-jobs-cli/src/inject-dev-account.js
+++ b/packages/cozy-jobs-cli/src/inject-dev-account.js
@@ -11,4 +11,6 @@ module.exports = function injectDevAccount(config) {
folderPath: DEFAULT_ROOT_PATH
}
}
+ BaseKonnector.prototype.deactivateAutoSuccessfulLogin = async function() {}
+ BaseKonnector.prototype.notifySuccessfulLogin = async function() {}
}
|
fix: deactivate account notification in dev mode
This will avoid error when running a connector using BaseKonnector.signin in dev mode
|
konnectors_libs
|
train
|
js
|
1741c59d9d2f0d05c083c23dd64038bfd0d846ce
|
diff --git a/docs/ext_argparse.py b/docs/ext_argparse.py
index <HASH>..<HASH> 100644
--- a/docs/ext_argparse.py
+++ b/docs/ext_argparse.py
@@ -27,6 +27,7 @@ _prog_re = re.compile(r"%\(prog\)s")
_percent_re = re.compile(r"%%")
_cli_metadata_variables_section_cross_link_re = re.compile(r"the \"Metadata variables\" section")
_inline_code_block_re = re.compile(r"(?<!`)`([^`]+?)`")
+_example_inline_code_block_re = re.compile(r"(?<=^Example: )(.+)$", re.MULTILINE)
def get_parser(module_name, attr):
@@ -61,6 +62,8 @@ class ArgparseDirective(Directive):
help
)
+ help = _example_inline_code_block_re.sub(r":code:`\1`", help)
+
# Replace option references with links.
# Do this before indenting blocks and notes.
help = _option_line_re.sub(
|
docs: put inline code to code blocks in examples
Only apply to the line starts with "^Example: ".
|
streamlink_streamlink
|
train
|
py
|
8ff8af0d02327125fbfe1cfabe0a09f231e64788
|
diff --git a/tools/python_test_v4.py b/tools/python_test_v4.py
index <HASH>..<HASH> 100644
--- a/tools/python_test_v4.py
+++ b/tools/python_test_v4.py
@@ -871,3 +871,31 @@ while project_import.import_status != "finished":
count += 1
if count == 10:
raise Exception("Project import taking too much time")
+
+# project releases
+release_test_project = gl.projects.create(
+ {"name": "release-test-project", "initialize_with_readme": True}
+)
+release_name = "Demo Release"
+release_tag_name = "v1.2.3"
+release_description = "release notes go here"
+release_test_project.releases.create(
+ {
+ "name": release_name,
+ "tag_name": release_tag_name,
+ "description": release_description,
+ "ref": "master",
+ }
+)
+assert len(release_test_project.releases.list()) == 1
+
+# get single release
+retrieved_project = release_test_project.releases.get(release_tag_name)
+assert retrieved_project.name == release_name
+assert retrieved_project.tag_name == release_tag_name
+assert retrieved_project.description == release_description
+
+# delete release
+release_test_project.releases.delete(release_tag_name)
+assert len(release_test_project.releases.list()) == 0
+release_test_project.delete()
|
test: add project releases test
Fixes #<I>
|
python-gitlab_python-gitlab
|
train
|
py
|
222445db4cb618f7b78efda94074ade57883d9d7
|
diff --git a/tests/test_bridgepoint/test_generate.py b/tests/test_bridgepoint/test_generate.py
index <HASH>..<HASH> 100644
--- a/tests/test_bridgepoint/test_generate.py
+++ b/tests/test_bridgepoint/test_generate.py
@@ -20,6 +20,7 @@ class TestGenerate(PrebuildFunctionTestCase):
self.metamodel.new('SM_EVT',
SM_ID=sm_sm.SM_ID,
+ SMspd_ID=self.metamodel.id_generator.next(),
Numb=2,
Drv_Lbl='A2',
Mning='my_event')
@@ -37,6 +38,7 @@ class TestGenerate(PrebuildFunctionTestCase):
self.metamodel.new('SM_EVT',
SM_ID=sm_sm.SM_ID,
+ SMspd_ID=self.metamodel.id_generator.next(),
Numb=2,
Drv_Lbl='B2',
Mning='my_second_event')
@@ -52,6 +54,7 @@ class TestGenerate(PrebuildFunctionTestCase):
relate(pe_pe, o_obj, 8001)
sm_evt = self.metamodel.new('SM_EVT',
SM_ID=sm_sm.SM_ID,
+ SMspd_ID=self.metamodel.id_generator.next(),
Numb=1,
Drv_Lbl='C1',
Mning='my_third_event')
|
test: ensure that SM_EVT.SMspd_ID is not null. NOTE: this is a bug in ooaofooa (formalisation on a conditional association), and has been fixed in ooaofooa <I>
|
xtuml_pyxtuml
|
train
|
py
|
11e2f900f86390eba9d8bfa34da2f8aebc57caad
|
diff --git a/www.es6/branch.js b/www.es6/branch.js
index <HASH>..<HASH> 100644
--- a/www.es6/branch.js
+++ b/www.es6/branch.js
@@ -83,7 +83,8 @@ Branch.prototype.initSession = function(onBranchLinkHook) {
if (!onBranchLinkHook && !disableGlobalListenersWarnings) {
console.log('WARNING: branch link hook is not being passed to initSession. ' +
'Falling back to global DeepLinkHandler method. See https://goo.gl/GijGKP for details.');
- } else {
+ }
+ else {
var currentHook = window.DeepLinkHandler;
if (currentHook !== undefined && currentHook !== onBranchLinkStub) {
if (!disableGlobalListenersWarnings) {
|
style: make lint happy with else statement
|
BranchMetrics_cordova-ionic-phonegap-branch-deep-linking
|
train
|
js
|
b4eebf93a02e25387cafe7f3f839a267ff5daf6c
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -113,7 +113,7 @@ function convertCrontabs() {
return ({
schedule: Object.assign({}, schedule, {
- rate: `cron(${crontab})`,
+ rate: ratesAreArray ? [`cron(${crontab})`] : `cron(${crontab})`,
name: addName ? `${schedule.name}-${i}` : undefined,
})
});
|
fix: Ensure proper creation of rates
|
UnitedIncome_serverless-local-schedule
|
train
|
js
|
7a0df268df30477ced99951bb8932d04d0e99eb8
|
diff --git a/tests/pipeline/test_provider_healthcheck.py b/tests/pipeline/test_provider_healthcheck.py
index <HASH>..<HASH> 100644
--- a/tests/pipeline/test_provider_healthcheck.py
+++ b/tests/pipeline/test_provider_healthcheck.py
@@ -23,6 +23,19 @@ def test_setting_eureka_enabled():
assert health_checks.has_healthcheck is True
+def test_defined_provider():
+ """Provider defined in settings should be returned with capitalization."""
+ provider_settings = copy.deepcopy(TEST_SETTINGS)
+ provider_settings['asg']['provider_healthcheck']['cloud'] = True
+ print(provider_settings)
+
+ health_checks = check_provider_healthcheck(settings=provider_settings)
+ assert len(health_checks.providers) == 1
+ assert 'cloud' not in health_checks.providers
+ assert 'Cloud' in health_checks.providers
+ assert health_checks.has_healthcheck is True
+
+
def test_additional_provider_with_eureka():
"""Default Provider should be added to providers in settings."""
eureka_enabled_with_provider_settings = copy.deepcopy(TEST_SETTINGS)
|
test: One provider defined for HC
See also: PSOBAT-<I>
|
foremast_foremast
|
train
|
py
|
a99b836bc820aaef9c8ddb12e35e8f5e7634a962
|
diff --git a/lib/anyway/rails/config.rb b/lib/anyway/rails/config.rb
index <HASH>..<HASH> 100644
--- a/lib/anyway/rails/config.rb
+++ b/lib/anyway/rails/config.rb
@@ -46,6 +46,10 @@ module Anyway
end
def load_from_credentials(config)
+ # do not load from credentials if we're in the context
+ # of the `credentials:edit` command
+ return if defined?(::Rails::Command::CredentialsCommand)
+
if ::Rails.application.respond_to?(:credentials)
config.deep_merge!(::Rails.application.credentials.public_send(config_name) || {})
|
fix: ignore credentials source when running credentials:edit
|
palkan_anyway_config
|
train
|
rb
|
cad64cf32fa192fcbbf0479ddbf30042673ea671
|
diff --git a/packages/react/src/components/Tooltip/Tooltip.js b/packages/react/src/components/Tooltip/Tooltip.js
index <HASH>..<HASH> 100644
--- a/packages/react/src/components/Tooltip/Tooltip.js
+++ b/packages/react/src/components/Tooltip/Tooltip.js
@@ -300,7 +300,11 @@ class Tooltip extends Component {
if (!open && tooltipBody && tooltipBody.id === this._tooltipId) {
this._tooltipDismissed = true;
const currentActiveNode = event?.relatedTarget;
- if (!currentActiveNode && document.activeElement === document.body) {
+ if (
+ !currentActiveNode &&
+ document.activeElement === document.body &&
+ event?.type !== 'click'
+ ) {
this._triggerRef?.current.focus();
}
}
|
fix(Tooltip): avoid stealing focus when dismissing with mouseclick (#<I>)
|
carbon-design-system_carbon-components
|
train
|
js
|
32d34ba8903c96e065cf12623708e7ed1e18bff1
|
diff --git a/pygenstub.py b/pygenstub.py
index <HASH>..<HASH> 100644
--- a/pygenstub.py
+++ b/pygenstub.py
@@ -811,12 +811,13 @@ def main(argv=None):
:sig: (Optional[List[str]]) -> None
:param argv: Command line arguments.
"""
- argv = argv if argv is not None else sys.argv
parser = ArgumentParser(prog="pygenstub")
parser.add_argument("--version", action="version", version="%(prog)s " + __version__)
parser.add_argument("source", help="source file")
parser.add_argument("--debug", action="store_true", help="enable debug messages")
+
+ argv = argv if argv is not None else sys.argv
arguments = parser.parse_args(argv[1:])
# set debug mode
|
refactor: Start hangling cli args after making parser
|
uyar_pygenstub
|
train
|
py
|
d6567a8cfd7b22e7b85c03b5a93ecdf5fbf8f835
|
diff --git a/lib/parse/regexreply.js b/lib/parse/regexreply.js
index <HASH>..<HASH> 100644
--- a/lib/parse/regexreply.js
+++ b/lib/parse/regexreply.js
@@ -68,8 +68,8 @@ exports.parse = function (regexp, facts, callback) {
return "<"+num+"vwidthstar>";
}
- regexp = regexp.replace(/\*(\d)/g, replacer1); // Convert *n into multi word EXACT match
- regexp = regexp.replace(/\*(~\d\s?)/g, replacer2); // Convert *~n into multi word VARIABLE match
+ regexp = regexp.replace(/\*([0-9]{2})/g, replacer1); // Convert *n into multi word EXACT match
+ regexp = regexp.replace(/\*(~[0-9]{2}\s?)/g, replacer2); // Convert *~n into multi word VARIABLE match
regexp = regexp.replace(/<zerowidthstar>/g, "(?:.*?)");
// Handle WordNet
|
fix: regex for match with 2 numbers digit
|
superscriptjs_superscript
|
train
|
js
|
8707f181dbe496ffd5875edeeaae443338fa12a4
|
diff --git a/src/styleguide/intro-page.js b/src/styleguide/intro-page.js
index <HASH>..<HASH> 100644
--- a/src/styleguide/intro-page.js
+++ b/src/styleguide/intro-page.js
@@ -69,7 +69,7 @@ const IntroTile = React.createClass({
const DeathStar = React.createClass({
render() {
return (
- <svg version="1.1" width="150px" class="svg-content" x="0px" y="0px" viewBox="0 0 161.8 185.7"
+ <svg version="1.1" width="150px" x="0px" y="0px" viewBox="0 0 161.8 185.7"
enable-background="new 0 0 161.8 185.7" preserveAspectRatio="xMinYMin meet">
<defs>
</defs>
@@ -548,4 +548,4 @@ const DeathStar = React.createClass({
);
}
});
-export default IntroPage;
\ No newline at end of file
+export default IntroPage;
|
chore(styleguide): appeases react warning
|
pivotal-cf_pivotal-ui
|
train
|
js
|
31563622dfee2843687761601019cd5e7dcef196
|
diff --git a/Entity/Filter.php b/Entity/Filter.php
index <HASH>..<HASH> 100644
--- a/Entity/Filter.php
+++ b/Entity/Filter.php
@@ -34,7 +34,7 @@ use whatwedo\TableBundle\Enum\FilterStateEnum;
/**
* @author Nicolo Singer <nicolo@whatwedo.ch>
* @ORM\Table(name="whatwedo_table_filter")
- * @ORM\Entity(repositoryClass="")
+ * @ORM\Entity(repositoryClass="whatwedo\TableBundle\Repository\FilterRepository")
*/
class Filter
{
@@ -224,4 +224,4 @@ class Filter
return FilterStateEnum::getRepresentation($this->state);
}
-}
\ No newline at end of file
+}
|
fix(filter): set FilterRepository
|
whatwedo_TableBundle
|
train
|
php
|
1bfbf6cb3a391ca793bd33971bb2c6a94cb4801b
|
diff --git a/packages/xod-project/src/patch.js b/packages/xod-project/src/patch.js
index <HASH>..<HASH> 100644
--- a/packages/xod-project/src/patch.js
+++ b/packages/xod-project/src/patch.js
@@ -408,13 +408,11 @@ export const dissocNode = R.curry(
(nodeOrId, patch) => {
const id = Node.getNodeId(nodeOrId);
const links = listLinksByNode(id, patch);
- console.log('found: ', links);
const newPatch = R.reduce(
(acc, cur) => dissocLink(cur, acc),
patch,
links
);
- console.log('after reduce: ', newPatch);
return R.ifElse(
R.pathSatisfies(R.complement(R.isNil), ['nodes', id]),
|
fix(xod-project): remove console.log from dissocNode
|
xodio_xod
|
train
|
js
|
f861d8d17d966809b6cd7ae338c289a125d0e3b4
|
diff --git a/lib/resolveGitRepo.js b/lib/resolveGitRepo.js
index <HASH>..<HASH> 100644
--- a/lib/resolveGitRepo.js
+++ b/lib/resolveGitRepo.js
@@ -56,7 +56,7 @@ const resolveGitRepo = async (cwd = process.cwd()) => {
// read the path of the current directory relative to the top-level directory
// don't read the toplevel directly, it will lead to an posix conform path on non posix systems (cygwin)
const gitRel = normalize(await execGit(['rev-parse', '--show-prefix']))
- const gitDir = determineGitDir(cwd, gitRel)
+ const gitDir = determineGitDir(normalize(cwd), gitRel)
const gitConfigDir = normalize(await resolveGitConfigDir(gitDir))
debugLog('Resolved git directory to be `%s`', gitDir)
|
fix: unbreak windows by correctly normalizing cwd (#<I>)
|
okonet_lint-staged
|
train
|
js
|
c43d3d31fd8dc3d8a873b6fcbf9c3d772cbc5bfd
|
diff --git a/packages/typography/index.cjs.js b/packages/typography/index.cjs.js
index <HASH>..<HASH> 100644
--- a/packages/typography/index.cjs.js
+++ b/packages/typography/index.cjs.js
@@ -1 +1 @@
-exports = require('./dist/index.cjs')
+module.exports = require('./dist/index.cjs')
|
fix(shared-typography): use module.exports instead of exports
|
telus_tds-core
|
train
|
js
|
1bf4deb680978d5a22c0ec1254eabbacedb3cba3
|
diff --git a/master/setup.py b/master/setup.py
index <HASH>..<HASH> 100755
--- a/master/setup.py
+++ b/master/setup.py
@@ -536,12 +536,13 @@ setup_args['extras_require'] = {
'idna >= 0.6',
],
'docs': [
- 'docutils<0.13.0',
- 'sphinx>1.4.0,<2.1.0',
+ 'docutils>=0.16.0',
+ 'sphinx>=3.2.0',
+ 'sphinx-rtd-theme>=0.5',
'sphinxcontrib-blockdiag',
'sphinxcontrib-spelling',
+ 'sphinxcontrib-websupport',
'pyenchant',
- 'docutils>=0.8',
'sphinx-jinja',
'towncrier',
],
|
docs: Update docs dependencies in master setup.py
|
buildbot_buildbot
|
train
|
py
|
5056b477294782e5f235e66680a0d9b0e03c5edc
|
diff --git a/src/sentry_plugins/jira/plugin.py b/src/sentry_plugins/jira/plugin.py
index <HASH>..<HASH> 100644
--- a/src/sentry_plugins/jira/plugin.py
+++ b/src/sentry_plugins/jira/plugin.py
@@ -1,6 +1,7 @@
from __future__ import absolute_import
import logging
+import re
from django.conf import settings
from django.conf.urls import url
@@ -312,7 +313,7 @@ class JiraPlugin(CorePluginMixin, IssuePlugin2):
jira_client = self.get_jira_client(group.project)
- is_user_api = '/rest/api/latest/user/' in jira_url
+ is_user_api = re.search('/rest/api/(latest|[0-9])/user/', jira_url)
is_user_picker = '/rest/api/1.0/users/picker' in jira_url
|
fix(jira): Accomodate versioned autocomplete endpoint (#<I>)
|
getsentry_sentry-plugins
|
train
|
py
|
48157149f7dd87627df9f1caf34a82474e131928
|
diff --git a/packages/components/buttons/accessible-button/src/accessible-button.js b/packages/components/buttons/accessible-button/src/accessible-button.js
index <HASH>..<HASH> 100644
--- a/packages/components/buttons/accessible-button/src/accessible-button.js
+++ b/packages/components/buttons/accessible-button/src/accessible-button.js
@@ -16,7 +16,7 @@ const Button = styled.button`
display: inline-flex;
font-size: ${vars.fontSizeDefault};
- ${props => (!props.as || props.as === 'button' ? 'outline: none' : '')}
+ ${props => (!props.as || props.as === 'button' ? 'outline: none;' : '')}
cursor: ${props => (props.disabled ? 'not-allowed' : 'pointer')};
&:disabled {
|
fix(accessible-button): fix no-outline rule for button elements (#<I>)
|
commercetools_ui-kit
|
train
|
js
|
5a5cbbc4c8008ed8f73fd96bb4e5cc10367970b6
|
diff --git a/taskstatusclient.js b/taskstatusclient.js
index <HASH>..<HASH> 100644
--- a/taskstatusclient.js
+++ b/taskstatusclient.js
@@ -36,7 +36,9 @@ TaskStatusClient.prototype._handleMessage = function(topic, message) {
}
};
TaskStatusClient.prototype.send = function(message) {
- this.socket.send(Container.encode(message));
+ var encoded = Container.encode(message);
+ var sendBuffer = encoded.buffer.slice(0, encoded.limit);
+ this.socket.send(sendBuffer);
};
TaskStatusClient.prototype.sendPingAcknowledge = function() {
this.socket.send({
|
fix: send messages with the correct number of bytes
|
bobvanderlinden_node-machinetalk
|
train
|
js
|
89fe24c0cb716c9b9531974eb49e2f251a46b22d
|
diff --git a/packages/mjml-core/src/types/color.js b/packages/mjml-core/src/types/color.js
index <HASH>..<HASH> 100644
--- a/packages/mjml-core/src/types/color.js
+++ b/packages/mjml-core/src/types/color.js
@@ -21,7 +21,7 @@ export default () =>
}
getValue() {
- if (this.value.match(shorthandRegex)) {
+ if (typeof this.value === 'string' && this.value.match(shorthandRegex)) {
return this.value.replace(replaceInputRegex, replaceOutput)
}
|
fix: added type guard to color validation
|
mjmlio_mjml
|
train
|
js
|
bd6123591e8ba8ef59648c62075ef34d37a5ab00
|
diff --git a/packages/cozy-client/src/queries/dsl.js b/packages/cozy-client/src/queries/dsl.js
index <HASH>..<HASH> 100644
--- a/packages/cozy-client/src/queries/dsl.js
+++ b/packages/cozy-client/src/queries/dsl.js
@@ -345,6 +345,7 @@ export const Q = doctype => new QueryDefinition({ doctype })
* @returns {boolean}
*/
export const isAGetByIdQuery = queryDefinition => {
+ if (!queryDefinition) return false
const attributes = Object.values(queryDefinition)
if (attributes.length === 0) return false
// 2 attrs because we check if id and doctype are not undefined
|
fix: Defensive code to not throw an error if there is no Qd.
Some CC tests are not setting a queryDefinition (withMutations ones).
Since it's possible to do it, we're no very defensive to not throw
|
cozy_cozy-client
|
train
|
js
|
68ecd8453287ed9a9d04ae80453e4638ef027298
|
diff --git a/lib/discordrb/api/channel.rb b/lib/discordrb/api/channel.rb
index <HASH>..<HASH> 100644
--- a/lib/discordrb/api/channel.rb
+++ b/lib/discordrb/api/channel.rb
@@ -76,7 +76,7 @@ module Discordrb::API::Channel
# @param attachments [Array<File>, nil] Attachments to use with `attachment://` in embeds. See
# https://discord.com/developers/docs/resources/channel#create-message-using-attachments-within-embeds
def create_message(token, channel_id, message, tts = false, embed = nil, nonce = nil, attachments = nil, allowed_mentions = nil, message_reference = nil, components = nil)
- body = { content: message, tts: tts, embed: embed, nonce: nonce, allowed_mentions: allowed_mentions, message_reference: message_reference, components: components }
+ body = { content: message, tts: tts, embed: embed, nonce: nonce, allowed_mentions: allowed_mentions, message_reference: message_reference, components: components&.to_a }
body = if attachments
files = [*0...attachments.size].zip(attachments).to_h
{ **files, payload_json: body.to_json }
|
fix: Explicitly call to_a on components when creating a message.
|
meew0_discordrb
|
train
|
rb
|
21fe6b6e3ee5fe8a1a133d7dadfd88adcac0bf39
|
diff --git a/lib/Requestable.js b/lib/Requestable.js
index <HASH>..<HASH> 100644
--- a/lib/Requestable.js
+++ b/lib/Requestable.js
@@ -256,7 +256,7 @@ class Requestable {
results.push(...thisGroup);
const nextUrl = getNextPage(response.headers.link);
- if (nextUrl) {
+ if (nextUrl && typeof options.page !== 'number') {
log(`getting next page: ${nextUrl}`);
return this._requestAllPages(nextUrl, options, cb, results);
}
|
feat: use the page option to fetch a single page
|
github-tools_github
|
train
|
js
|
ee06436f48975054fc270837d127bac26cfb842c
|
diff --git a/mongodb_migrations/config.py b/mongodb_migrations/config.py
index <HASH>..<HASH> 100644
--- a/mongodb_migrations/config.py
+++ b/mongodb_migrations/config.py
@@ -61,9 +61,9 @@ class Configuration(object):
help="directory of migration files")
self.arg_parser.add_argument('--downgrade', action='store_true',
default=False, help='Downgrade instead of upgrade')
- self.arg_parser.add_argument('--metastore', default="database_migrations",
+ self.arg_parser.add_argument('--metastore', default=self.metastore,
help='Where to store db migrations')
- self.arg_parser.add_argument('--to_datetime', default=None,
+ self.arg_parser.add_argument('--to_datetime', default=self.to_datetime,
help="Upgrade/downgrade to reach the migration with the given datetime prefix")
args = self.arg_parser.parse_args()
@@ -90,7 +90,7 @@ class Configuration(object):
'database': self.mongo_database,
'username': self.mongo_username,
'password': self.mongo_password,
- 'url': self.mongo_url,
+ 'url': self.mongo_url,
'metastore': self.metastore})
try:
|
fix: dev: Preserve config file variables after CLI params
|
DoubleCiti_mongodb-migrations
|
train
|
py
|
092c5356e6d23c36a590c2164d76044b0da920ab
|
diff --git a/src/field/index.js b/src/field/index.js
index <HASH>..<HASH> 100644
--- a/src/field/index.js
+++ b/src/field/index.js
@@ -33,6 +33,7 @@ export default createComponent({
props: {
...cellProps,
+ rows: [Number, String],
name: String,
rules: Array,
disabled: Boolean,
@@ -426,6 +427,7 @@ export default createComponent({
const inputProps = {
ref: 'input',
name: this.name,
+ rows: this.rows,
style: null,
class: bem('control', inputAlign),
value: this.modelValue,
|
fix(Field): rows not work
|
youzan_vant
|
train
|
js
|
88063e127ffd2f647f7c6588ce5413ae5ef66038
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -66,9 +66,9 @@ let appendSourceList = function(policyObject, name, sourceList) {
oldSourceList = oldValue;
}
- // do not mutate existing source list to prevent leaking state
- oldSourceList.slice().push(sourceList);
- policyObject[name] = oldSourceList.join(' ');
+ // do not mutate existing source list to prevent leaking state between different hooks
+ let newSourceList = oldSourceList.slice().push(sourceList);
+ policyObject[name] = newSourceList.join(' ');
};
// appends directives needed for Ember CLI live reload feature to policy object
|
fix: copied source list is not used
|
rwjblue_ember-cli-content-security-policy
|
train
|
js
|
94dc605968758a63067eceb4978d2347194d2c5b
|
diff --git a/pkg/action/rollback.go b/pkg/action/rollback.go
index <HASH>..<HASH> 100644
--- a/pkg/action/rollback.go
+++ b/pkg/action/rollback.go
@@ -164,6 +164,11 @@ func (r *Rollback) performRollback(currentRelease, targetRelease *release.Releas
r.cfg.Log("rollback hooks disabled for %s", targetRelease.Name)
}
+ // It is safe to use "force" here because these are resources currently rendered by the chart.
+ err = target.Visit(setMetadataVisitor(targetRelease.Name, targetRelease.Namespace, true))
+ if err != nil {
+ return targetRelease, errors.Wrap(err, "unable to set metadata visitor from target release")
+ }
results, err := r.cfg.KubeClient.Update(current, target, r.Force)
if err != nil {
|
fix(rollback): fix helm rollback doesn't have meta.helm.sh annotations
|
helm_helm
|
train
|
go
|
95cb48439270b611b6fafc3c256ed97cd23d04ba
|
diff --git a/src/distpicker.js b/src/distpicker.js
index <HASH>..<HASH> 100644
--- a/src/distpicker.js
+++ b/src/distpicker.js
@@ -6,7 +6,6 @@ import {
EVENT_CHANGE,
} from './constants';
-
const DEFAULT_CODE = 100000;
const PROVINCE = 'province';
const CITY = 'city';
@@ -157,6 +156,8 @@ export default class Distpicker {
} else {
$select.empty();
}
+
+ $select.trigger(EVENT_CHANGE);
}
// eslint-disable-next-line class-methods-use-this
@@ -193,7 +194,7 @@ export default class Distpicker {
self.output(CITY);
self.output(DISTRICT);
} else if (self.$province) {
- self.$province.find(':first').prop('selected', true).trigger(EVENT_CHANGE);
+ self.$province.find(':first').prop('selected', true).end().trigger(EVENT_CHANGE);
}
}
|
fix: trigger change event once districts changed
check out #<I>
|
fengyuanchen_distpicker
|
train
|
js
|
5a2b0e2946c0808955e260a0994714bcf0ee5ae7
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -275,11 +275,15 @@ async function exec(options = {}) {
kill(pid);
}
if (errorLines.length) {
- let error = errorLines.join('\n');
- error = error.replace(/===*.*====*\\nLicense acceptance recorded. Continuing.\n?/, '');
+ const licenseAcceptedMessage = /License acceptance recorded. Continuing./;
const acceptLicenseMessage = /To accept the message please run speedtest interactively or use the following:[\s\S]*speedtest --accept-license/;
const acceptGdprMessage = /To accept the message please run speedtest interactively or use the following:[\s\S]*speedtest --accept-gdpr/;
- if (acceptLicenseMessage.test(error)) {
+
+ let error = errorLines.join('\n');
+
+ if (licenseAcceptedMessage.test(error)) {
+ error = '';
+ } else if (acceptLicenseMessage.test(error)) {
error = error.replace(acceptLicenseMessage, 'To accept the message, pass the acceptLicense: true option');
} else if (acceptGdprMessage.test(error)) {
error = error.replace(acceptGdprMessage, 'To accept the message, pass the acceptGdpr: true option');
|
refactor: restructure error cases for consistency
moved the license-accepted error check into the same if/else conditional for readability.
|
ddsol_speedtest.net
|
train
|
js
|
467daa68e1e065ce9555bc89871969c1ea0cc6ef
|
diff --git a/lib/utils/mapped-list.js b/lib/utils/mapped-list.js
index <HASH>..<HASH> 100644
--- a/lib/utils/mapped-list.js
+++ b/lib/utils/mapped-list.js
@@ -85,7 +85,10 @@ class MappedList {
const { symbols, spriteModules, allModules, rules } = this;
const data = symbols.reduce((acc, symbol) => {
const resource = symbol.request.file;
- const module = spriteModules.find(m => m.resource.split('?')[0] === resource);
+ const module = spriteModules.find(m => 'resource' in m
+ ? m.resource.split('?')[0] === resource
+ : false
+ );
const rule = getMatchedRule(resource, rules);
const options = rule ? getLoaderOptions(spriteLoaderPath, rule) : null;
let spriteFilename = (options && options.spriteFilename)
|
fix(utils): prevent errors for modules without resources
|
kisenka_svg-sprite-loader
|
train
|
js
|
1d0cc87735f5d5bf754e1246a37f8d8c4f36788c
|
diff --git a/gitlab/__init__.py b/gitlab/__init__.py
index <HASH>..<HASH> 100644
--- a/gitlab/__init__.py
+++ b/gitlab/__init__.py
@@ -648,10 +648,7 @@ class Gitlab(object):
:param project_id: project id
:return: always true
"""
- try:
- self.delete_project(project_id)
- except exceptions.HttpError:
- pass
+ self.delete_project(project_id)
return True
def createprojectuser(self, user_id, name, **kwargs):
|
refactor: Exceptions are suppressed by default
See also: #<I>
|
pyapi-gitlab_pyapi-gitlab
|
train
|
py
|
561513b3ddf5a3d05c9b768b28d1df3be1d32dec
|
diff --git a/core/handler.js b/core/handler.js
index <HASH>..<HASH> 100644
--- a/core/handler.js
+++ b/core/handler.js
@@ -477,7 +477,8 @@ var EventHandler = function () {
if (checker[para] === true && event.session) {
if (event.session.hasOwnProperty('_user') === false ||
- event.session._user.account !== 'admin') {
+ !(event.session._user.account === 'admin' ||
+ event.session._user.control.groups.indexOf('admin') !== (-1))) {
err_str.push('admin login required');
}
}
|
fix: _admin flag will allow users with "admin" groups to access API as well
|
imonology_scalra
|
train
|
js
|
3c013f3780894141df87092ba359e63d47e955f0
|
diff --git a/webapps/camunda-webapp/webapp/src/main/webapp/assets/vendor/cabpmn/Transformer.js b/webapps/camunda-webapp/webapp/src/main/webapp/assets/vendor/cabpmn/Transformer.js
index <HASH>..<HASH> 100644
--- a/webapps/camunda-webapp/webapp/src/main/webapp/assets/vendor/cabpmn/Transformer.js
+++ b/webapps/camunda-webapp/webapp/src/main/webapp/assets/vendor/cabpmn/Transformer.js
@@ -351,11 +351,11 @@ define([], function () {
}
}
- if (!!defaultFlowId || flowsWithoutCondition.length > 1) {
+ if ((!!defaultFlowId && flowsWithoutCondition.length > 0) || flowsWithoutCondition.length > 1) {
throw error("Exclusive Gateway '" + bpmnObject.id + "' has outgoing sequence flows without conditions which are not the default flow.");
}
- if (flowsWithoutCondition.length === 1) {
+ if (!defaultFlowId && flowsWithoutCondition.length === 1) {
// here will not be thrown an error to align it with the java engine:
// in that case the java engine only log a warning!
console.log("[Transformer]: Sequence flow with id '" + flowsWithoutCondition[0].id + "' has no conditions but it is not configured to be the default flow.");
|
chore(Transfomer): Merge Transformer into webapp
related to CAM-<I>
|
camunda_camunda-bpm-platform
|
train
|
js
|
7bab78d7f179ce7fe7267040d40f81288e65d4df
|
diff --git a/lib/create-http-client.js b/lib/create-http-client.js
index <HASH>..<HASH> 100644
--- a/lib/create-http-client.js
+++ b/lib/create-http-client.js
@@ -11,12 +11,13 @@ import rateLimit from './rate-limit'
* @prop {string} accessToken - Access Token
* @prop {boolean=} insecure - If we should use http instead
* @prop {string=} host - Alternate host
- * @prop {Object=} agent - HTTP agent for node
+ * @prop {Object=} httpAgent - HTTP agent for node
+ * @prop {Object=} httpsAgent - HTTPS agent for node
* @prop {Object=} headers - Additional headers
* @return {Object} Initialized axios instance
*/
export default function createHttpClient (axios, httpClientParams) {
- const {space, accessToken, insecure, host, defaultHostname, agent} = httpClientParams
+ const {space, accessToken, insecure, host, defaultHostname, httpAgent, httpsAgent} = httpClientParams
let {headers} = httpClientParams
let [hostname, port] = (host && host.split(':')) || []
hostname = hostname || defaultHostname
@@ -39,7 +40,8 @@ export default function createHttpClient (axios, httpClientParams) {
const instance = axios.create({
baseURL: baseURL,
headers: headers,
- agent: agent,
+ httpAgent: httpAgent,
+ httpsAgent: httpsAgent,
paramsSerializer: qs.stringify
})
instance.httpClientParams = httpClientParams
|
fix(create-http-client): pick right prop for agent
|
contentful_contentful-sdk-core
|
train
|
js
|
03dd4aff711def64b361d157b6832483437d4ecd
|
diff --git a/ibis/tests/expr/test_analysis.py b/ibis/tests/expr/test_analysis.py
index <HASH>..<HASH> 100644
--- a/ibis/tests/expr/test_analysis.py
+++ b/ibis/tests/expr/test_analysis.py
@@ -290,3 +290,11 @@ def test_no_filter_means_no_selection():
t = ibis.table(dict(a="string"))
proj = t.filter([])
assert proj.equals(t)
+
+
+def test_mutate_overwrites_existing_column():
+ t = ibis.table(dict(a="string"))
+ mut = t.mutate(a=42).select(["a"])
+ sel = mut.op().selections[0].op().table.op().selections[0].op().arg
+ assert isinstance(sel.op(), ops.Literal)
+ assert sel.op().value == 42
|
test: add failing test case for mutation erasure
|
ibis-project_ibis
|
train
|
py
|
52a580aedbab75b1a13b395ef82f285733af3b51
|
diff --git a/lib/cli.js b/lib/cli.js
index <HASH>..<HASH> 100755
--- a/lib/cli.js
+++ b/lib/cli.js
@@ -63,7 +63,7 @@ function getPlugin (workingDir) {
: join(workingDir, 'node_modules', pluginName)
)
- return plugin
+ return plugin || tryRequirePlugin(pluginName).plugin
}
}
|
fix(northbrook): better plugin resolution
|
northbrookjs_northbrook
|
train
|
js
|
df6408985d0001a88d118d9712c2cc92f595748d
|
diff --git a/src/publish/index.js b/src/publish/index.js
index <HASH>..<HASH> 100644
--- a/src/publish/index.js
+++ b/src/publish/index.js
@@ -194,7 +194,6 @@ function getCreateStreamMessage(client) {
},
clear() {
computeStreamPartition.clear()
- getMsgChainer.clear()
queue.clear()
}
})
|
feat: Don't clear msgchains on disconnect.
|
streamr-dev_streamr-client-javascript
|
train
|
js
|
61a261665e5269b15624671b5a80abdb96c54e86
|
diff --git a/lib/ohai/config.rb b/lib/ohai/config.rb
index <HASH>..<HASH> 100644
--- a/lib/ohai/config.rb
+++ b/lib/ohai/config.rb
@@ -39,7 +39,7 @@ module Ohai
# causes all optional plugins to be run.
default :run_all_plugins, false
# optional plugins are the set of plugins that are marked optional but you wish to run.
- default :optional_plugins, []
+ default(:optional_plugins, []).writes_value { |arr| arr.map(&:to_sym) }
default :shellout_timeout, 30
end
end
|
fix: ensure optional_plugins to be array of symbols
|
chef_ohai
|
train
|
rb
|
ecaaffb071838256af029665e10a35f465f8897d
|
diff --git a/test/entity.spec.js b/test/entity.spec.js
index <HASH>..<HASH> 100644
--- a/test/entity.spec.js
+++ b/test/entity.spec.js
@@ -68,6 +68,22 @@ describe('Entity', function() {
});
});
+ it('Should add and remove collection associations.', function() {
+ var mockValidator = {
+ on: function() {
+ return {};
+ }
+ };
+
+ spyOn(mockValidator, 'on');
+
+ var entity = new WithValidation(mockValidator, getRestClient());
+
+ entity.enableValidation();
+
+ expect(mockValidator.on).toHaveBeenCalled();
+ });
+
it('Should call .create with the full body.', function(done) {
var entity = new WithResource(new Validation(), getRestClient());
entity.foo = 'bar';
diff --git a/test/resources/entity/with-associations.js b/test/resources/entity/with-associations.js
index <HASH>..<HASH> 100644
--- a/test/resources/entity/with-associations.js
+++ b/test/resources/entity/with-associations.js
@@ -5,7 +5,7 @@ import {Entity} from '../../../src/entity';
@resource()
export class WithAssociations extends Entity {
@association({collection: 'foo'})
- foo = null;
+ foo = [];
@association('custom')
bar = null;
|
test(entity): Test asObject changes, dirty checks and collections
|
SpoonX_aurelia-orm
|
train
|
js,js
|
7268e61fb3f352e58714a7fb392ac08d2b7046c9
|
diff --git a/cookies.py b/cookies.py
index <HASH>..<HASH> 100644
--- a/cookies.py
+++ b/cookies.py
@@ -478,8 +478,10 @@ def valid_value(value, quote=default_cookie_quote, unquote=default_unquote):
def valid_date(date):
"Validate an expires datetime object"
- # Integer dates are not standard and not really interpretable here.
- if isinstance(date, int):
+ # We want something that acts like a datetime. In particular,
+ # strings indicate a failure to parse down to an object and ints are
+ # nonstandard and ambiguous at best.
+ if not hasattr(date, 'tzinfo'):
return False
# Relevant RFCs define UTC as 'close enough' to GMT, and the maximum
# difference between UTC and GMT is often stated to be less than a second.
|
fix: more correct duck-typecheck for date objects in valid_date
|
sashahart_cookies
|
train
|
py
|
d70952bbf6d8f3d1506fad03c2867c61b41ad228
|
diff --git a/src/fns/__tests__/aleaRNGFactory.test.js b/src/fns/__tests__/aleaRNGFactory.test.js
index <HASH>..<HASH> 100644
--- a/src/fns/__tests__/aleaRNGFactory.test.js
+++ b/src/fns/__tests__/aleaRNGFactory.test.js
@@ -79,7 +79,12 @@ describe("aleaRNGFactory", () => {
(value, index, self) => index === self.indexOf(value)
);
- assert.lengthOf(stack, uniqueStack.length);
+ assert.lengthOf(
+ stack,
+ uniqueStack.length,
+ `There is/are ${stack.length -
+ uniqueStack.length} duplicate(s) after ${iterations} iterations.`
+ );
});
it("produces the exact same results (like defined in other implementations)", () => {
@@ -163,7 +168,12 @@ describe("aleaRNGFactory", () => {
(value, index, self) => index === self.indexOf(value)
);
- assert.lengthOf(stack, uniqueStack.length);
+ assert.lengthOf(
+ stack,
+ uniqueStack.length,
+ `There is/are ${stack.length -
+ uniqueStack.length} duplicate(s) after ${iterations} iterations.`
+ );
});
it("produces the exact same results (like defined in other implementations)", () => {
|
test: better error message for alea loop tests
|
MartinHelmut_number-generator
|
train
|
js
|
472fd83d21ca2f803d9efbf7970fae48a8a0f9e2
|
diff --git a/spec/support/cli_testing.rb b/spec/support/cli_testing.rb
index <HASH>..<HASH> 100644
--- a/spec/support/cli_testing.rb
+++ b/spec/support/cli_testing.rb
@@ -35,7 +35,7 @@ module CLITesting
line = nil
loop do
- res = IO.select([stdout], nil, nil, 0.2)
+ res = stdout.wait_readable(0.2)
if res.nil?
wait -= 0.2
|
fix(specs): IO.select -> wait_readable
|
anycable_anycable
|
train
|
rb
|
af65b2f643268e109bac72e94c920e06e8cfaf03
|
diff --git a/Filter/Type/TextFilterType.php b/Filter/Type/TextFilterType.php
index <HASH>..<HASH> 100644
--- a/Filter/Type/TextFilterType.php
+++ b/Filter/Type/TextFilterType.php
@@ -99,10 +99,7 @@ class TextFilterType extends FilterType
case static::CRITERIA_IS_NOT_EMPTY:
$queryBuilder->setParameter($parameterName, '');
- return $queryBuilder->expr()->orX()->addMultiple([
- $queryBuilder->expr()->isNotNull($this->getColumn()),
- $queryBuilder->expr()->eq($this->getColumn(), sprintf(':%s', $parameterName)),
- ]);
+ return $queryBuilder->expr()->gt($this->getColumn(), sprintf(':%s', $parameterName));
}
return false;
|
fix(filter): fix text not empty filter
|
whatwedo_TableBundle
|
train
|
php
|
9b3f4b90e1617ff92506e9b33c35f11489e3fede
|
diff --git a/lib/datasource/npm.js b/lib/datasource/npm.js
index <HASH>..<HASH> 100644
--- a/lib/datasource/npm.js
+++ b/lib/datasource/npm.js
@@ -165,11 +165,8 @@ async function getDependency(name, retries = 5) {
// Retrieve from API if not cached
try {
- // TODO: cache scoped packages once npmjs cache time is fixed for scoped packages
- // Ref: https://npm.community/t/scoped-packages-have-latest-version-disappear-temporarily-soon-after-publish/633/7
- const useCache = !(process.env.RENOVATE_SKIP_CACHE || name.startsWith('@'));
const raw = await got(pkgUrl, {
- cache: useCache ? map : undefined,
+ cache: process.env.RENOVATE_SKIP_CACHE ? undefined : map,
json: true,
retries: 5,
headers,
|
fix(npm): remove temporary cache-blocking code for scoped
npmjs has fixed/lowered the cache expiry time now
|
renovatebot_renovate
|
train
|
js
|
c00aa4895d5f47fcf0cb1d12566f07a489f54a8f
|
diff --git a/manifest.php b/manifest.php
index <HASH>..<HASH> 100644
--- a/manifest.php
+++ b/manifest.php
@@ -46,6 +46,7 @@ use oat\taoProctoring\scripts\install\SetupProctorCsvImporter;
use oat\taoProctoring\scripts\install\SetupProctoringEventListeners;
use oat\taoProctoring\scripts\install\SetUpProctoringUrlService;
use oat\taoProctoring\scripts\install\SetUpQueueTasks;
+use oat\taoProctoring\scripts\tools\MonitoringExtraFieldConfigurationMigration;
use oat\taoProctoring\scripts\uninstall\RestoreServices;
use oat\taoProctoring\scripts\uninstall\UnregisterProctoringEvents;
@@ -90,7 +91,8 @@ return array(
RegisterProctoringDeliveryDeleteService::class,
SetUpQueueTasks::class,
RegisterDeleteDeliveryExecution::class,
- RegisterWebhookEvents::class
+ RegisterWebhookEvents::class,
+ MonitoringExtraFieldConfigurationMigration::class,
),
'rdf' => array(
__DIR__.DIRECTORY_SEPARATOR.'scripts'.DIRECTORY_SEPARATOR.'install'.DIRECTORY_SEPARATOR.'proctoring.rdf'
|
fix: Add MonitoringExtraFieldConfiguration to install script
|
oat-sa_extension-tao-proctoring
|
train
|
php
|
85a231dce6354f99294f2847eb3aa534fac7e0b4
|
diff --git a/packages/node_modules/@webex/http-core/test/integration/spec/interceptor.js b/packages/node_modules/@webex/http-core/test/integration/spec/interceptor.js
index <HASH>..<HASH> 100644
--- a/packages/node_modules/@webex/http-core/test/integration/spec/interceptor.js
+++ b/packages/node_modules/@webex/http-core/test/integration/spec/interceptor.js
@@ -2,7 +2,7 @@
* Copyright (c) 2015-2019 Cisco Systems, Inc. See LICENSE file.
*/
-import '@webex/internal-plugin-wdm';
+import '@webex/internal-plugin-device';
import {assert} from '@webex/test-helper-chai';
import sinon from 'sinon';
|
test(http-core): migrate to device
Migrate from internal-plugin-wdm to internal-plugin-device.
|
webex_spark-js-sdk
|
train
|
js
|
5bd70a2da336fd4f7e1aa6ffa92c75e441269e5b
|
diff --git a/src/settings.js b/src/settings.js
index <HASH>..<HASH> 100644
--- a/src/settings.js
+++ b/src/settings.js
@@ -26,7 +26,5 @@ module.exports = {
defaultItemAlias: '_item',
- useJquery: true,
-
immutableCollections: true
};
|
refactor(main): remove unused settings.useJquery
|
karfcz_kff
|
train
|
js
|
8aeb4b8e1574eef2e169fdc57af59412f4465275
|
diff --git a/boot/database.js b/boot/database.js
index <HASH>..<HASH> 100644
--- a/boot/database.js
+++ b/boot/database.js
@@ -117,7 +117,11 @@ function migrateData (version, done) {
if (semver.satisfies(version, '<=0.1.55')) {
// 0.1.55 and prior used strings instead of booleans for the trusted
// property on clients
- Client.list(function (err, clients) {
+ Client.list({
+ // list all clients, avoid paging
+ page: 1,
+ size: '0'
+ }, function (err, clients) {
if (err) { return next(err) }
async.map(clients, function (client, callback) {
|
fix: Don't paginate clients during data migration
|
anvilresearch_connect
|
train
|
js
|
80b37ae30d92c40dd1c815277e8abe4f5044d4b5
|
diff --git a/email/views/structure/header.php b/email/views/structure/header.php
index <HASH>..<HASH> 100644
--- a/email/views/structure/header.php
+++ b/email/views/structure/header.php
@@ -251,7 +251,7 @@
<?php
- if (\Nails\Environment::not(Environment::ENV_PROD)) {
+ if (\Nails\Environment::not(\Nails\Environment::ENV_PROD)) {
?>
<div id="non-production-environment">
|
fix: Incorrect call to Environment class
|
nails_module-email
|
train
|
php
|
d858f6c98599cbc8fc8429784d5a8600963f0b1b
|
diff --git a/test/backend-connection.test.js b/test/backend-connection.test.js
index <HASH>..<HASH> 100644
--- a/test/backend-connection.test.js
+++ b/test/backend-connection.test.js
@@ -482,12 +482,10 @@ suite('Connection', function() {
.createBackend()
.next(function(newBackend) {
restartedBackend = newBackend;
- assert.equal(backend.received.length,
- 1,
- 'no new message should be sent to the old backend' + JSON.stringify(backend.received));
- assert.equal(restartedBackend.received.length,
- 0,
- 'message should be destroyed by socket error' + JSON.stringify(restartedBackend.received));
+ assert.deepEqual(extractTags(backend.received),
+ ['test.message']);
+ assert.deepEqual(extractTags(restartedBackend.received),
+ []);
connection.emitMessage('test', { message: true });
})
|
test: compare messages length and content at a time
|
droonga_express-droonga
|
train
|
js
|
ad414af30490d6a5a3e2c21f3b5f875b62786391
|
diff --git a/src/Concerns/InteractsWithAuthentication.php b/src/Concerns/InteractsWithAuthentication.php
index <HASH>..<HASH> 100644
--- a/src/Concerns/InteractsWithAuthentication.php
+++ b/src/Concerns/InteractsWithAuthentication.php
@@ -26,7 +26,7 @@ trait InteractsWithAuthentication
*/
public function loginAs($userId, $guard = null)
{
- $userId = method_exists($userId, 'getKey') ? $userId->getKey() : $userId;
+ $userId = is_object($userId) && method_exists($userId, 'getKey') ? $userId->getKey() : $userId;
return $this->visit(rtrim(route('dusk.login', ['userId' => $userId, 'guard' => $guard], $this->shouldUseAbsoluteRouteForAuthentication())));
}
|
fix: check if userId is an object (#<I>)
|
laravel_dusk
|
train
|
php
|
8d73f781daa2663c830cca3a75e9287b9773f726
|
diff --git a/packages/reactstrap-validation-select/AvSelect.js b/packages/reactstrap-validation-select/AvSelect.js
index <HASH>..<HASH> 100644
--- a/packages/reactstrap-validation-select/AvSelect.js
+++ b/packages/reactstrap-validation-select/AvSelect.js
@@ -112,6 +112,12 @@ class AvSelect extends AvBaseInput {
return this.props.onFocus && this.props.onFocus(value);
}
+ onInputHandler(...args) {
+ if (this.props.onInputChange) {
+ this.props.onInputChange(...args);
+ }
+ }
+
onChangeHandler(inputValue) {
const value = this.prepValue(inputValue);
if (this.props.isMulti) {
@@ -120,11 +126,7 @@ class AvSelect extends AvBaseInput {
return;
}
}
- this.onInputHandler(value);
super.onChangeHandler(value);
- if (this.props.onInputChange) {
- this.props.onInputChange(value);
- }
}
getValue() {
|
fix(reactstrap-validation-select): seperate onInput and onChange
Since react-select has onInput being different than onChange (even when react denotes those as basically aliases)
|
Availity_availity-react
|
train
|
js
|
b9205e632c3b98a8834c52a5d33560e1a6e1d592
|
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
@@ -414,10 +414,10 @@ var pingServer = function(self, server, cb) {
// Calculate latency
var latencyMS = new Date().getTime() - start;
+
// Set the last updatedTime
- var hrTime = process.hrtime();
- // Calculate the last update time
- server.lastUpdateTime = hrTime[0] * 1000 + Math.round(hrTime[1] / 1000);
+ var hrtime = process.hrtime();
+ server.lastUpdateTime = (hrtime[0] * 1e9 + hrtime[1]) / 1e6;
// We had an error, remove it from the state
if (err) {
|
fix(replset): correct legacy max staleness calculation
We were calculating lastUpdateTime using nanoseconds instead of
milliseconds, despite calculating maxStaleness with a millisecond
lastWriteDate
|
mongodb-js_mongodb-core
|
train
|
js
|
e0b96e9f2ec84a21e9e9f7d3a95b9794215f52ad
|
diff --git a/src/validation/validationRenderer.js b/src/validation/validationRenderer.js
index <HASH>..<HASH> 100644
--- a/src/validation/validationRenderer.js
+++ b/src/validation/validationRenderer.js
@@ -55,7 +55,10 @@ export class MaterializeFormValidationRenderer {
if (element.hasAttribute('md-datepicker')) {
element.classList.remove('valid');
element.classList.add('invalid');
- this.addMessage(element.parentNode, error);
+ if (!(element.hasAttribute('data-show-errortext') &&
+ element.getAttribute('data-show-errortext') === 'false')) {
+ this.addMessage(element.parentNode, error);
+ }
}
break;
}
@@ -92,8 +95,10 @@ export class MaterializeFormValidationRenderer {
case 'INPUT' : {
if (element.hasAttribute('md-datepicker')) {
this.removeMessage(element.parentNode, error);
- element.classList.remove('invalid');
- element.classList.add('valid');
+ if (element && element.parentNode.querySelectorAll('.' + this.className).length === 0) {
+ element.classList.remove('invalid');
+ element.classList.add('valid');
+ }
}
break;
}
|
refactor(validationRenderer): check the data-show-errortext attribute to show the message for the date picker validation error.
I have added the validation for date picker but I have forgot to make some test on the remove and I have added the ability to add a data attribute to the date picker so I have adapt the code so the validation renderer can be able to display or not the message according to the attribute.
|
aurelia-ui-toolkits_aurelia-materialize-bridge
|
train
|
js
|
1ad412200a014a32b3498fc042943550748b2e57
|
diff --git a/command/version.go b/command/version.go
index <HASH>..<HASH> 100644
--- a/command/version.go
+++ b/command/version.go
@@ -11,7 +11,7 @@ var versionCmd = &cobra.Command{
Short: "Print the version number of Pact Go",
Long: `All software has versions. This is Pact Go's`,
Run: func(cmd *cobra.Command, args []string) {
- fmt.Println("Pact Go CLI v0.0.8")
+ fmt.Println("Pact Go CLI v0.0.9")
},
}
|
chore(build): update version to <I> beta
|
pact-foundation_pact-go
|
train
|
go
|
d7f7cad4a25e27ba08eb3a0a5e16d7d878b4f99b
|
diff --git a/docs/conf.py b/docs/conf.py
index <HASH>..<HASH> 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -65,7 +65,7 @@ extlinks = {
'Issue #'
),
'example': (
- 'https://raw.githubusercontent.com/instaloader/instaloader/v' + current_release + '/docs/codesnippets/%s',
+ 'https://raw.githubusercontent.com/instaloader/instaloader/master/docs/codesnippets/%s',
'Example '
),
}
|
docs: Link to examples in master branch
|
instaloader_instaloader
|
train
|
py
|
d6275225091164eb8a6f2374c54eb26ab2274391
|
diff --git a/lib/fetch/index.js b/lib/fetch/index.js
index <HASH>..<HASH> 100644
--- a/lib/fetch/index.js
+++ b/lib/fetch/index.js
@@ -2029,7 +2029,7 @@ async function httpNetworkFetch (
fetchParams.controller.terminate(error)
- reject(makeNetworkError(error))
+ reject(error)
}
}
))
diff --git a/test/fetch/client-fetch.js b/test/fetch/client-fetch.js
index <HASH>..<HASH> 100644
--- a/test/fetch/client-fetch.js
+++ b/test/fetch/client-fetch.js
@@ -332,3 +332,13 @@ test('post FormData with File', (t) => {
t.ok(/filename123/.test(result))
})
})
+
+test('invalid url', async (t) => {
+ t.plan(1)
+
+ try {
+ await fetch('http://invalid')
+ } catch (e) {
+ t.match(e.cause.message, 'invalid')
+ }
+})
|
fix(fetch): makeNetworkError called twice when httpNetworkFetch run error (#<I>)
|
mcollina_undici
|
train
|
js,js
|
16b13c71347ed7f06ab453be37da762fde2ba071
|
diff --git a/core/test/utils/index.js b/core/test/utils/index.js
index <HASH>..<HASH> 100644
--- a/core/test/utils/index.js
+++ b/core/test/utils/index.js
@@ -550,6 +550,10 @@ login = function login(request) {
client_id: 'ghost-admin',
client_secret: 'not_available'
}).then(function then(res) {
+ if (res.statusCode !== 200) {
+ return reject(res.body);
+ }
+
resolve(res.body.access_token);
}, reject);
});
|
fix: error handling when login via test env (#<I>)
no issue
- When you choose a non existent user (email+pwd) for login via the test env, no error was shown.
|
TryGhost_Ghost
|
train
|
js
|
ab97e8bf9ad3cf0d89a08e53dae972e99488d27f
|
diff --git a/scripts/clean.js b/scripts/clean.js
index <HASH>..<HASH> 100644
--- a/scripts/clean.js
+++ b/scripts/clean.js
@@ -8,6 +8,9 @@ const files = fs.readdirSync(root('modules'))
const promises = Promise.all(
files.map(file => new Promise((resolve, reject) => {
+ if (!fs.existsSync(root(file))) {
+ return resolve()
+ }
try {
fs.unlinkSync(root(file))
resolve()
|
fix: clean task fails silently (#<I>)
|
ReactTraining_react-router
|
train
|
js
|
bfcb37bd3c56cb418c7bfdb5e14f4c1572d9b0aa
|
diff --git a/scripts/release.js b/scripts/release.js
index <HASH>..<HASH> 100644
--- a/scripts/release.js
+++ b/scripts/release.js
@@ -11,6 +11,7 @@ sade('release', true)
.describe('Release a version')
.option('--canary', 'Release the last commit without a tag')
.option('--no-commit', 'Release the current version as-is')
+ .option('--no-clean', 'Skip "yarn clean" for faster publishing')
.action(opts => {
process.chdir(path.dirname(__dirname))
return opts.canary ? publishCanary(opts) : publish()
@@ -49,7 +50,7 @@ async function publishCanary(opts) {
version = `${version}-canary.${pr}.${build}.${commit}`
exec(`${lernaBin} version ${version} --yes`)
- updateLockfile()
+ updateLockfile(opts)
}
// Publish the canary with a temporary tag.
@@ -57,9 +58,9 @@ async function publishCanary(opts) {
exec(`${lernaBin} exec -- ${publishCmd}`)
}
-function updateLockfile() {
+function updateLockfile(opts = {}) {
// Ensure "yarn.lock" is up-to-date.
- exec(`yarn clean`)
+ if (opts.clean !== false) exec(`yarn clean`)
exec(`yarn --force`)
// Merge the "yarn.lock" changes into the version commit.
|
chore: add --no-clean to "yarn release"
|
react-spring_react-spring
|
train
|
js
|
afc4f445d22b13cdf3ae467763ec463d7f59b2c6
|
diff --git a/core/src/elements/ons-card.js b/core/src/elements/ons-card.js
index <HASH>..<HASH> 100644
--- a/core/src/elements/ons-card.js
+++ b/core/src/elements/ons-card.js
@@ -17,7 +17,7 @@ limitations under the License.
import autoStyle from '../ons/autostyle';
import ModifierUtil from '../ons/internal/modifier-util';
-import BaseElement from '../ons/base-element';
+import BaseElement from './base/base-element';
const defaultClassName = 'card';
const scheme = {'': 'card--*'};
|
fix(ons-card): Correct base element path.
|
OnsenUI_OnsenUI
|
train
|
js
|
bcfd372fee9619218d2ec928cf25bc897aadf3d9
|
diff --git a/wandb/util.py b/wandb/util.py
index <HASH>..<HASH> 100644
--- a/wandb/util.py
+++ b/wandb/util.py
@@ -287,6 +287,10 @@ def is_pytorch_tensor_typename(typename):
)
+def is_fastai_tensor_typename(typename):
+ return typename.startswith("fastai.") and ("Tensor" in typename)
+
+
def is_pandas_data_frame_typename(typename):
return typename.startswith("pandas.") and "DataFrame" in typename
@@ -382,7 +386,7 @@ def json_friendly(obj):
obj = obj.eval()
except RuntimeError:
obj = obj.numpy()
- elif is_pytorch_tensor_typename(typename):
+ elif is_pytorch_tensor_typename(typename) or is_fastai_tensor_typename(typename):
try:
if obj.requires_grad:
obj = obj.detach()
|
fix: detect fastai tensor (#<I>)
|
wandb_client
|
train
|
py
|
a46bd2d45c50499dac41bd19d6c2fa4ad3d93d98
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -125,7 +125,7 @@ module.exports = function(args, callback, settings){
concurrentUp();
jwt.authorize(function(err, result){
concurrentDown();
- fs.writeFile(sessionFile, JSON.stringify(result));
+ fs.writeFileSync(sessionFile, JSON.stringify(result));
authCallback.apply(this, arguments);
});
});
|
fix: use writeFileSync for compatibility with NodeJs <I>.x
|
jsguy_ga-api
|
train
|
js
|
b3ec2516b8535ab2d4214f06ddc4a1174afb66af
|
diff --git a/onepy/onepy.py b/onepy/onepy.py
index <HASH>..<HASH> 100644
--- a/onepy/onepy.py
+++ b/onepy/onepy.py
@@ -1,12 +1,18 @@
from .onmanager import ONProcess
from xml.etree import cElementTree
+import os
+
+# Check for the existing of ON_COM32_VERSION environment variable,
+# Default value is set to 15
+# Existing value 14 may be used
+ON_COM32_VERSION = os.environ.get("ON_COM32_VERSION", 15)
namespace = ""
class OneNote():
- def __init__(self):
- self.process = ONProcess()
+ def __init__(self,version=int(ON_COM32_VERSION)):
+ self.process = ONProcess(version=version)
global namespace
namespace = self.process.namespace
self.object_tree = cElementTree.fromstring(self.process.get_hierarchy("",4))
|
feat(on_verison): use ON_COM<I>_VERSION envt var to switch easily between ON version
|
varunsrin_one-py
|
train
|
py
|
41ecb3157ba13639866f9815e5629b7c24bcdde6
|
diff --git a/src/Common/Service/Output.php b/src/Common/Service/Output.php
index <HASH>..<HASH> 100644
--- a/src/Common/Service/Output.php
+++ b/src/Common/Service/Output.php
@@ -13,10 +13,13 @@
namespace Nails\Common\Service;
+use Nails\Factory;
+
class Output
{
/**
* The CodeIgniter Output object
+ *
* @var \CI_Output
*/
private $oOutput;
@@ -30,6 +33,20 @@ class Output
{
$oCi = get_instance();
$this->oOutput = $oCi->output;
+
+ // --------------------------------------------------------------------------
+
+ // If a display method has been defined, configure CodeIgniter to use it
+ if (method_exists($this, 'display')) {
+ get_instance()->hooks->addHook(
+ 'display_override',
+ [
+ 'classref' => $this,
+ 'method' => 'display',
+ 'params' => [],
+ ]
+ );
+ }
}
// --------------------------------------------------------------------------
|
feat: Detecting display methoid and adding a hook
This is so we don't need to use the hooks config file
|
nails_common
|
train
|
php
|
59cf02a1c7b8a873a50d0a67bf5891bede4a0c99
|
diff --git a/packages/storybook-addon-theme/__mocks__/index.js b/packages/storybook-addon-theme/__mocks__/index.js
index <HASH>..<HASH> 100644
--- a/packages/storybook-addon-theme/__mocks__/index.js
+++ b/packages/storybook-addon-theme/__mocks__/index.js
@@ -2,5 +2,4 @@ var React = require('react')
const MockTheme = props => React.createElement(React.Fragment, props)
-module.exports = () => storyFn =>
- React.createElement(MockTheme, null, storyFn())
+module.exports = storyFn => React.createElement(MockTheme, null, storyFn())
|
fix(storybook-addon-theme): update mock
|
pluralsight_design-system
|
train
|
js
|
faff50fecff6e98b2bc1929197307f3b8c73e251
|
diff --git a/packages/taro-async-await/index.js b/packages/taro-async-await/index.js
index <HASH>..<HASH> 100644
--- a/packages/taro-async-await/index.js
+++ b/packages/taro-async-await/index.js
@@ -1,5 +1,5 @@
-const global = typeof window !== 'undefined' && window.Math === Math
-? window : typeof self !== 'undefined' && self.Math === Math ? self : this
+const global = typeof window !== 'undefined' &&
+window.Math === Math ? window : typeof self !== 'undefined' && self.Math === Math ? self : this
global.Promise = require('promise-polyfill')
global.regeneratorRuntime = require('regenerator-runtime/runtime')
|
fix(async-await): 代码错误
|
NervJS_taro
|
train
|
js
|
2c57ff524808baadf579e3a521197c42c84b9e4e
|
diff --git a/packages/razzle/scripts/start.js b/packages/razzle/scripts/start.js
index <HASH>..<HASH> 100755
--- a/packages/razzle/scripts/start.js
+++ b/packages/razzle/scripts/start.js
@@ -64,7 +64,7 @@ function main() {
// Delete assets.json to always have a manifest up to date
fs.removeSync(paths.appAssetsManifest);
- const clientCompiler = compile(clientConfig);
+ const clientCompiler = compile(clientConfig, verbose);
let serverCompiler;
let serverConfig;
@@ -79,7 +79,7 @@ function main() {
plugins,
razzleOptions
);
- serverCompiler = compile(serverConfig);
+ serverCompiler = compile(serverConfig, verbose);
}
const port = razzle.port || clientConfig.devServer.port;
@@ -143,7 +143,7 @@ function main() {
}
// Webpack compile in a try-catch
-function compile(config) {
+function compile(config, verbose) {
let compiler;
try {
compiler = webpack(config);
|
fix(razzle): pass verbose down to compile
|
jaredpalmer_razzle
|
train
|
js
|
ba7cf903155ccf87d953ccdc823091438f7190f7
|
diff --git a/initialize/manage_etc_hosts.go b/initialize/manage_etc_hosts.go
index <HASH>..<HASH> 100644
--- a/initialize/manage_etc_hosts.go
+++ b/initialize/manage_etc_hosts.go
@@ -22,7 +22,7 @@ func generateEtcHosts(option string) (out string, err error) {
return "", err
}
- return fmt.Sprintf("%s %s", DefaultIpv4Address, hostname), nil
+ return fmt.Sprintf("%s %s\n", DefaultIpv4Address, hostname), nil
}
diff --git a/initialize/manage_etc_hosts_test.go b/initialize/manage_etc_hosts_test.go
index <HASH>..<HASH> 100644
--- a/initialize/manage_etc_hosts_test.go
+++ b/initialize/manage_etc_hosts_test.go
@@ -68,7 +68,7 @@ func TestEtcHostsWrittenToDisk(t *testing.T) {
t.Fatalf("Unable to read OS hostname: %v", err)
}
- expect := fmt.Sprintf("%s %s", DefaultIpv4Address, hostname)
+ expect := fmt.Sprintf("%s %s\n", DefaultIpv4Address, hostname)
if string(contents) != expect {
t.Fatalf("File has incorrect contents")
|
fix(manage_etc_hosts): Append newline to /etc/hosts
|
coreos_coreos-cloudinit
|
train
|
go,go
|
ff70acc983119d344007a5759dce8c6ae17c8498
|
diff --git a/test/z-integration.js b/test/z-integration.js
index <HASH>..<HASH> 100644
--- a/test/z-integration.js
+++ b/test/z-integration.js
@@ -21,11 +21,13 @@ describe('Integrations', function () {
})
client.call('s', 'hello', function (err, result) {
- if (err) {
- // appease eslint
- }
- countCalled++
- throw Error('oops')
+ return new Promise(function (resolve, reject) {
+ if (err) {
+ // appease eslint
+ }
+ countCalled++
+ throw Error('oops')
+ })
})
setTimeout(function () {
|
test: return promise to handle thrown error
|
hudson-taylor_hudson-taylor
|
train
|
js
|
b20ea72f59df8fd92306edce50a3abec93187f21
|
diff --git a/gulp-tasks/build-data.js b/gulp-tasks/build-data.js
index <HASH>..<HASH> 100644
--- a/gulp-tasks/build-data.js
+++ b/gulp-tasks/build-data.js
@@ -33,7 +33,7 @@ module.exports = () => readFilePromisified(`./dist/carbon-icons.svg`, { 'encodin
})(this, function () {
var icons = ${stringified};
function camelCaseFromHyphnated(s) {
- return s.replace(/\-+([A-z])/g, (match, token) => token.toUpperCase());
+ return s.replace(/\-+([A-z])/g, function (match, token) { return token.toUpperCase(); });
}
icons.forEach(function (item, i) {
icons[camelCaseFromHyphnated(item.id)] = icons[i];
|
fix(build): removed arrow funcion from carbon-icons.js (#<I>)
|
carbon-design-system_carbon-icons
|
train
|
js
|
ec6cd7c1646395c8136c346b646d5d2f8fcba8ea
|
diff --git a/packages/webiny-app-forms/src/admin/components/FormEditor/Context/graphql.js b/packages/webiny-app-forms/src/admin/components/FormEditor/Context/graphql.js
index <HASH>..<HASH> 100644
--- a/packages/webiny-app-forms/src/admin/components/FormEditor/Context/graphql.js
+++ b/packages/webiny-app-forms/src/admin/components/FormEditor/Context/graphql.js
@@ -32,12 +32,14 @@ const SETTINGS_FIELDS = /* GraphQL */ `
renderer
}
successMessage {
+ value
values {
locale
value
}
}
submitButtonLabel {
+ value
values {
locale
value
|
fix: include I<I>N value in form settings
|
Webiny_webiny-js
|
train
|
js
|
656e7a853147e3322d1b888ad9cab8cc0afa3a52
|
diff --git a/master/buildbot/test/integration/test_try_client_e2e.py b/master/buildbot/test/integration/test_try_client_e2e.py
index <HASH>..<HASH> 100644
--- a/master/buildbot/test/integration/test_try_client_e2e.py
+++ b/master/buildbot/test/integration/test_try_client_e2e.py
@@ -32,7 +32,7 @@ class TryClientE2E(RunMasterBase):
def trigger_callback():
def thd():
- os.system("buildbot try --connect=pb --master=127.0.0.1:8031 -b testy "
+ os.system("buildbot try --connect=pb --master=127.0.0.1:8030 -b testy "
"--property=foo:bar --username=alice --passwd=pw1 --vc=none")
reactor.callInThread(thd)
@@ -51,7 +51,7 @@ def masterConfig():
c['schedulers'] = [
schedulers.Try_Userpass(name="try",
builderNames=["testy"],
- port=8031,
+ port=8030,
userpass=[("alice", "pw1")])
]
f = BuildFactory()
|
test: Don't reuse same ports as in default try scheduler configuration
|
buildbot_buildbot
|
train
|
py
|
0c041725129a7c8bd874b90f18e240d8aff777e6
|
diff --git a/packages/razzle/config/createConfigAsync.js b/packages/razzle/config/createConfigAsync.js
index <HASH>..<HASH> 100644
--- a/packages/razzle/config/createConfigAsync.js
+++ b/packages/razzle/config/createConfigAsync.js
@@ -393,7 +393,7 @@ module.exports = (
const entries = [...entrypoints];
const entryArrayManifest = entries.reduce((acc, entry) => {
const name =
- (entry.options || {}).name || (entry.runtimeChunk || {}).name;
+ (entry.options || {}).name || (entry.runtimeChunk || {}).name || entry.id;
const files = []
.concat(
...(entry.chunks || []).map(chunk =>
|
fix(razzle): manifest chunk name fallback to entry.id
|
jaredpalmer_razzle
|
train
|
js
|
493e804320ff037438ed5df07e7001d3aa4698a3
|
diff --git a/superset/datasets/commands/importers/v1/utils.py b/superset/datasets/commands/importers/v1/utils.py
index <HASH>..<HASH> 100644
--- a/superset/datasets/commands/importers/v1/utils.py
+++ b/superset/datasets/commands/importers/v1/utils.py
@@ -125,6 +125,7 @@ def import_dataset(
table_exists = True
if data_uri and (not table_exists or force_data):
+ logger.info("Downloading data from %s", data_uri)
load_data(data_uri, dataset, example_database, session)
if hasattr(g, "user") and g.user:
|
chore: log URI before downloading data on import (#<I>)
|
apache_incubator-superset
|
train
|
py
|
89087fdbcd1af09fa992971b8bbd9dc2163beb7f
|
diff --git a/tasks/reporters/event-reporter.js b/tasks/reporters/event-reporter.js
index <HASH>..<HASH> 100644
--- a/tasks/reporters/event-reporter.js
+++ b/tasks/reporters/event-reporter.js
@@ -1,3 +1,12 @@
+/*
+ A reporter that broadcasts data the aggregated
+ by grunt-complexity over the grunt event-bus.
+
+ author: David Linse
+ version: 0.0.1
+ license: MIT
+ */
+
module.exports = function(grunt) {
'use strict';
|
docs: add some initial documentation to reporter
|
vigetlabs_grunt-complexity
|
train
|
js
|
f2cc9524117fd182edad9a5eff29919763011726
|
diff --git a/lib/workers.js b/lib/workers.js
index <HASH>..<HASH> 100644
--- a/lib/workers.js
+++ b/lib/workers.js
@@ -30,6 +30,7 @@ const defaultOptions = {
* @param customOptions.workerId
* @param customOptions.maxTasks
* @param customOptions.interval
+ * @param customOptions.asyncResponseTimeout
* @constructor
*/
class Workers extends events {
@@ -113,8 +114,12 @@ class Workers extends events {
const self = this;
const workers = this.workers;
const engineClient = this.engineClient;
- const { maxTasks, interval } = this.options;
- const pollingOptions = { maxTasks };
+ const { maxTasks, interval, asyncResponseTimeout } = this.options;
+
+ let pollingOptions = { maxTasks };
+ if (asyncResponseTimeout) {
+ pollingOptions = { ...pollingOptions, asyncResponseTimeout };
+ }
this.emit('poll:start');
@@ -175,7 +180,7 @@ class Workers extends events {
// Add topic to workers with the related callback fkt and lockduration
workers[topic] = worker;
- this.emit('worker:register:success', worker);
+ this.emit('worker:register:success', topic, worker);
return worker;
}
|
feat(longPolling): I can set asyncResponseTimeout
Related to CAM-<I>
|
camunda_camunda-external-task-client-js
|
train
|
js
|
28a1188304dd123500a37ee8d4bd54534ffe3704
|
diff --git a/src/components/icon/QIcon.js b/src/components/icon/QIcon.js
index <HASH>..<HASH> 100644
--- a/src/components/icon/QIcon.js
+++ b/src/components/icon/QIcon.js
@@ -34,12 +34,6 @@ export default {
else if (icon.startsWith('ion-') || icon.startsWith('icon-')) {
cls = `${icon}`
}
- else if (icon.startsWith('ion4-')) {
- if (!ctx.children) {
- ctx.children = []
- }
- ctx.children.push(h('ion-icon', {attrs: {name: icon.substr(5)}}))
- }
else if (icon.startsWith('mdi-')) {
cls = `mdi ${icon}`
}
|
fix: Build. Temporary remove ion-icon 4 support
|
quasarframework_quasar
|
train
|
js
|
e24e9d47f6e10421e93c2846e4a6aaea95b1d72d
|
diff --git a/src/database/seeds/ScheduleSeeder.php b/src/database/seeds/ScheduleSeeder.php
index <HASH>..<HASH> 100644
--- a/src/database/seeds/ScheduleSeeder.php
+++ b/src/database/seeds/ScheduleSeeder.php
@@ -86,7 +86,7 @@ class ScheduleSeeder extends Seeder
],
[ // Character Affiliation | Every two hours
'command' => 'esi:update:affiliations',
- 'expression' => '* */2 * * *',
+ 'expression' => '0 */2 * * *',
'allow_overlap' => false,
'allow_maintenance' => false,
'ping_before' => null,
@@ -149,6 +149,22 @@ class ScheduleSeeder extends Seeder
*/
public function run()
{
+ //
+ // drop SeAT 3.x deprecated commands
+ //
+ DB::table('schedules')->where('command', 'alerts:run')->delete();
+ DB::table('schedules')->where('command', 'esi:update:serverstatus')->delete();
+ DB::table('schedules')->where('command', 'esi:update:esistatus')->delete();
+
+ //
+ // fix SeAT 4 released schedules
+ //
+ DB::table('schedules')
+ ->where('command', 'esi:update:affiliations')
+ ->where('expression', '* */2 * * *')
+ ->update([
+ 'expression' => '0 */2 * * *',
+ ]);
// Check if we have the schedules, else,
// insert them
|
refactor(scheduler): update character:update:affiliations timing
|
eveseat_console
|
train
|
php
|
0d3f8d81b67b2c10f536f4d560a9f8043296ac29
|
diff --git a/covador/types.py b/covador/types.py
index <HASH>..<HASH> 100644
--- a/covador/types.py
+++ b/covador/types.py
@@ -29,6 +29,8 @@ class item(object):
self.empty_is_none = empty_is_none
self.__dict__.update(kwargs)
self.typ = typ and wrap_type(typ)
+ if multi and self.typ:
+ self.typ = List(self.typ)
self.pipe = []
def clone(self):
diff --git a/tests/test_types.py b/tests/test_types.py
index <HASH>..<HASH> 100644
--- a/tests/test_types.py
+++ b/tests/test_types.py
@@ -200,8 +200,8 @@ def test_length():
def test_multi_map():
- s = ListMap({'foo': int, 'boo': item(multi=True)})
- result = s({'foo': ['10'], 'boo': [1, 2]})
+ s = ListMap({'foo': int, 'boo': item(int, multi=True)})
+ result = s({'foo': ['10'], 'boo': [1, '2']})
assert result == {'foo': 10, 'boo': [1, 2]}
|
fix: ensure List validator for items with multi=True
|
baverman_covador
|
train
|
py,py
|
62e1a509769d2e3f3b25c12969bd813282d148aa
|
diff --git a/src/commands/resetIndex.js b/src/commands/resetIndex.js
index <HASH>..<HASH> 100644
--- a/src/commands/resetIndex.js
+++ b/src/commands/resetIndex.js
@@ -4,6 +4,7 @@ import { GitIndexManager } from '../managers/GitIndexManager.js'
import { GitObjectManager } from '../managers/GitObjectManager.js'
import { GitRefManager } from '../managers/GitRefManager.js'
import { FileSystem } from '../models/FileSystem.js'
+import { cores } from '../utils/plugins.js'
import { readObject } from './readObject'
@@ -13,9 +14,10 @@ import { readObject } from './readObject'
* @link https://isomorphic-git.github.io/docs/resetIndex.html
*/
export async function resetIndex ({
+ core = 'default',
dir,
gitdir = path.join(dir, '.git'),
- fs: _fs,
+ fs: _fs = cores.get(core).get('fs'),
filepath,
ref = 'HEAD'
}) {
|
fix: add 'fs' plugin compatibility to "resetIndex" command (#<I>)
|
isomorphic-git_isomorphic-git
|
train
|
js
|
d96129e30bef80138ae838e7096dc160abd480c1
|
diff --git a/src/main/java/com/optimaize/langdetect/LanguageDetectorImpl.java b/src/main/java/com/optimaize/langdetect/LanguageDetectorImpl.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/optimaize/langdetect/LanguageDetectorImpl.java
+++ b/src/main/java/com/optimaize/langdetect/LanguageDetectorImpl.java
@@ -229,7 +229,7 @@ public final class LanguageDetectorImpl implements LanguageDetector {
}
}
for (int i=0; i<prob.length; ++i) {
- prob[i] *= Math.pow(weight + langProbMap[i], 1);
+ prob[i] *= Math.pow(weight + langProbMap[i], count);
}
return true;
}
|
fix: use count rather than 1 as an exponent
|
optimaize_language-detector
|
train
|
java
|
1bc561a27ca989a5b198d853617c07675866c290
|
diff --git a/CHANGELOG.md b/CHANGELOG.md
index <HASH>..<HASH> 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -42,6 +42,7 @@
- Fix Slider throws error if initialized with no slides
- Fix Slider/Slideshow crash in IE
- Fix Slider/Slideshow drag no longer starts on input elements
+- Fix Slider/Slideshow Parallax shows wrong initial state
- Fix `isPlainObject` to work across iframes
- Fix Scrollspy causes endless update loop
diff --git a/src/js/components/slider.js b/src/js/components/slider.js
index <HASH>..<HASH> 100644
--- a/src/js/components/slider.js
+++ b/src/js/components/slider.js
@@ -123,7 +123,7 @@ export default {
});
if (this.length && !this.dragging && !this.stack.length) {
- this._getTransitioner().translate(1);
+ this._translate(1);
}
},
diff --git a/src/js/mixin/slider.js b/src/js/mixin/slider.js
index <HASH>..<HASH> 100644
--- a/src/js/mixin/slider.js
+++ b/src/js/mixin/slider.js
@@ -184,7 +184,7 @@ export default {
);
if (!force && !prev) {
- this._transitioner.translate(1);
+ this._translate(1);
return Promise.resolve();
}
|
fix: Slider/Slideshow Parallax shows wrong initial state
Resolves #<I>
|
uikit_uikit
|
train
|
md,js,js
|
9c53bea910a3c71e5eb51903b21499f6f1b7a032
|
diff --git a/alot/helper.py b/alot/helper.py
index <HASH>..<HASH> 100644
--- a/alot/helper.py
+++ b/alot/helper.py
@@ -6,6 +6,7 @@ from string import strip
import subprocess
import email
import os
+import re
from email.mime.audio import MIMEAudio
from email.mime.base import MIMEBase
from email.mime.image import MIMEImage
@@ -338,9 +339,14 @@ def guess_mimetype(blob):
:returns: mime-type, falls back to 'application/octet-stream'
:rtype: str
"""
+ mimetype = 'application/octet-stream'
m = magic.open(magic.MAGIC_MIME_TYPE)
m.load()
- return m.buffer(blob) or 'application/octet-stream'
+ magictype = m.buffer(blob)
+ # libmagic does not always return proper mimetype strings, cf. issue #459
+ if re.match(r'\w+\/\w+', magictype):
+ mimetype = magictype
+ return mimetype
def guess_encoding(blob):
|
fix: sanity check libmagics return values
.. when guessing mimetypes. It turns out that it does
not always return proper 'type/subtype' strings.
This makes helper.guess_mime_type default to 'application/octett'
in those cases.
cf. issue #<I>
|
pazz_alot
|
train
|
py
|
c2995b5da0afbc2fc214bf444ee82849d2efc5f1
|
diff --git a/lib/html2rss/utils.rb b/lib/html2rss/utils.rb
index <HASH>..<HASH> 100644
--- a/lib/html2rss/utils.rb
+++ b/lib/html2rss/utils.rb
@@ -69,13 +69,14 @@ module Html2rss
# Allows override of time zone locally inside supplied block; resets previous time zone when done.
#
# @param time_zone [String]
+ # @param default_time_zone [String]
# @return whatever the given block returns
- def self.use_zone(time_zone)
+ def self.use_zone(time_zone, default_time_zone: Time.now.getlocal.zone)
raise ArgumentError, 'a block is required' unless block_given?
time_zone = TZInfo::Timezone.get(time_zone)
- prev_tz = ENV['TZ']
+ prev_tz = ENV.fetch('TZ', default_time_zone)
ENV['TZ'] = time_zone.name
yield
ensure
|
fix(utils): fall back to local time zone if ENV['TZ'] is not present
|
gildesmarais_html2rss
|
train
|
rb
|
0849dab2cf6c1842197f3878070e59b730ca160f
|
diff --git a/src/geshi/java5.php b/src/geshi/java5.php
index <HASH>..<HASH> 100644
--- a/src/geshi/java5.php
+++ b/src/geshi/java5.php
@@ -1028,6 +1028,7 @@ $language_data = array (
),
'PARSER_CONTROL' => array(
'KEYWORDS' => array(
+ 'DISALLOWED_BEFORE' => '(?<![a-zA-Z0-9\$_\|\#>|^&"\'])',
'DISALLOWED_AFTER' => '(?![a-zA-Z0-9_\|%\\-;"\'])'
)
)
|
fix: Missing Whitelist for ; before keywords in Java5
|
GeSHi_geshi-1.0
|
train
|
php
|
3cc9d1358a160086a9ee258097d0e2e960f97389
|
diff --git a/karma.conf.js b/karma.conf.js
index <HASH>..<HASH> 100644
--- a/karma.conf.js
+++ b/karma.conf.js
@@ -71,10 +71,6 @@ module.exports = function(config) {
browsers: ['ChromeHeadless', 'ChromeHeadlessNoSandbox'],
customLaunchers: {
- Chrome_travis_ci: {
- base: 'Chrome',
- flags: ['--no-sandbox']
- },
ChromeHeadlessNoSandbox: {
base: 'ChromeHeadless',
flags: ['--no-sandbox']
|
chore: Remove travis chrome custom launcher
|
deshiknaves_caret-pos
|
train
|
js
|
7148e1b24e5b56a9558277cb2eb7550b72a451e0
|
diff --git a/pipes/configs/prepare_configs.py b/pipes/configs/prepare_configs.py
index <HASH>..<HASH> 100644
--- a/pipes/configs/prepare_configs.py
+++ b/pipes/configs/prepare_configs.py
@@ -37,9 +37,15 @@ def append_variables(app_configs=None, out_file=''):
env=env,
resource=resource,
app_property=app_property).upper()
- line = '{variable}={value}'.format(
- variable=variable,
- value=json.dumps(value))
+
+ raw_value = json.dumps(value)
+ if isinstance(value, dict):
+ safe_value = "'{0}'".format(raw_value)
+ else:
+ safe_value = raw_value
+
+ line = "{variable}={value}".format(variable=variable,
+ value=safe_value)
LOG.debug('INI line: %s', line)
|
fix: Add single quotes around JSON objects
See also: PSOBAT-<I>
|
foremast_foremast
|
train
|
py
|
d4ce48f3bc705edeab6a019b857ed4ffd2b37f77
|
diff --git a/app/lib/konnectors.js b/app/lib/konnectors.js
index <HASH>..<HASH> 100644
--- a/app/lib/konnectors.js
+++ b/app/lib/konnectors.js
@@ -89,7 +89,7 @@ export function run (cozy, slug, accountId, folderId, timeout = 120 * 1000) {
}
})
})
- // .then(job => waitForJobFinished(cozy, job, timeout))
+ .then(job => waitForJobFinished(cozy, job, timeout))
}
// monitor the status of the connector and resolve when the connector is ready
|
fix: uncomment code to fix Travis build :ambulance:
|
cozy_cozy-home
|
train
|
js
|
7ae9854a31b62cf56ef5dd3cce55836fd70b0adb
|
diff --git a/packages/tree-view/src/behaviors/TreeViewBehavior.js b/packages/tree-view/src/behaviors/TreeViewBehavior.js
index <HASH>..<HASH> 100644
--- a/packages/tree-view/src/behaviors/TreeViewBehavior.js
+++ b/packages/tree-view/src/behaviors/TreeViewBehavior.js
@@ -60,7 +60,7 @@ export default class TreeViewBehavior extends Component {
id: PropTypes.number,
parentId: PropTypes.number,
meta: PropTypes.shape({
- label: PropTypes.string,
+ label: PropTypes.node,
collapsed: PropTypes.bool,
active: PropTypes.bool,
icon: PropTypes.node
|
refactor: tree-view behavior label prop type
|
Autodesk_hig
|
train
|
js
|
c6976650d6db9ff84fb1b07d407c18f0ada177fe
|
diff --git a/src/Session/Drivers/Redis/index.js b/src/Session/Drivers/Redis/index.js
index <HASH>..<HASH> 100644
--- a/src/Session/Drivers/Redis/index.js
+++ b/src/Session/Drivers/Redis/index.js
@@ -29,7 +29,7 @@ class Redis {
*/
constructor (Helpers, Config, RedisFactory) {
const redisConfig = Config.get('session.redis')
- this.ttl = Config.get('session.age')
+ this.ttl = Config.get('session.age', 120) * 60 // converting to seconds
this.redis = new RedisFactory(redisConfig, Helpers, false) // do not use cluster for sessions
}
|
fix(session): convert session age minutes to seconds
redis takes ttl in seconds, so we convert config minutes to seconds
Closes #<I>
|
adonisjs_adonis-framework
|
train
|
js
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.