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
dac0d7150fcc29d48a620681818b803c277f5e3d
diff --git a/lib/holepicker/online_database.rb b/lib/holepicker/online_database.rb index <HASH>..<HASH> 100644 --- a/lib/holepicker/online_database.rb +++ b/lib/holepicker/online_database.rb @@ -1,14 +1,13 @@ require 'holepicker/database' require 'holepicker/logger' require 'holepicker/utils' -require 'net/http' -require 'net/https' +require 'open-uri' module HolePicker class OnlineDatabase < Database include HasLogger - URL = 'https://raw.github.com/jsuder/holepicker/master/lib/holepicker/data/data.json' + URL = 'https://raw.githubusercontent.com/jsuder/holepicker/master/lib/holepicker/data/data.json' def self.load logger.info "Fetching list of vulnerabilities..." @@ -32,12 +31,7 @@ module HolePicker private def self.http_get(url) - uri = URI(url) - http = Net::HTTP.new(uri.host, uri.port) - http.use_ssl = url.start_with?('https') - - response = http.get(uri.request_uri) - response.body + open(url).read end def check_compatibility
fix: new domain for github raw data + follow redirect to avoid further issues
mackuba_holepicker
train
rb
84bb7b8119612be3e94dfdd440bfbe2437c65b74
diff --git a/lib/rules/rules.js b/lib/rules/rules.js index <HASH>..<HASH> 100644 --- a/lib/rules/rules.js +++ b/lib/rules/rules.js @@ -72,6 +72,7 @@ var CONTROL_RE = /[\u001e\u001f\u200e\u200f\u200d\u200c\u202a\u202d\u202e\u202c\ var HTTP_PROXY_RE = /^x?(?:proxy|http-proxy|http2https-proxy|https2http-proxy|internal-proxy|internal-https?-proxy):\/\//; var ENABLE_PROXY_RE = /\bproxy(?:Host|First|Tunnel)|clientId|multiClient|singleClient\b/i; var PLUGIN_VAR_RE = /^%([a-z\d_\-]+)=([^\s]*)/; +var MAX_VAR_LEN = 20; function filterHttpProxy(rule) { return HTTP_PROXY_RE.test(rule.matcher); @@ -1377,7 +1378,7 @@ function parseText(rulesMgr, text, root) { if (!vars) { vars = [value]; pluginVars[name] = vars; - } else if (vars.length < 10) { + } else if (vars.length < MAX_VAR_LEN) { vars.push(value); } }
refactor: enlarge max length of plugin vars
avwo_whistle
train
js
6207dd97c3fb6e1d6738197624bf218e45ddfa41
diff --git a/packages/@vue/cli-plugin-eslint/generator/index.js b/packages/@vue/cli-plugin-eslint/generator/index.js index <HASH>..<HASH> 100644 --- a/packages/@vue/cli-plugin-eslint/generator/index.js +++ b/packages/@vue/cli-plugin-eslint/generator/index.js @@ -56,7 +56,9 @@ module.exports = (api, { config, lintOn = [] }, _, invoking) => { } else if (config === 'prettier') { eslintConfig.extends.push('@vue/prettier') Object.assign(pkg.devDependencies, { - '@vue/eslint-config-prettier': '^4.0.1' + '@vue/eslint-config-prettier': '^5.0.0', + 'eslint-plugin-prettier': '^3.1.0', + prettier: '^1.18.2' }) // prettier & default config do not have any style rules // so no need to generate an editorconfig file
feat(eslint-generator): upgrade @vue/eslint-config-prettier to <I> (#<I>) This only affects newly generated projects so it's not considered a breaking change. Fixes #<I>
vuejs_vue-cli
train
js
2de83c9d4af63504dea3b4f048018dbd0d23fbf1
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -14,5 +14,5 @@ export default { navigate(href) { navigate(href) - } + }, }
fix: add missing trailing comma
cignium_hypermedia-client
train
js
d2e5a8f62d6110609eb6083b79063a345985b738
diff --git a/tests/unit/AppTest.php b/tests/unit/AppTest.php index <HASH>..<HASH> 100644 --- a/tests/unit/AppTest.php +++ b/tests/unit/AppTest.php @@ -27,6 +27,8 @@ class AppTest extends \Codeception\Test\Unit $app = new App($config, new Debug()); $config->routeStorageData = require dirname(__DIR__) . '/_data/RouteStorageData.php'; $config->widgetsStorageData = require dirname(__DIR__) . '/_data/WidgetsStorageData.php'; + $config->templatesPath = dirname(__DIR__) . '/integration/templates'; + $config->templatesDefault = ''; $_GET['path'] = '/qwe/asd'; $result = $app->compose($app->parse($app->getPath()));
fix: tests for App, pointed to tests template for callback test
enikeishik_ufoframework
train
php
50d17d154ec38ca01a089b06966a11b16add8d95
diff --git a/src/foremast/utils/lookups.py b/src/foremast/utils/lookups.py index <HASH>..<HASH> 100644 --- a/src/foremast/utils/lookups.py +++ b/src/foremast/utils/lookups.py @@ -59,7 +59,7 @@ def ami_lookup(region='us-east-1', name='tomcat8'): def _get_ami_file(region='us-east-1'): - """Helper function to get file from Gitlab.""" + """Get file from Gitlab.""" LOG.info("Getting AMI from Gitlab") server = gitlab.Gitlab(GIT_URL, private_token=GITLAB_TOKEN, api_version=4) project = server.projects.get('devops/ansible') @@ -71,7 +71,7 @@ def _get_ami_file(region='us-east-1'): def _get_ami_json(json_url): - """Helper function to get ami from a web url.""" + """Get ami from a web url.""" LOG.info("Getting AMI from %s", json_url) response = requests.get(json_url) assert response.ok, "Error getting ami info from {}".format(json_url) @@ -94,6 +94,7 @@ class FileLookup(): """ def __init__(self, git_short='', runway_dir=''): + """Init.""" self.git_short = git_short self.runway_dir = os.path.expandvars(os.path.expanduser(runway_dir))
docs: Update docstrings
foremast_foremast
train
py
f75388259262bf6b4a64375b97800bd72378f3bc
diff --git a/packages/discord.js/src/index.js b/packages/discord.js/src/index.js index <HASH>..<HASH> 100644 --- a/packages/discord.js/src/index.js +++ b/packages/discord.js/src/index.js @@ -158,7 +158,7 @@ exports.WebSocket = require('./WebSocket'); // External exports.ActivityType = require('discord-api-types/v9').ActivityType; -exports.ApplicationCommandType = require('discord-api-types/v9').ApplicationCommandOptionType; +exports.ApplicationCommandType = require('discord-api-types/v9').ApplicationCommandType; exports.ApplicationCommandOptionType = require('discord-api-types/v9').ApplicationCommandOptionType; exports.ApplicationCommandPermissionType = require('discord-api-types/v9').ApplicationCommandPermissionType; exports.ButtonStyle = require('discord-api-types/v9').ButtonStyle;
fix(exports): export ApplicationCommandType properly (#<I>)
discordjs_discord.js
train
js
bf28508e593d570e63ab763e58aca0b0d39c55a1
diff --git a/webapps/ui/cockpit/plugins/base/app/views/dashboard/decisions.js b/webapps/ui/cockpit/plugins/base/app/views/dashboard/decisions.js index <HASH>..<HASH> 100644 --- a/webapps/ui/cockpit/plugins/base/app/views/dashboard/decisions.js +++ b/webapps/ui/cockpit/plugins/base/app/views/dashboard/decisions.js @@ -14,6 +14,9 @@ function ( label: 'Decisions', template: template, pagePath: '#/decisions', + checkActive: function (path) { + return path.indexOf('#/decision') > -1; + }, controller: [ '$scope', 'camAPI',
fix(decision-dashboard-plugin): add checkActive function Related to CAM-<I>
camunda_camunda-bpm-platform
train
js
5e0d3186bc8de4a73c14fa982e6f3b27233663b8
diff --git a/src/file.js b/src/file.js index <HASH>..<HASH> 100644 --- a/src/file.js +++ b/src/file.js @@ -2062,6 +2062,16 @@ File.prototype.rotateEncryptionKey = function(encryptionKey, callback) { * * *This is a convenience method which wraps {@link File#createWriteStream}.* * + * Resumable uploads are automatically enabled and must be shut off explicitly + * by setting `options.resumable` to `false`. + * + * <p class="notice"> + * There is some overhead when using a resumable upload that can cause + * noticeable performance degradation while uploading a series of small files. + * When uploading files less than 10MB, it is recommended that the resumable + * feature is disabled. + * </p> + * * @param {*} data The data to write to a file. * @param {object} [options] See {@link File#createWriteStream}'s `options` * parameter.
docs: add performance note to File#save. (#<I>)
googleapis_nodejs-storage
train
js
c160b681a9d3d988fbc90b2767b3f75014e604a7
diff --git a/lib/plugins/index.js b/lib/plugins/index.js index <HASH>..<HASH> 100644 --- a/lib/plugins/index.js +++ b/lib/plugins/index.js @@ -291,9 +291,6 @@ function getRules(req, port, callback) { if (req.reqId) { options.headers[REQ_ID_HEADER] = req.reqId; } - if (req.dataId) { - options.headers[DATA_ID_HEADER] = req.dataId; - } options.headers[FULL_URL_HEADER] = encodeURIComponent(req.fullUrl); options.headers[METHOD_HEADER] = encodeURIComponent(req.method || 'GET'); var nextRule = rulesMgr.resolveRule(req.fullUrl, 1); @@ -357,6 +354,9 @@ function getResRules(req, res, port, callback) { if (req.reqId) { options.headers[REQ_ID_HEADER] = req.reqId; } + if (req.dataId) { + options.headers[DATA_ID_HEADER] = req.dataId; + } options.headers[METHOD_HEADER] = encodeURIComponent(req.method || 'GET'); options.headers[LOCAL_HOST_HEADER] = encodeURIComponent(req.hostIp || LOCALHOST); options.headers[STATUS_CODE_HEADER] = encodeURIComponent(res.statusCode == null ? '' : res.statusCode + '');
refactor: Send dataId to resRulesServer of plugin
avwo_whistle
train
js
a38f93cd664fe7f04fae0af566a1ac9cdfc32975
diff --git a/web_pdb/web_console.py b/web_pdb/web_console.py index <HASH>..<HASH> 100644 --- a/web_pdb/web_console.py +++ b/web_pdb/web_console.py @@ -42,6 +42,7 @@ from .wsgi_app import app __all__ = ['WebConsole'] logger = logging.getLogger('Web-PDB') +logger.addHandler(logging.StreamHandler()) class SilentWSGIRequestHandler(WSGIRequestHandler):
fix: No handlers could be found for logger "Web-PDB"
romanvm_python-web-pdb
train
py
e1b1c639837f0ec9cf238a14fcfdb285e9790a66
diff --git a/junit-servers-core/src/main/java/com/github/mjeanroy/junit/servers/servers/EmbeddedServer.java b/junit-servers-core/src/main/java/com/github/mjeanroy/junit/servers/servers/EmbeddedServer.java index <HASH>..<HASH> 100644 --- a/junit-servers-core/src/main/java/com/github/mjeanroy/junit/servers/servers/EmbeddedServer.java +++ b/junit-servers-core/src/main/java/com/github/mjeanroy/junit/servers/servers/EmbeddedServer.java @@ -108,6 +108,11 @@ public interface EmbeddedServer<T extends AbstractConfiguration> { /** * Get server context path. * + * <p> + * + * It is not guaranteed that the returned server path here is URL encoded. If you need to query + * embedded server, use {@link #getUrl()} or {@link #getUri()}. + * * @return Server context path. */ String getPath(); @@ -115,6 +120,12 @@ public interface EmbeddedServer<T extends AbstractConfiguration> { /** * Get URL to query embedded server. * + * <p> + * + * Implementations <strong>must</strong> return a valid URL: for example, it means that the context path must be + * URL encoded if it contains illegal characters (such as space for example). Usually, this method should + * return the result of {@link #getUri()#toString()}. + * * @return URL. */ String getUrl();
feat: add missing methods to EmbeddedServer Some methods were missing in EmbeddedServer interface: - `getScheme()`: the URL scheme to query server (http, https). - `getHost()`: the host to query server (should be localhost). - `getUri()`: build a valid URI instance. - `getUrl()`: fix the final URL with a non encoded path.
mjeanroy_junit-servers
train
java
ee3b4cecf236ca1da7f567cbd09e76c0c9b8c203
diff --git a/anyconfig/backend/xml.py b/anyconfig/backend/xml.py index <HASH>..<HASH> 100644 --- a/anyconfig/backend/xml.py +++ b/anyconfig/backend/xml.py @@ -243,21 +243,20 @@ def elem_to_container(elem, to_container=dict, **options): subdic = dic[_tweak_ns(elem.tag, **options)] = to_container() (attrs, text, children) = options.get("tags", _gen_tags()) - _num_of_children = len(elem) + nchildren = len(elem) _elem_strip_text(elem) if elem.text: - if _num_of_children or elem.attrib: + if nchildren or elem.attrib: subdic[text] = elem.text else: dic[elem.tag] = elem.text # ex. <a>text</a> - options.update(to_container=to_container, nchildren=_num_of_children, - attrs=attrs) + options.update(to_container=to_container, nchildren=nchildren, attrs=attrs) if elem.attrib: _process_attributes(elem, dic, subdic, **options) - if _num_of_children: + if nchildren: _process_children(elem, dic, subdic, children, **options) elif not elem.text and not elem.attrib: # ex. <tag/>. dic[elem.tag] = None
refactor: s/_num_of_children/nchildren/g in .backend.xml
ssato_python-anyconfig
train
py
fd1b01d86eb1bf59d23bcf25594f848bae157763
diff --git a/packages/react/src/components/ComposedModal/ComposedModal.js b/packages/react/src/components/ComposedModal/ComposedModal.js index <HASH>..<HASH> 100644 --- a/packages/react/src/components/ComposedModal/ComposedModal.js +++ b/packages/react/src/components/ComposedModal/ComposedModal.js @@ -311,7 +311,7 @@ export class ModalHeader extends Component { }; static defaultProps = { - iconDescription: 'Close the modal', + iconDescription: 'Close', buttonOnClick: () => {}, }; @@ -373,8 +373,9 @@ export class ModalHeader extends Component { onClick={this.handleCloseButtonClick} className={closeClass} title={iconDescription} + aria-label={iconDescription} type="button"> - <Close20 aria-label={iconDescription} className={closeIconClass} /> + <Close20 className={closeIconClass} /> </button> </div> );
fix(composed-modal): moves aria-label from close icon to close button (#<I>)
carbon-design-system_carbon-components
train
js
144165845aac85f6b91e426872ea02daac541387
diff --git a/persistence/sql/persister.go b/persistence/sql/persister.go index <HASH>..<HASH> 100644 --- a/persistence/sql/persister.go +++ b/persistence/sql/persister.go @@ -71,7 +71,7 @@ func (p *Persister) Commit(ctx context.Context) error { return errorsx.WithStack(ErrNoTransactionOpen) } - return c.TX.Commit() + return errorsx.WithStack(c.TX.Commit()) } func (p *Persister) Rollback(ctx context.Context) error { @@ -80,7 +80,7 @@ func (p *Persister) Rollback(ctx context.Context) error { return errorsx.WithStack(ErrNoTransactionOpen) } - return c.TX.Rollback() + return errorsx.WithStack(c.TX.Rollback()) } func NewPersister(ctx context.Context, c *pop.Connection, r Dependencies, config *config.Provider, l *logrusx.Logger) (*Persister, error) {
fix: missing stack traces (#<I>)
ory_hydra
train
go
598f52401587924ca62da040e187ad5f79c78c3a
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -52,8 +52,10 @@ function parseArgs () { type: 'boolean', describe: 'warn about improperly formatted checksum lines' }) - .help('help') + .help('h') + .alias('h', 'help') .version(() => require('./package.json').version) + .alias('version', 'v') .argv }
feat(cli-flags): add -h and -v aliases
zkat_srisum
train
js
efe16186644766113c0de01c38058d0cfb9986cb
diff --git a/src/geshi/ceylon.php b/src/geshi/ceylon.php index <HASH>..<HASH> 100644 --- a/src/geshi/ceylon.php +++ b/src/geshi/ceylon.php @@ -48,7 +48,12 @@ $language_data = array ( 'COMMENT_SINGLE' => array(1 => '//', 2 => '#!'), 'COMMENT_MULTI' => array('/*' => '*/'), 'COMMENT_REGEXP' => array( - 'string' => '/(?:"|``).*?(?:``|")/' + /* + * 1. regular line comments (see COMMENT_SINGLE) + * 2. shebang line comments (see COMMENT_SINGLE) + * 3. strings (including string templates) + */ + 3 => '/(?:"|``).*?(?:``|")/' ), 'CASE_KEYWORDS' => GESHI_CAPS_NO_CHANGE, 'QUOTEMARKS' => array("'"), @@ -102,7 +107,7 @@ $language_data = array ( 'COMMENTS' => array( 1 => 'color:darkgray;', 2 => 'color:darkgray;', - 'string' => 'color:blue', + 3 => 'color:blue', 'MULTI' => 'color:darkgray;' ), 'STRINGS' => array(
fix: Ceylon string comment regex name langcheck.php says the array should only contain integer keys.
GeSHi_geshi-1.0
train
php
4a15c3f52d26642bf7a4590d0409d27f64b08a5f
diff --git a/test/runner/runner.go b/test/runner/runner.go index <HASH>..<HASH> 100644 --- a/test/runner/runner.go +++ b/test/runner/runner.go @@ -215,6 +215,7 @@ func (r *Runner) build(b *Build) (err error) { var buildLog bytes.Buffer start := time.Now() + fmt.Fprintf(&buildLog, "Starting build of %s at %s\n", b.Commit, start.Format(time.RFC822)) defer func() { b.Duration = time.Since(start) b.DurationFormatted = formatDuration(b.Duration)
test: Add the start time to the build log
flynn_flynn
train
go
eb519dc37bf2e01344eb1479e50f581d4105e807
diff --git a/molgenis-api-data/src/main/java/org/molgenis/api/data/v2/RestControllerV2.java b/molgenis-api-data/src/main/java/org/molgenis/api/data/v2/RestControllerV2.java index <HASH>..<HASH> 100644 --- a/molgenis-api-data/src/main/java/org/molgenis/api/data/v2/RestControllerV2.java +++ b/molgenis-api-data/src/main/java/org/molgenis/api/data/v2/RestControllerV2.java @@ -520,6 +520,7 @@ public class RestControllerV2 { */ @Deprecated @GetMapping(value = "/i18n", produces = APPLICATION_JSON_VALUE) + @Transactional(readOnly = true) public Map<String, String> getL10nStrings() { Map<String, String> translations = new HashMap<>();
fix(api-data): start read-only transaction for i<I>n endpoint Otherwise the dataservice creates a new transaction for each cache lookup, which is costly. Fixes #<I>
molgenis_molgenis
train
java
de777872193d2ebf35559471ec72e9a87b0b8e6e
diff --git a/lib/polyfill/media_capabilities.js b/lib/polyfill/media_capabilities.js index <HASH>..<HASH> 100644 --- a/lib/polyfill/media_capabilities.js +++ b/lib/polyfill/media_capabilities.js @@ -37,7 +37,9 @@ shaka.polyfill.MediaCapabilities = class { return; } - navigator.mediaCapabilities = /** @type {!MediaCapabilities} */ ({}); + if (!navigator.mediaCapabilities) { + navigator.mediaCapabilities = /** @type {!MediaCapabilities} */ ({}); + } navigator.mediaCapabilities.decodingInfo = shaka.polyfill.MediaCapabilities.decodingInfo_; }
fix: Fix mediaCapabilities polyfill on Chromecast Chromecast firmware now includes limited support for mediaCapabilities, but we still need to install the polyfill for now. The platform will let us overwrite the decodingInfo method, but not the mediaCapabilities object itself. This fixes the polyfill to handle this situation. Change-Id: Ia<I>ad<I>ec1caf<I>ef<I>adbe<I>ce5
google_shaka-player
train
js
9f0cd770fe2c1da3a2c23c7661824a14b47b4cb9
diff --git a/lib/client.js b/lib/client.js index <HASH>..<HASH> 100644 --- a/lib/client.js +++ b/lib/client.js @@ -566,17 +566,18 @@ function connect (client) { } socket[kError] = null - socket.setTimeout(client[kSocketTimeout], function () { - util.destroy(this, new SocketTimeoutError()) - }) socket .setNoDelay(true) + .setTimeout(client[kSocketTimeout]) .on(protocol === 'https:' ? 'secureConnect' : 'connect', function () { client[kReset] = false client[kRetryDelay] = 0 client.emit('connect') resume(client) }) + .on('timeout', function () { + util.destroy(this, new SocketTimeoutError()) + }) .on('data', /* istanbul ignore next */ function () { /* istanbul ignore next */ assert(false)
refactor: socket timeout listener
mcollina_undici
train
js
63fc518ccc410e6eec76c910b6eef53815cc2afb
diff --git a/src/components/Tabs/Tabs.js b/src/components/Tabs/Tabs.js index <HASH>..<HASH> 100644 --- a/src/components/Tabs/Tabs.js +++ b/src/components/Tabs/Tabs.js @@ -230,6 +230,7 @@ export default class Tabs extends React.Component { return ( <TabContent + className="tab-content" aria-hidden={!selected} hidden={!selected} selected={selected}>
fix(Tabs): re-implement tab-content classname (#<I>)
carbon-design-system_carbon-components-react
train
js
7c2f8a58f989af0a3cad4508c8c433bf36387d3d
diff --git a/docs/docs/.vitepress/config.js b/docs/docs/.vitepress/config.js index <HASH>..<HASH> 100644 --- a/docs/docs/.vitepress/config.js +++ b/docs/docs/.vitepress/config.js @@ -16,7 +16,7 @@ module.exports = { algolia: { appId: 'WSHECG363P', apiKey: '3393639615aa5e141656843e87dff0c8', - indexName: '' + indexName: 'nystudio107-eager-beaver' }, editLinks: true, editLinkText: 'Edit this page on GitHub',
refactor: Add DocSearch settings
nystudio107_craft-eagerbeaver
train
js
b45f5fb00032a8e32c342fc76a51205978db2cc2
diff --git a/test/support/opengl_stub.rb b/test/support/opengl_stub.rb index <HASH>..<HASH> 100644 --- a/test/support/opengl_stub.rb +++ b/test/support/opengl_stub.rb @@ -1,7 +1,14 @@ require 'opengl' +require 'mittsu/renderers/opengl/opengl_lib' + +module OpenGLLib + def self.discover + Struct.new(:path, :file).new(nil, nil) + end +end module OpenGLStub - def self.load_lib + def self.load_lib(*args) end OpenGL.constants.each do |c|
fix: stub out OpenGLLib in tests
jellymann_mittsu
train
rb
bcddae5f00132c926869077032d5ff329369ac25
diff --git a/src/events/http/lambda-events/LambdaProxyIntegrationEventV2.js b/src/events/http/lambda-events/LambdaProxyIntegrationEventV2.js index <HASH>..<HASH> 100644 --- a/src/events/http/lambda-events/LambdaProxyIntegrationEventV2.js +++ b/src/events/http/lambda-events/LambdaProxyIntegrationEventV2.js @@ -118,8 +118,13 @@ export default class LambdaProxyIntegrationEventV2 { const requestTime = formatToClfTime(received) const requestTimeEpoch = received - const cookies = Object.entries(this.#request.state).map( - ([key, value]) => `${key}=${value}`, + const cookies = Object.entries(this.#request.state).flatMap( + ([key, value]) => { + if (Array.isArray(value)) { + return value.map((v) => `${key}=${v}`) + } + return `${key}=${value}` + }, ) return {
fix: Handle multiple cookies with the same name in the same way API Gateway does.
dherault_serverless-offline
train
js
bb0700ade38300a7c87ce800d26c3a523b2fe1a9
diff --git a/src/util/Util.js b/src/util/Util.js index <HASH>..<HASH> 100644 --- a/src/util/Util.js +++ b/src/util/Util.js @@ -399,7 +399,7 @@ class Util { const member = message.channel.guild.members.get(id); if (member) { - return member.displayName; + return `@${member.displayName}`; } else { const user = message.client.users.get(id); return user ? `@${user.username}` : input;
fix: Util#cleanContent parsing of GuildMember
discordjs_discord.js
train
js
2e57328c29cf7f06e04b101a58a8491732cbecb0
diff --git a/dirsync/syncer.py b/dirsync/syncer.py index <HASH>..<HASH> 100644 --- a/dirsync/syncer.py +++ b/dirsync/syncer.py @@ -260,9 +260,12 @@ class Syncer(object): elif stat.S_ISDIR(st.st_mode): to_make = os.path.join(self._dir2, f1) if not os.path.exists(to_make): - os.makedirs(to_make) - self._numnewdirs += 1 - self._added.append(to_make) + try: + os.makedirs(to_make) + self._numnewdirs += 1 + self._added.append(to_make) + except FileNotFoundError as e: + self.log(str(e)) # common files/directories for f1 in self._dcmp.common:
fix(syncer): prevent error if target dir cannot be created
tkhyn_dirsync
train
py
1c946ef0038a27d134f497ed72352136c0a4bb9e
diff --git a/graph.go b/graph.go index <HASH>..<HASH> 100644 --- a/graph.go +++ b/graph.go @@ -89,6 +89,7 @@ func (graph *Graph) Get(name string) (*Image, error) { if img.Id != id { return nil, fmt.Errorf("Image stored at '%s' has wrong id '%s'", id, img.Id) } + img.graph = graph if img.Size == 0 { root, err := img.root() if err != nil { @@ -98,7 +99,6 @@ func (graph *Graph) Get(name string) (*Image, error) { return nil, err } } - img.graph = graph graph.lockSumMap.Lock() defer graph.lockSumMap.Unlock() if _, exists := graph.checksumLock[img.Id]; !exists {
fix: Can't lookup root of unregistered image
moby_moby
train
go
5311fd3b8e804f1346f31d83cb7366116f2ee724
diff --git a/src/karma.sauce.conf.js b/src/karma.sauce.conf.js index <HASH>..<HASH> 100644 --- a/src/karma.sauce.conf.js +++ b/src/karma.sauce.conf.js @@ -31,11 +31,11 @@ const BROWSERS = { platform: 'Windows 10', version: '11' }, - 'SAFARI12': { + 'SAFARI': { base: 'SauceLabs', browserName: 'safari', - platform: 'macOS 10.14', - version: '12' + platform: 'macOS 10.15', + version: 'latest' }, 'SAFARI13': { base: 'SauceLabs', @@ -80,7 +80,7 @@ module.exports = function (config) { port: 9876, colors: true, logLevel: config.LOG_INFO, - browsers: ['CHROME', 'FIREFOX', 'EDGE', 'EDGE18', 'SAFARI12', 'SAFARI13'], + browsers: ['CHROME', 'FIREFOX', 'EDGE', 'EDGE18', 'SAFARI', 'SAFARI13'], autoWatch: false, singleRun: true, captureTimeout: 180000,
test: add latest Safari to the sauce labs
ng-bootstrap_ng-bootstrap
train
js
254854fb4010ec70a0650cb7da25450f463dead6
diff --git a/test.js b/test.js index <HASH>..<HASH> 100644 --- a/test.js +++ b/test.js @@ -1,6 +1,7 @@ 'use strict' var zlib = require('zlib') +var http = require('http') var test = require('tape') var nock = require('nock') var Client = require('./') @@ -90,5 +91,32 @@ test('#request()', function (t) { t.end() }) }) + + t.test('socket hang up', function (t) { + var server = http.createServer(function (req, res) { + req.socket.destroy() + }) + + server.listen(function () { + var opts = { + organizationId: 'test', + appId: 'test', + secretToken: 'test', + userAgent: 'test', + _apiHost: 'localhost', + _apiPort: server.address().port, + _apiSecure: false + } + + var client = Client(opts) + + client.request('endpoint', body, function (err, res, body) { + t.equal(err.message, 'socket hang up') + t.equal(err.code, 'ECONNRESET') + server.close() + t.end() + }) + }) + }) }) })
test: add test for scoket hang up
elastic_apm-nodejs-http-client
train
js
6c39e35565671f5f2b5e73da609400134e358a60
diff --git a/idispatch_windows.go b/idispatch_windows.go index <HASH>..<HASH> 100644 --- a/idispatch_windows.go +++ b/idispatch_windows.go @@ -1,3 +1,4 @@ +//go:build windows // +build windows package ole @@ -92,7 +93,7 @@ func invoke(disp *IDispatch, dispid int32, dispatch int16, params ...interface{} case int8: vargs[n] = NewVariant(VT_I1, int64(v.(int8))) case *int8: - vargs[n] = NewVariant(VT_I1|VT_BYREF, int64(uintptr(unsafe.Pointer(v.(*uint8))))) + vargs[n] = NewVariant(VT_I1|VT_BYREF, int64(uintptr(unsafe.Pointer(v.(*int8))))) case int16: vargs[n] = NewVariant(VT_I2, int64(v.(int16))) case *int16:
fix: crash when using *int8 as param
go-ole_go-ole
train
go
c9fe2269ccdb4b25f3545b24486a099d4c365dca
diff --git a/src/components/progressCircular/progress-circular.js b/src/components/progressCircular/progress-circular.js index <HASH>..<HASH> 100644 --- a/src/components/progressCircular/progress-circular.js +++ b/src/components/progressCircular/progress-circular.js @@ -35,7 +35,7 @@ angular.module('material.components.progressCircular', [ * If `value=""` is also specified, however, then `md-mode="determinate"` would be auto-injected instead. * @param {number=} value In determinate mode, this number represents the percentage of the * circular progress. Default: 0 - * @param {number=} md-diameter This specifies the diamter of the circular progress. The value + * @param {number=} md-diameter This specifies the diameter of the circular progress. The value * may be a percentage (eg '25%') or a pixel-size value (eg '48'). If this attribute is * not present then a default value of '48px' is assumed. *
docs(progressCircular): fix spelling of diameter There was already a PR, but this one had git conflicts, so this is a stable PR Closes #<I>
angular_material
train
js
d67a6c08ec3c8e904c8d113fee2bdadca421aac1
diff --git a/packages/select/src/Select.js b/packages/select/src/Select.js index <HASH>..<HASH> 100644 --- a/packages/select/src/Select.js +++ b/packages/select/src/Select.js @@ -1,3 +1,4 @@ +/* eslint-disable react/prop-types */ import React, { useState } from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames';
feat: used innerProps to add role, name and state to field options SIH-<I>
Availity_availity-react
train
js
f8ab7b4c53b4f5feed5064ab78326bef4e50b563
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -28,7 +28,7 @@ return fetch(url, options).then(res => res.json()).then(data => data.filter(x => /Edici.n/i.test(x.title))) .then(data => { return data.map(x => { - const body = x.body.split('\r\n'); + const body = x.body.split(/\r\n|\n/); return { title: x.title, comments_url: x.comments_url,
fix(getEvents): Fix split body
lgaticaq_beerjs
train
js
b067cf38948f0c432d1ad495162f3bd34cd70b59
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -1,5 +1,6 @@ 'use strict'; +import bannerPlugin from '@comandeer/babel-plugin-banner'; import { getCommentContent } from '@comandeer/babel-plugin-banner/utils'; import fixMappings from './fixMappings'; import { transform } from 'babel-core'; @@ -21,7 +22,7 @@ function babili( options = {} ) { let isAlreadyInserted = false; babelConf.plugins = [ - [ '@comandeer/babel-plugin-banner', { + [ bannerPlugin, { banner } ] ];
fix(babel): explicitly pass banner plugin to babel
Comandeer_rollup-plugin-babel-minify
train
js
cc4248cb26bb2ece19d81750edfe75139859eb64
diff --git a/src/rez/pip.py b/src/rez/pip.py index <HASH>..<HASH> 100644 --- a/src/rez/pip.py +++ b/src/rez/pip.py @@ -417,7 +417,7 @@ def pip_install_package(source_name, pip_version=None, python_version=None, destination_file = os.path.relpath(source_file, stagingdir) exe = False - if is_exe(source_file) and destination_file.startswith("bin"): + if is_exe(source_file) and destination_file.startswith("bin" + os.sep): _file = os.path.basename(destination_file) tools.append(_file) exe = True
refactor(rez-pip): add os.sep to the bin check to avoid naming issues
nerdvegas_rez
train
py
57ecc270e41b0734424396732614e1d0fc2a0858
diff --git a/Modules/User/Controllers/UserController.php b/Modules/User/Controllers/UserController.php index <HASH>..<HASH> 100644 --- a/Modules/User/Controllers/UserController.php +++ b/Modules/User/Controllers/UserController.php @@ -19,7 +19,9 @@ class UserController extends AppBaseController { $this->repository = $userRepo; $this->middleware("auth:api"); - $this->middleware("permission.auto"); + $this->middleware("permission.auto")->except([ + 'current' + ]); } /** @@ -188,7 +190,7 @@ class UserController extends AppBaseController $user = $request->user(); if ($request->has('user_id')) { - if (!$user->hasPermissionTo('manage-user','api')) { + if (!$user->hasPermissionTo('manage-user', 'api')) { throw new AuthorizationException(); } $user = User::find($input['user_id']);
fix: current user API should be able get called for everyone.
zgldh_scaffold
train
php
e62e3e7e9cfce9f1c13fbe8fe7912aeda228fb81
diff --git a/library/src/pivotal-ui-react/dropdowns/dropdowns.js b/library/src/pivotal-ui-react/dropdowns/dropdowns.js index <HASH>..<HASH> 100644 --- a/library/src/pivotal-ui-react/dropdowns/dropdowns.js +++ b/library/src/pivotal-ui-react/dropdowns/dropdowns.js @@ -169,11 +169,11 @@ export class DropdownItem extends React.Component { if (header) return (<li role="heading" className="dropdown-header">{children}</li>); if (divider) return (<li role="separator" className="divider"/>); - const anchor = href ? <a {...{href, disabled, ...anchorProps}} onClick={this.handleClick}>{children}</a> : children; + const anchor = href ? <a {...{href, disabled, ...anchorProps}}>{children}</a> : children; const disabledClass = disabled ? 'disabled' : ''; const dropdownItemClass = classnames(className, disabledClass); - return (<li {...{style}} className={dropdownItemClass} onClick={href ? '' : this.handleClick}> + return (<li {...{style}} className={dropdownItemClass} onClick={this.handleClick}> {anchor} </li>); }
feat(dropdown): onSelect is triggered by clicking DropdownItem <li> [#<I>]
pivotal-cf_pivotal-ui
train
js
af855ef7b4b1b9fcfa15d04a7da9449b5197934d
diff --git a/webui/dev/scripts/transfer.js b/webui/dev/scripts/transfer.js index <HASH>..<HASH> 100644 --- a/webui/dev/scripts/transfer.js +++ b/webui/dev/scripts/transfer.js @@ -5,7 +5,7 @@ const folder = process.argv[2] async function execute () { try { await fs.emptyDir('./static') - await fs.outputFile('./static/DONT-EDIT-FILES-IN-THIS-DIRECTORY.md', 'For more information show `webui/readme.md`') + await fs.outputFile('./static/DONT-EDIT-FILES-IN-THIS-DIRECTORY.md', 'For more information see `webui/readme.md`') console.log('Deleted static folder contents!') await fs.copy(`./dist/${folder}`, './static', { overwrite: true }) console.log('Installed new files in static folder!')
fix: generated placeholder for the webui
containous_traefik
train
js
f41586ff1bb918b17cd5a0e88c08eb59ba8af493
diff --git a/tasks/usemin.js b/tasks/usemin.js index <HASH>..<HASH> 100644 --- a/tasks/usemin.js +++ b/tasks/usemin.js @@ -146,7 +146,10 @@ module.exports = function (grunt) { grunt.file.write(filename, content); }); - grunt.log.writeln('Replaced ' + chalk.cyan(files.length) + ' references to assets'); + + grunt.log.write('Replaced ' + chalk.cyan(files.length) + ' ' + + (files.length === 1 ? 'reference' : 'references') + ' to assets' + ); }); });
feat(log): add support for only one reference replaced Simple trick to avoid another test against files.length
yeoman_grunt-usemin
train
js
5fc4b4ea8f6d89b84f6612204538c856707b6191
diff --git a/cmd/kubeadm/app/cmd/phases/init/controlplane.go b/cmd/kubeadm/app/cmd/phases/init/controlplane.go index <HASH>..<HASH> 100644 --- a/cmd/kubeadm/app/cmd/phases/init/controlplane.go +++ b/cmd/kubeadm/app/cmd/phases/init/controlplane.go @@ -100,6 +100,7 @@ func getControlPlanePhaseFlags(name string) []string { options.CertificatesDir, options.KubernetesVersion, options.ImageRepository, + options.Patches, } if name == "all" || name == kubeadmconstants.KubeAPIServer { flags = append(flags,
fix: add missing patch flag for kubeadm init phase control-plane
kubernetes_kubernetes
train
go
c1b7516c381fdc117469f97913d1db1c19892ea9
diff --git a/lib/components/narrative/default/itinerary-summary.js b/lib/components/narrative/default/itinerary-summary.js index <HASH>..<HASH> 100644 --- a/lib/components/narrative/default/itinerary-summary.js +++ b/lib/components/narrative/default/itinerary-summary.js @@ -48,6 +48,11 @@ const Block = connect(mapStateToProps)(styled.div` span { display: ${(props) => (props.renderRouteNamesAndColors ? 'block' : 'none')}; } + + svg { + width: 20px; + height: 20px; + } `) const modeColors = {
refactor: avoid massive block mode icons
opentripplanner_otp-react-redux
train
js
8179f2e60d083624a67f21c2a30d844df54a6591
diff --git a/icons/ionicons.js b/icons/ionicons.js index <HASH>..<HASH> 100644 --- a/icons/ionicons.js +++ b/icons/ionicons.js @@ -52,7 +52,7 @@ export default { add: 'ion-android-send' }, collapsible: { - icon: 'ion-arrow-down-b' + icon: 'ion-android-arrow-dropdown' }, datetime: { arrowLeft: 'ion-chevron-left',
refactor: Addition to Collapsible icon commit
quasarframework_quasar
train
js
1ed7665ca9caa9c22f8bf353482c3d42c4162331
diff --git a/src/models/ColourSwatches.php b/src/models/ColourSwatches.php index <HASH>..<HASH> 100644 --- a/src/models/ColourSwatches.php +++ b/src/models/ColourSwatches.php @@ -13,9 +13,9 @@ class ColourSwatches extends Model public string $label = ''; /** - * @var string + * @var array|string|null */ - public string $color = ''; + public array|string|null $color = null; /** * @inheritdoc @@ -23,7 +23,6 @@ class ColourSwatches extends Model public function __construct($value) { if ($this->validateJson($value)) { - $colorData = Json::decode($value); if (!empty($colorData['label'])) { $this->label = $colorData['label'];
refactor: extend the typings for saving custom and predefined fields
Rias500_craft-colour-swatches
train
php
28ee65e6ddb9b03c5cdb1671d58a51f737d0ea7d
diff --git a/notification-portlet-webcomponents/notification-component-icon/src/NotificationIcon.js b/notification-portlet-webcomponents/notification-component-icon/src/NotificationIcon.js index <HASH>..<HASH> 100644 --- a/notification-portlet-webcomponents/notification-component-icon/src/NotificationIcon.js +++ b/notification-portlet-webcomponents/notification-component-icon/src/NotificationIcon.js @@ -209,6 +209,7 @@ class NotificationIcon extends Component { > <StyledDropdownToggle onClick={this.toggle} className={dropdownClasses}> <FontAwesomeIcon icon="bell" /> + &nbsp; {this.renderNotificationCount()} </StyledDropdownToggle>
fix: add non breaking space between notication bell and count
Jasig_NotificationPortlet
train
js
b3bdacee147945ed189075bcaf8d007bd90ed975
diff --git a/test/all.js b/test/all.js index <HASH>..<HASH> 100644 --- a/test/all.js +++ b/test/all.js @@ -9,4 +9,5 @@ require('./fischerandom.js'); require('./mobility.js'); require('./board.js'); require('./promotion.js'); -require('./algebraic.js'); \ No newline at end of file +require('./algebraic.js'); +require('./line.js');
test: stub tests for line
chessfish_chesslib
train
js
c18ae4690ac4e1f9bc16a74cb414f44e5395a9a4
diff --git a/lib/pincers/support/cookie_jar.rb b/lib/pincers/support/cookie_jar.rb index <HASH>..<HASH> 100644 --- a/lib/pincers/support/cookie_jar.rb +++ b/lib/pincers/support/cookie_jar.rb @@ -20,9 +20,9 @@ module Pincers::Support end def set(_parts) - raise ArgumentError, "domain is required" unless _parts[:domain] - raise ArgumentError, "name is required" unless _parts[:name] - raise ArgumentError, "value is required" unless _parts[:value] + return nil unless _parts[:domain] + return nil unless _parts[:name] + return nil unless _parts[:value] cookie = Cookie.new( _parts[:name], @@ -34,7 +34,7 @@ module Pincers::Support ) replace_cookie cookie - self + cookie end def set_raw(_uri, _raw)
refactor(cookie_jar): makes set return nil on failure and cookie on success
platanus_pincers
train
rb
74799a2e991d114070ad06c7320fe6dc8088635a
diff --git a/src/route-loading.js b/src/route-loading.js index <HASH>..<HASH> 100644 --- a/src/route-loading.js +++ b/src/route-loading.js @@ -118,7 +118,7 @@ function resolveComponent(routeLoader, router, viewPortPlan) { function getComponent(routerViewPort) { routerViewPort.getComponent(type, createChildRouter, viewPortPlan.config) .then(resolve) - .catch(error); + .catch(reject); } if (possibleRouterViewPort) {
fix(route-loading): use correct rejection callback There was a copy/paste error in the code which resulted in an undefined symbol being used as the rejection callback. This commit fixes the error.
aurelia_router
train
js
6f0651264e28cb8259589f04f4c0a3eabcb59bb6
diff --git a/src/adapters/sequelize.js b/src/adapters/sequelize.js index <HASH>..<HASH> 100644 --- a/src/adapters/sequelize.js +++ b/src/adapters/sequelize.js @@ -87,7 +87,9 @@ module.exports = (model, opts) => { const pkIsFk = primaryKeyIsForeignKey(association); if (pkIsFk) { const fk = fields.find((field) => field.reference === `${association.associationAccessor}.${association.foreignKey}`); - fk.foreignAndPrimaryKey = true; + if (fk) { + fk.foreignAndPrimaryKey = true; + } } });
fix: fix error when no foreign key is found but foreign and primary key is detected (#<I>)
ForestAdmin_forest-express-sequelize
train
js
23e2fec2abadefef6f4d24538aa0622386cbec6a
diff --git a/src/main/java/com/github/mjeanroy/springmvc/view/mustache/handlebars/HandlebarsTemplateLoader.java b/src/main/java/com/github/mjeanroy/springmvc/view/mustache/handlebars/HandlebarsTemplateLoader.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/github/mjeanroy/springmvc/view/mustache/handlebars/HandlebarsTemplateLoader.java +++ b/src/main/java/com/github/mjeanroy/springmvc/view/mustache/handlebars/HandlebarsTemplateLoader.java @@ -24,6 +24,7 @@ package com.github.mjeanroy.springmvc.view.mustache.handlebars; +import com.github.jknack.handlebars.io.AbstractTemplateLoader; import com.github.jknack.handlebars.io.StringTemplateSource; import com.github.jknack.handlebars.io.TemplateLoader; import com.github.jknack.handlebars.io.TemplateSource; @@ -39,7 +40,7 @@ import static com.github.mjeanroy.springmvc.view.mustache.commons.PreConditions. * Implement template loader for use with java handlebar * implementation. */ -public class HandlebarsTemplateLoader implements TemplateLoader { +public class HandlebarsTemplateLoader extends AbstractTemplateLoader { /** * Template loader implementation.
refactor: extend abstract for easier dependency updates
mjeanroy_springmvc-mustache
train
java
eacbf281a169d86107947f9c2ca5b80ee99fe63e
diff --git a/src/foremast/utils/pipelines.py b/src/foremast/utils/pipelines.py index <HASH>..<HASH> 100644 --- a/src/foremast/utils/pipelines.py +++ b/src/foremast/utils/pipelines.py @@ -108,3 +108,11 @@ def get_pipeline_id(name=''): break return return_id + + +def normalize_pipeline_name(name=''): + """Translate unsafe characters to underscores.""" + normalized_name = name + for bad in '\\/?%#': + normalized_name = normalized_name.replace(bad, '_') + return normalized_name
feat: Normalize Pipeline name function Spinnaker does not allow special characters in the Pipeline name.
foremast_foremast
train
py
de5c91a09998afc48bb8f77dbef6a92465962838
diff --git a/field-label/field-label.js b/field-label/field-label.js index <HASH>..<HASH> 100644 --- a/field-label/field-label.js +++ b/field-label/field-label.js @@ -34,7 +34,7 @@ export const FieldLabel = props => ( {props.hint && ( <div className={styles.hint}> - <Spacings.Inline alignItems="flexStart" scale="xs"> + <Spacings.Inline alignItems="center" scale="xs"> {props.hintIcon && ( <span className={styles.hintIcon}> {// FIXME: add proper tone when tones are refactored
fix(field-label): adjust hint alignment
commercetools_ui-kit
train
js
e3846896f127ac176d111242ea9cf2eaeaaf9ceb
diff --git a/src/Entities/FeePlan.php b/src/Entities/FeePlan.php index <HASH>..<HASH> 100644 --- a/src/Entities/FeePlan.php +++ b/src/Entities/FeePlan.php @@ -44,6 +44,9 @@ class FeePlan extends Base implements PaymentPlanInterface /** @var int Number of deferred days this fee plan applies to */ public $deferred_days; + /** @var int Number of deferred trigger limit days this fee plan applies to */ + public $deferred_trigger_limit_days; + /** @var int Maximum purchase amount allowed for this fee plan */ public $max_purchase_amount; @@ -78,6 +81,11 @@ class FeePlan extends Base implements PaymentPlanInterface return $this->deferred_months; } + public function getDeferredTriggerLimitDays() + { + return $this->deferred_trigger_limit_days; + } + public function getInstallmentsCount() { return $this->installments_count;
fix: add property deferred trigger in feeplan
alma_alma-php-client
train
php
e641b0e2965bdef7e385208e099943a7e49f0557
diff --git a/src/server/routes/post-upload.js b/src/server/routes/post-upload.js index <HASH>..<HASH> 100644 --- a/src/server/routes/post-upload.js +++ b/src/server/routes/post-upload.js @@ -20,7 +20,7 @@ var route = function(req, res, next){ mkdirp.sync(folderFilePath) req.pipe(req.busboy) req.busboy.on('file', function (fieldname, file, filename, encoding, mimetype) { - var ext = path.extname(filename) + var ext = path.extname(filename).toLowerCase() var filenameNoExt = path.basename(filename,ext) var randID = '-' + (((1+Math.random())*0x100000)|0).toString(16).substring(2) var slug = limax(filenameNoExt, {separateNumbers: false}) + randID + ext
fix: allow file upload with uppercase extensions
abecms_abecms
train
js
b4ccdb8ad3898f15c81b6e4f03817daf257c482e
diff --git a/test/permission-ng/permission-ng.test.js b/test/permission-ng/permission-ng.test.js index <HASH>..<HASH> 100644 --- a/test/permission-ng/permission-ng.test.js +++ b/test/permission-ng/permission-ng.test.js @@ -119,7 +119,6 @@ describe('permission.ng', function () { $rootScope.$digest(); // THEN - expect($location.path()).toBe('/accepted'); expect(Authorization.authorize).toHaveBeenCalled(); expect(TransitionEvents.broadcastPermissionAcceptedEvent).toHaveBeenCalled(); });
fix: #<I> - Controller runs in ngRoute although user don't have permissions
RafaelVidaurre_angular-permission
train
js
3b8fb83cfda242f4cdf721cd476d458a103f467c
diff --git a/src/main/java/com/smartsheet/api/models/enums/AccessScope.java b/src/main/java/com/smartsheet/api/models/enums/AccessScope.java index <HASH>..<HASH> 100644 --- a/src/main/java/com/smartsheet/api/models/enums/AccessScope.java +++ b/src/main/java/com/smartsheet/api/models/enums/AccessScope.java @@ -27,18 +27,20 @@ package com.smartsheet.api.models.enums; * @see <a href="http://www.smartsheet.com/developers/api-documentation#h.89hb3ivv7eum">Access Scopes Help</a> */ public enum AccessScope { - READ_SHEETS, - WRITE_SHEETS, - SHARE_SHEETS, - DELETE_SHEETS, + ADMIN_SHEETS, + ADMIN_SIGHTS, + ADMIN_USERS, + ADMIN_WEBHOOKS, + ADMIN_WORKSPACES, CREATE_SHEETS, CREATE_SIGHTS, - READ_SIGHTS, + DELETE_SHEETS, DELETE_SIGHTS, - SHARE_SIGHTS, + READ_CONTACTS, + READ_SHEETS, + READ_SIGHTS, READ_USERS, - ADMIN_USERS, - ADMIN_SHEETS, - ADMIN_WORKSPACES, - ADMIN_WEBHOOKS; + SHARE_SHEETS, + SHARE_SIGHTS, + WRITE_SHEETS, }
fix: add missing scopes `READ_CONTACTS` and `ADMIN_SIGHTS`
smartsheet-platform_smartsheet-java-sdk
train
java
607399ab0e17556d7476fb6e0a2b7155a76bb313
diff --git a/rundeckapp/grails-app/assets/javascripts/menu/home.js b/rundeckapp/grails-app/assets/javascripts/menu/home.js index <HASH>..<HASH> 100644 --- a/rundeckapp/grails-app/assets/javascripts/menu/home.js +++ b/rundeckapp/grails-app/assets/javascripts/menu/home.js @@ -222,7 +222,6 @@ function HomeData(data) { new Project(jQuery.extend(newproj, {loaded: true, page: 'projectList'})) ); } - self.processedList.push(newproj) } }; self.load = function (refresh) { @@ -321,6 +320,9 @@ function HomeData(data) { } return; } + projects.forEach(function(p){ + self.processedList.push(p) + }) var params = {projects:projects.join(',')};//refresh?{refresh:true}:{}; // console.log("loadBatch for: "+projects.length+": "+params.projects) jQuery.ajax({
fix: processed list should be updated when ajax call is made
rundeck_rundeck
train
js
21af62a45eb167adcf4d6932b27f9e2b86fc06f3
diff --git a/google-api-client/src/main/java/com/google/api/client/googleapis/media/MediaHttpUploader.java b/google-api-client/src/main/java/com/google/api/client/googleapis/media/MediaHttpUploader.java index <HASH>..<HASH> 100644 --- a/google-api-client/src/main/java/com/google/api/client/googleapis/media/MediaHttpUploader.java +++ b/google-api-client/src/main/java/com/google/api/client/googleapis/media/MediaHttpUploader.java @@ -44,7 +44,7 @@ import java.util.Arrays; /** * Media HTTP Uploader, with support for both direct and resumable media uploads. Documentation is - * available <a href='http://code.google.com/p/google-api-java-client/wiki/MediaUpload'>here</a>. + * available <a href='https://googleapis.github.io/google-api-java-client/media-upload.html'>here</a>. * * <p> * For resumable uploads, when the media content length is known, if the provided
docs: fix link to media upload documentation (#<I>)
googleapis_google-api-java-client
train
java
ccc4c46e7ad83ba299d796dc5beaa9212f639976
diff --git a/Extension/FilterExtension.php b/Extension/FilterExtension.php index <HASH>..<HASH> 100644 --- a/Extension/FilterExtension.php +++ b/Extension/FilterExtension.php @@ -35,7 +35,7 @@ use Doctrine\ORM\Mapping\ManyToOne; use Doctrine\ORM\Mapping\OneToMany; use Doctrine\ORM\QueryBuilder; use ReflectionProperty; -use Doctrine\Common\Persistence\ManagerRegistry; +use Doctrine\Persistence\ManagerRegistry; use Symfony\Component\HttpFoundation\RequestStack; use whatwedo\TableBundle\Builder\FilterBuilder; use whatwedo\TableBundle\Exception\InvalidFilterAcronymException; diff --git a/Repository/FilterRepository.php b/Repository/FilterRepository.php index <HASH>..<HASH> 100644 --- a/Repository/FilterRepository.php +++ b/Repository/FilterRepository.php @@ -28,7 +28,7 @@ namespace whatwedo\TableBundle\Repository; use Doctrine\Bundle\DoctrineBundle\Repository\ServiceEntityRepository; -use Doctrine\Common\Persistence\ManagerRegistry; +use Doctrine\Persistence\ManagerRegistry; use whatwedo\TableBundle\Entity\Filter; use whatwedo\TableBundle\Enum\FilterStateEnum;
refactor: replace deprecated classes
whatwedo_TableBundle
train
php,php
ef822b432be12126316a89d85707e3a07216478b
diff --git a/paco/timeout.py b/paco/timeout.py index <HASH>..<HASH> 100644 --- a/paco/timeout.py +++ b/paco/timeout.py @@ -88,5 +88,8 @@ class TimeoutLimit(object): self._cancel_handler = None self._task = None - def _cancel_task(self): + def cancel(self): + """ + Cancels current task running task in the context manager. + """ self._cancelled = self._task.cancel()
refactor(timeout): rename cancel method
h2non_paco
train
py
c04635419ebca39775033dc7a2b815e54bd35ae5
diff --git a/src/modern/QuerySubscription.js b/src/modern/QuerySubscription.js index <HASH>..<HASH> 100644 --- a/src/modern/QuerySubscription.js +++ b/src/modern/QuerySubscription.js @@ -63,7 +63,6 @@ export default class QuerySubscription { this.updateReadyState({ error, props: null, - // FIXME: Use default readyState when retrying. retry: this.retry, });
chore: Remove stale FIXME (#<I>)
relay-tools_found-relay
train
js
3437d7229e10cb4be6ab898691e650c417ac831b
diff --git a/extensions/mentions/js/src/forum/utils/getMentionText.js b/extensions/mentions/js/src/forum/utils/getMentionText.js index <HASH>..<HASH> 100644 --- a/extensions/mentions/js/src/forum/utils/getMentionText.js +++ b/extensions/mentions/js/src/forum/utils/getMentionText.js @@ -27,7 +27,7 @@ export default function getMentionText(user, postId) { } // @"Display name"#UserID const cleanText = getCleanDisplayName(user); - return `@"${cleanText}"${user.id()}`; + return `@"${cleanText}"#${user.id()}`; } else { // @"Display name"#pPostID const cleanText = getCleanDisplayName(user);
fix: Missing `#` from autocompleted user mention format (#<I>)
flarum_core
train
js
ecb893ebf1ddab828c32aa5fb0f13c110ac52103
diff --git a/src/Adapters/Phpunit/Printer.php b/src/Adapters/Phpunit/Printer.php index <HASH>..<HASH> 100644 --- a/src/Adapters/Phpunit/Printer.php +++ b/src/Adapters/Phpunit/Printer.php @@ -10,6 +10,7 @@ use PHPUnit\Framework\Test; use PHPUnit\Framework\TestCase; use PHPUnit\Framework\TestSuite; use PHPUnit\Framework\Warning; +use ReflectionObject; use Symfony\Component\Console\Input\ArgvInput; use Symfony\Component\Console\Output\ConsoleOutput; use Throwable; @@ -113,6 +114,15 @@ final class Printer implements \PHPUnit\TextUI\ResultPrinter $testCase = $this->testCaseFromTest($testCase); + $reflector = new ReflectionObject($error); + + if ($reflector->hasProperty('message')) { + $message = trim((string) preg_replace("/\r|\n/", "\n ", $error->getMessage())); + $property = $reflector->getProperty('message'); + $property->setAccessible(true); + $property->setValue($error, $message); + } + $this->state->add(TestResult::fromTestCase($testCase, TestResult::FAIL, $error)); $this->style->writeCurrentTestCaseSummary($this->state);
feat: adds better display of assertions errors.
nunomaduro_collision
train
php
3e844eea2fb53b5cb5dee00fbe4aa4cba91f62e5
diff --git a/__tests__/render.js b/__tests__/render.js index <HASH>..<HASH> 100644 --- a/__tests__/render.js +++ b/__tests__/render.js @@ -135,6 +135,12 @@ describe('redraft', () => { const joined = joinRecursively(rendered); expect(joined).toBe('<p>!</p>'); }); + test('should not mutate input when rendering blocks with depth', () => { + const before = JSON.stringify(raws.rawWithDepth); + const rendered = redraft(raws.rawWithDepth, renderers); + const after = JSON.stringify(raws.rawWithDepth); + expect(before).toBe(after); + }); test('should render blocks with depth correctly 1/2', () => { const rendered = redraft(raws.rawWithDepth, renderers); const joined = joinRecursively(rendered); diff --git a/src/render.js b/src/render.js index <HASH>..<HASH> 100644 --- a/src/render.js +++ b/src/render.js @@ -107,7 +107,7 @@ const byDepth = (blocks) => { unwind(block.depth); } prevDepth = block.depth; - group.push(block); + group.push(Object.assign({}, block)); }); if (prevDepth !== 0) { unwind(0);
fix(render): Prevent input mutation This commit addresses an issue that causes input to redraft’s render to be mutated. In this case, a children key is added. Redraft should be pure and not cause side effects.
lokiuz_redraft
train
js,js
d047aca3134905d2fd071c1bcc638864a59cc930
diff --git a/packages/@vue/cli-ui/apollo-server/connectors/folders.js b/packages/@vue/cli-ui/apollo-server/connectors/folders.js index <HASH>..<HASH> 100644 --- a/packages/@vue/cli-ui/apollo-server/connectors/folders.js +++ b/packages/@vue/cli-ui/apollo-server/connectors/folders.js @@ -24,7 +24,13 @@ function isDirectory (file) { } async function list (base, context) { - const files = await fs.readdir(base, 'utf8') + let dir = base + if (isPlatformWindows) { + if (base.match(/^([A-Z]{1}:)$/)) { + dir = path.join(base, '\\') + } + } + const files = await fs.readdir(dir, 'utf8') return files.map( file => { const folderPath = path.join(base, file)
fix(cli-ui): folder list when root windows (#<I>)
vuejs_vue-cli
train
js
e6baafa2f1a2a80df05b3041aa4f5197fc73d20e
diff --git a/karma.sauce.config.js b/karma.sauce.config.js index <HASH>..<HASH> 100644 --- a/karma.sauce.config.js +++ b/karma.sauce.config.js @@ -35,7 +35,7 @@ var customLaunchers = { base: 'SauceLabs', browserName: 'safari', platform: 'OS X 10.12', - version: '10.0' + version: '11.0' }, sl_ios: { base: 'SauceLabs',
ci: Update Safari to <I> (OSX) on SauceLabs (#<I>)
getsentry_sentry-javascript
train
js
1791b300773e55c23643f1c8315a5c21312a832f
diff --git a/cypress/integration/datatable_spec.js b/cypress/integration/datatable_spec.js index <HASH>..<HASH> 100644 --- a/cypress/integration/datatable_spec.js +++ b/cypress/integration/datatable_spec.js @@ -213,6 +213,11 @@ describe('DataTable', function () { cy.get('.dt-row[data-row-index=5]').should('be.visible'); }); + it('equals', function () { + cy.get('@filterInput5').type('=9608'); + cy.get('.dt-row-6').should('be.visible'); + }); + it('multiple filters', function () { cy.get('@filterInput4').type('to'); cy.get('@filterInput5').type('54');
test: 💍 Add test for the equals keyword
frappe_datatable
train
js
fc1e5fd047d5d7b04c29cfa44312d14afa67ad54
diff --git a/lib/SauceBrowser.js b/lib/SauceBrowser.js index <HASH>..<HASH> 100644 --- a/lib/SauceBrowser.js +++ b/lib/SauceBrowser.js @@ -64,7 +64,7 @@ SauceBrowser.prototype.start = function() { // appium-version is not always the latest stable, // we enforce it to be sure to always be up to date and fix the // saucelabs bugs - 'appium-version': '1' + 'appium-version': '1.4' }, conf.capabilities); // configures sauce connect with a tunnel identifier
fix(appium): force <I> waiting for <I>.x fixes
airtap_airtap
train
js
ffca636024147b140b98d535b1a3a1925b8b236b
diff --git a/staging/src/k8s.io/mount-utils/resizefs_unsupported.go b/staging/src/k8s.io/mount-utils/resizefs_unsupported.go index <HASH>..<HASH> 100644 --- a/staging/src/k8s.io/mount-utils/resizefs_unsupported.go +++ b/staging/src/k8s.io/mount-utils/resizefs_unsupported.go @@ -39,3 +39,8 @@ func NewResizeFs(exec utilexec.Interface) *ResizeFs { func (resizefs *ResizeFs) Resize(devicePath string, deviceMountPath string) (bool, error) { return false, fmt.Errorf("Resize is not supported for this build") } + +// NeedResize check whether mounted volume needs resize +func (resizefs *ResizeFs) NeedResize(devicePath string, deviceMountPath string) (bool, error) { + return false, fmt.Errorf("NeedResize is not supported for this build") +}
fix: NeedResize build failure on Windows
kubernetes_kubernetes
train
go
2b1f06db8dde7c680377e4f8f707dabe11113d28
diff --git a/lib/donedone-api.js b/lib/donedone-api.js index <HASH>..<HASH> 100644 --- a/lib/donedone-api.js +++ b/lib/donedone-api.js @@ -206,7 +206,7 @@ exports.getIssue = function(subdomain, username, passwordOrAPIToken, projectId, */ exports.getIssuesWaitingOnYou = function(subdomain, username, passwordOrAPIToken, callback) { - apiCall(subdomain, username, passwordOrAPIToken, 'issues//waiting_on_you.json', 'GET', callback); + apiCall(subdomain, username, passwordOrAPIToken, 'issues/waiting_on_you.json', 'GET', callback); };
fix: Remove extra / in url
evsheffield_node-donedone-api
train
js
e9472988303079ee0ac87cc2b5f4e8b9af29a69a
diff --git a/cursor.js b/cursor.js index <HASH>..<HASH> 100644 --- a/cursor.js +++ b/cursor.js @@ -238,7 +238,7 @@ Cursor.prototype._find = function(callback) { Array.isArray(result.documents) && result.documents.length === 1 && (!self.cmd.find || (self.cmd.find && self.cmd.virtual === false)) && - (result.documents[0].cursor !== 'string' || + (typeof result.documents[0].cursor !== 'string' || result.documents[0]['$err'] || result.documents[0]['errmsg'] || Array.isArray(result.documents[0].result))
fix(cursor): typo in _find()
mongodb_node-mongodb-native
train
js
8a8bc72c392602284bd99e01f8ac1fa63d514594
diff --git a/lib/webpack-cli.js b/lib/webpack-cli.js index <HASH>..<HASH> 100644 --- a/lib/webpack-cli.js +++ b/lib/webpack-cli.js @@ -165,10 +165,11 @@ class WebpackCLI extends GroupHelper { runHelp(args) { const HelpGroup = require('./groups/help'); const Commands = require('./utils/commands').names; - let command = null; - args.forEach(arg => { - if (Commands.includes(arg)) command = arg; - }); + const command = Object.keys(Commands).map( i => { + if (args.includes(Commands[i])) { + return Commands[i]; + } + })[0]; return new HelpGroup().outputHelp(command); }
chore: refactor webpack-cli
webpack_webpack-cli
train
js
ae79abc16af68a53eaecbb7bc552f72cf9fd40f3
diff --git a/pvl/pvl_validate.py b/pvl/pvl_validate.py index <HASH>..<HASH> 100644 --- a/pvl/pvl_validate.py +++ b/pvl/pvl_validate.py @@ -85,7 +85,8 @@ def arg_parser(): "--verbose", action="count", default=0, - help="Will report the errors that are encountered.", + help="Will report the errors that are encountered. A second v will " + "include tracebacks for non-pvl exceptions. ", ) p.add_argument("--version", action="version", version=pvl.__version__) p.add_argument( @@ -146,8 +147,17 @@ def pvl_flavor( except (LexerError, ParseError) as err: logging.error(f"{dialect} load error {filename} {err}") loads = False + except: + if verbose <= 1: + logging.error( + f"{dialect} load error {filename}, try -vv for more info." + ) + else: + logging.exception(f"{dialect} load error {filename}") + logging.error(f"End {dialect} load error {filename}") + loads = False - return (loads, encodes) + return loads, encodes def report(reports: list, flavors: list) -> str:
feat(pvl_validate): Now better handles errors, and provides additional reporting information via -v and -vv arguments.
planetarypy_pvl
train
py
da6c37b2fe82f087aa06bb579551e40cf268aedc
diff --git a/src/createDva.js b/src/createDva.js index <HASH>..<HASH> 100644 --- a/src/createDva.js +++ b/src/createDva.js @@ -240,7 +240,9 @@ export default function createDva(createOpts) { // store change const listeners = plugin.get('onStateChange'); for (const listener of listeners) { - store.subscribe(listener); + store.subscribe(() => { + listener(store.getState()); + }); } // start saga diff --git a/test/dva-test.js b/test/dva-test.js index <HASH>..<HASH> 100644 --- a/test/dva-test.js +++ b/test/dva-test.js @@ -135,4 +135,28 @@ describe('dva', () => { // @@router/LOCATION_CHANGE expect(count).toEqual(1); }); + + it('opts.onStateChange', () => { + let savedState = null; + + const app = dva({ + onStateChange(state) { + savedState = state; + }, + }); + app.model({ + namespace: 'count', + state: 0, + reducers: { + add(state) { + return state + 1; + }, + }, + }); + app.router(() => <div />); + app.start(); + + app._store.dispatch({ type: 'count/add' }); + expect(savedState.count).toEqual(1); + }); });
feat: pass current state to onStateChange hook
dvajs_dva
train
js,js
d367cfab89b07528ba0023af5f7b8ccd5153ff10
diff --git a/src/Router.php b/src/Router.php index <HASH>..<HASH> 100644 --- a/src/Router.php +++ b/src/Router.php @@ -89,6 +89,7 @@ class Router extends PhalconRouter implements ServiceAwareInterface $this->cookies = static::$di->getShared('cookies'); $this->response = static::$di->getShared('response'); $this->response->setStatusCode(200); + PHP_SAPI == 'cli' && !static::$runningUnitTest and static::disableSession(); } public function addRoutes(array $routes, $prefix = null, $filter = null)
fix(session): disable session in cli mode
phwoolcon_phwoolcon
train
php
9e83fb42ee1b23947ca950cf22d08d3e9cfb2693
diff --git a/test/core/ping.spec.js b/test/core/ping.spec.js index <HASH>..<HASH> 100644 --- a/test/core/ping.spec.js +++ b/test/core/ping.spec.js @@ -175,7 +175,7 @@ describe('ping', function () { it('pinging a not available peer will fail accordingly', (done) => { const unknownPeerId = 'QmUmaEnH1uMmvckMZbh3yShaasvELPW4ZLPWnB4entMTEn' let messageNum = 0 - const count = 1 + // const count = 1 pull( ipfsdA.api.pingPullStream(unknownPeerId, {}), drain(({ success, time, text }) => { @@ -186,7 +186,8 @@ describe('ping', function () { } }, (err) => { expect(err).to.exist() - expect(messageNum).to.equal(count) + // FIXME when we can have streaming + // expect(messageNum).to.equal(count) done() }) )
test: fix ping with disabled dht
ipfs_js-ipfs
train
js
88a2e261bf7f6dae1c1d6cc186e29bbe71b68894
diff --git a/packages/node_modules/@ciscospark/internal-plugin-ediscovery/src/ediscovery.js b/packages/node_modules/@ciscospark/internal-plugin-ediscovery/src/ediscovery.js index <HASH>..<HASH> 100644 --- a/packages/node_modules/@ciscospark/internal-plugin-ediscovery/src/ediscovery.js +++ b/packages/node_modules/@ciscospark/internal-plugin-ediscovery/src/ediscovery.js @@ -71,7 +71,9 @@ const Ediscovery = SparkPlugin.extend({ if (result.items.length <= 0) { throw new Error('Unable to find user with email ' + userEmail); } + // User id is base64 encoded and of the format Y2lzY29zcGFyazovL3VzL1BFT1BMRS81ZDU5Yjc5NS02ZmEyLTQ2NTQtOGVjMi03NjlkYjE1YzBkOWU const decodedId = Buffer.from(result.items[0].id, 'base64').toString(); + // Decode and strip out the uuid ciscospark://us/PEOPLE/5d59b795-6fa2-4654-8ec2-769db15c0d9e const uuid = decodedId.substring(decodedId.lastIndexOf('/') + 1, decodedId.length); return uuid; })
docs(ediscovery): additional comments
webex_spark-js-sdk
train
js
d0eb58a49f39f6fc61ef4d2b1e151b069a7c6c8e
diff --git a/src/aurelia-form.js b/src/aurelia-form.js index <HASH>..<HASH> 100644 --- a/src/aurelia-form.js +++ b/src/aurelia-form.js @@ -29,6 +29,7 @@ export function configure(aurelia, configCallback) { date : '{{framepath}}/input.html', datetime : '{{framepath}}/input.html', 'datetime-local': '{{framepath}}/input.html', + string : '{{framepath}}/input.html', email : '{{framepath}}/input.html', month : '{{framepath}}/input.html', number : '{{framepath}}/input.html', @@ -52,12 +53,11 @@ export function configure(aurelia, configCallback) { options : 'select', buttons : 'actions', nested : 'fieldset', - undefined: 'text', - null : 'text', + undefined: 'string', + null : 'string', int : 'number', integer : 'number', float : 'number', - string : 'text', bool : 'checkbox', boolean : 'checkbox' }
fix(aliases): default type is string and not text
SpoonX_aurelia-form
train
js
bf85283f392459f8c4a723eaf5978985c303d8f0
diff --git a/tests/unit/AppTest.php b/tests/unit/AppTest.php index <HASH>..<HASH> 100644 --- a/tests/unit/AppTest.php +++ b/tests/unit/AppTest.php @@ -202,9 +202,12 @@ class AppTest extends BaseUnitTest $this->assertArrayContentContains('Module parameter unknown'); } + /** + * @group mysql + */ public function testExecuteWithDb() { - $this->assertDbContentContains('Route storage empty'); + $this->assertDbContentContains('Section not exists'); $this->tester->haveInDatabase( 'sections',
test: change app tests logic according to external routing
enikeishik_ufoframework
train
php
82002ec5e8d3a5b7517d9a8ca5fc36e2864334dc
diff --git a/spec/custom.spec.js b/spec/custom.spec.js index <HASH>..<HASH> 100644 --- a/spec/custom.spec.js +++ b/spec/custom.spec.js @@ -1041,4 +1041,47 @@ describe('Custom keywords', function () { validate(2) .should.equal(true); }); }); + + + describe.skip('mutating data', function() { + beforeEach(function() { + const collectionFormat = { + csv: function (data, dataPath, parentData, parentDataProperty, rootData) { + parentData[parentDataProperty] = data.split(','); + return true; + } + }; + + ajv.addKeyword('collectionFormat', { + type: 'string', + compile: function(schema) { return collectionFormat[schema]; }, + metaSchema: { + enum: ['csv'] + } + }); + }); + + it('should allow custom keywords mutating data', function() { + var validate = ajv.compile({ + type: 'object', + properties: { + foo: { + allOf: [ + { collectionFormat: 'csv' }, + { + type: 'array', + items: { type: 'string' }, + } + ] + } + }, + additionalProperties: false + }) + + var obj = { foo: 'bar,baz,quux' }; + + validate(obj) .should.equal(true) + obj .should.eql({ foo: ['bar', 'baz', 'quux'] }) + }); + }); });
test: failing test for custom keyword mutating data, #<I>, #<I>
epoberezkin_ajv
train
js
4c6e4e2aa6d3ad6ffcc2f1c3291d10e5bb667448
diff --git a/pkg/services/alerting/notifiers/discord.go b/pkg/services/alerting/notifiers/discord.go index <HASH>..<HASH> 100644 --- a/pkg/services/alerting/notifiers/discord.go +++ b/pkg/services/alerting/notifiers/discord.go @@ -91,8 +91,7 @@ func (this *DiscordNotifier) Notify(evalContext *alerting.EvalContext) error { embed.Set("fields", fields) embed.Set("footer", footer) - var image = make(map[string]interface{}) - + var image map[string]interface{} var embeddedImage = false if evalContext.ImagePublicUrl != "" { @@ -141,6 +140,9 @@ func (this *DiscordNotifier) Notify(evalContext *alerting.EvalContext) error { } fw, err = w.CreateFormFile("file", "graph.png") + if err != nil { + return err + } if _, err = io.Copy(fw, f); err != nil { return err
fix: fixed gometalinter issues with Discord PR
grafana_grafana
train
go
9508646c44a442bb8ea86d6a1f4527e8a89aacc2
diff --git a/packages/babel-preset/getPresetEnv/getTargets.js b/packages/babel-preset/getPresetEnv/getTargets.js index <HASH>..<HASH> 100644 --- a/packages/babel-preset/getPresetEnv/getTargets.js +++ b/packages/babel-preset/getPresetEnv/getTargets.js @@ -1,7 +1,7 @@ const browsers = require('@goldwasserexchange/browserslist'); const node = (nodeVersion) => ({ - node: nodeVersion.replace(/v/g, '') || 'current', + node: nodeVersion ? nodeVersion.replace(/v/g, '') : 'current', }); const getTargets = (env, target, nodeVersion) => (target === 'node' || (target === 'browser' && env === 'test'))
fix(babel-preset): fix #8 cannot read property replace of null affects: @goldwasserexchange/babel-preset
goldwasserexchange_public
train
js
364487ce5022d729c03623a6bbdd00400cf60f14
diff --git a/src/node_modules/internal/buffer-list.js b/src/node_modules/internal/buffer-list.js index <HASH>..<HASH> 100644 --- a/src/node_modules/internal/buffer-list.js +++ b/src/node_modules/internal/buffer-list.js @@ -101,6 +101,11 @@ module.exports = class BufferList { const subset = this.queue.slice(start + this.offset, end + this.offset); + // Buffer.concat() doesn't have optimization for count == 1 + if (subset.count === 1) { + return subset.first + } + const bufs = new Array(subset.count); let leaf = subset.head; @@ -109,7 +114,7 @@ module.exports = class BufferList { leaf = leaf.next; } - return Buffer.concat(bufs) + return Buffer.concat(bufs, subset.length) } /**
perf: reduce Buffer.concat() calls a bit.
reklatsmasters_binary-data
train
js
dc8b947d5530387b20d0f206e843fd7163d85f34
diff --git a/src/Commands/Publish/PublishTablesCommand.php b/src/Commands/Publish/PublishTablesCommand.php index <HASH>..<HASH> 100755 --- a/src/Commands/Publish/PublishTablesCommand.php +++ b/src/Commands/Publish/PublishTablesCommand.php @@ -26,15 +26,17 @@ class PublishTablesCommand extends PublishBaseCommand if ($tableType === 'datatable') { $this->publishDataTableViews(); + return; } if ($tableType === 'livewire') { $this->publishLivewireTableViews(); + return; } - throw new \Exception("Invalid Table Type"); + throw new \Exception('Invalid Table Type'); } public function publishLivewireTableViews() diff --git a/src/Generators/Scaffold/ViewGenerator.php b/src/Generators/Scaffold/ViewGenerator.php index <HASH>..<HASH> 100755 --- a/src/Generators/Scaffold/ViewGenerator.php +++ b/src/Generators/Scaffold/ViewGenerator.php @@ -246,7 +246,7 @@ class ViewGenerator extends BaseGenerator break; default: - throw new \Exception("Invalid table type"); + throw new \Exception('Invalid table type'); } $templateData = str_replace('$TABLE$', $tableReplaceString, $templateData);
style: Apply fixes from StyleCI (#<I>)
InfyOmLabs_laravel-generator
train
php,php
2b41785312bc605ff941d55cc74c785db66b19e8
diff --git a/packages/veui-theme-dls/components/DatePicker.js b/packages/veui-theme-dls/components/DatePicker.js index <HASH>..<HASH> 100644 --- a/packages/veui-theme-dls/components/DatePicker.js +++ b/packages/veui-theme-dls/components/DatePicker.js @@ -8,10 +8,6 @@ config.defaults( clear: IconTimesCircle }, ui: { - style: { - values: ['alt'], - inherit: true - }, size: { values: ['s', 'm'], inherit: true
fix: remove unsupported style variant for date picker
ecomfe_veui
train
js
353bfc93003d7596040a081341f1cfcbb9c99b2b
diff --git a/core/src/main/java/com/github/gumtreediff/tree/TypeSet.java b/core/src/main/java/com/github/gumtreediff/tree/TypeSet.java index <HASH>..<HASH> 100644 --- a/core/src/main/java/com/github/gumtreediff/tree/TypeSet.java +++ b/core/src/main/java/com/github/gumtreediff/tree/TypeSet.java @@ -29,6 +29,8 @@ import java.util.Map; public class TypeSet { private static final TypeFactoryImplementation implementation = new TypeFactoryImplementation(); + private TypeSet() {} + /** * Build a type with the provided name. If the provided name is null or * the empty string, the empty type will be returned.
fix: typeset constructor is now private.
GumTreeDiff_gumtree
train
java
1100c5a24b0626c01c6248d87172c7ab624bf42f
diff --git a/lib/gzr/cli.rb b/lib/gzr/cli.rb index <HASH>..<HASH> 100644 --- a/lib/gzr/cli.rb +++ b/lib/gzr/cli.rb @@ -29,6 +29,10 @@ module Gzr # # @api public class CLI < Thor + def self.exit_on_failure? + true + end + class_option :debug, type: :boolean, default: false, desc: 'Run in debug mode' class_option :host, type: :string, default: 'localhost', desc: 'Looker Host' class_option :port, type: :string, default: '19999', desc: 'Looker API Port'
fix: remove Thor deprecation warning (#<I>) * fix: refactored look and dashboard cat commands and space export to use the same code to generate each look and dashboard file. * fix: add override for Thor deprecation warning
looker-open-source_gzr
train
rb
23cf22fda545baa55d325747d633d5436134049b
diff --git a/docs/index.js b/docs/index.js index <HASH>..<HASH> 100644 --- a/docs/index.js +++ b/docs/index.js @@ -3,14 +3,14 @@ import ReactDOM from 'react-dom'; import routes from './components/routes'; import Router from 'react-router'; import initializeTheme from './theme/initialize'; -import { createHistory } from 'history'; +import { createHashHistory } from 'history'; // export for http://fb.me/react-devtools window.React = React; initializeTheme(); -const history = createHistory(); +const history = createHashHistory(); const rootComponent = <Router history={history} children={routes} />; ReactDOM.render(rootComponent, document.getElementById('react')); diff --git a/docs/server.js b/docs/server.js index <HASH>..<HASH> 100644 --- a/docs/server.js +++ b/docs/server.js @@ -21,7 +21,7 @@ app.get('*', function(req, res) { res.sendFile(path.join(__dirname, 'index.html')); }); -app.listen(3000, 'localhost', function (err) { +app.listen(3000, 'localhost', function(err) { if (err) { console.log(err); return;
fix(doc): move back to hash history
nikgraf_belle
train
js,js
e536b9e34173e9a5b5f028341c8a47ba747026e6
diff --git a/src/tasks/copy.js b/src/tasks/copy.js index <HASH>..<HASH> 100644 --- a/src/tasks/copy.js +++ b/src/tasks/copy.js @@ -12,6 +12,7 @@ function copyTasks(gulp, config) { function copyDist() { gulp.src([ config.paths.src.root + '**/*.js', + config.paths.src.root + '**/*.json', config.paths.src.root + '**/*.html', ]) .pipe(gulp.dest(config.paths.dist.root));
feat: include json files when copying src -> dist
ApsisInternational_gulp-config-apsis
train
js
ec966237911d3ef438214518f4131dbbaa6f4d4a
diff --git a/packages/ipfs-repo/src/idstore.js b/packages/ipfs-repo/src/idstore.js index <HASH>..<HASH> 100644 --- a/packages/ipfs-repo/src/idstore.js +++ b/packages/ipfs-repo/src/idstore.js @@ -67,7 +67,7 @@ export function createIdStore (store) { // process.nextTick runs on the microtask queue, setImmediate runs on the next // event loop iteration so is slower. Use process.nextTick if it is available. - const runner = process && process.nextTick ? process.nextTick : setImmediate + const runner = globalThis.process && globalThis.process.nextTick ? globalThis.process.nextTick : (globalThis.setImmediate || globalThis.setTimeout) runner(async () => { try {
fix: access process from globalThis (#<I>) Fixes webpack error: ``` Module not found: Error: Can't resolve 'process/browser' in /path/... ``` Falls back to `setImmediate`, then `setTimeout`.
ipfs_js-ipfs-repo
train
js
b8614bde7f9d29e2f89dbd13e81d04b6664b317d
diff --git a/src/Lucid/Model/Mixins/Persistance.js b/src/Lucid/Model/Mixins/Persistance.js index <HASH>..<HASH> 100644 --- a/src/Lucid/Model/Mixins/Persistance.js +++ b/src/Lucid/Model/Mixins/Persistance.js @@ -53,13 +53,14 @@ Peristance.insert = function * () { * * @public */ -Peristance.update = function * (dirtyValues) { +Peristance.update = function * () { /** * update handler is sent to hooks execution method * and will be called there itself. */ const updateHandler = function * () { const query = this.constructor.query() + const dirtyValues = this.$dirty if (!_.size(dirtyValues)) { return 0 }
fix(lucid): consider dirty values after beforeHooks beforeUpdate has the ability to update model attributes and dirty values should get evaluated after that Closes #<I>
adonisjs_adonis-lucid
train
js
d48f580646a4c51964dda2549e9ab65af9049763
diff --git a/packages/collector/test/uncaught/uncaught_exceptions_test.js b/packages/collector/test/uncaught/uncaught_exceptions_test.js index <HASH>..<HASH> 100644 --- a/packages/collector/test/uncaught/uncaught_exceptions_test.js +++ b/packages/collector/test/uncaught/uncaught_exceptions_test.js @@ -54,7 +54,7 @@ describe('uncaught exceptions', function() { return testUtils.retry( () => agentControls.getSpans().then(spans => { - testUtils.expectAtLeastOneMatching(spans, span => { + return testUtils.expectAtLeastOneMatching(spans, span => { expect(span.n).to.equal('node.http.server'); expect(span.f.e).to.equal(String(serverControls.getPid())); expect(span.f.h).to.equal('agent-stub-uuid');
fix(test): fix test for uncaught exception
instana_nodejs-sensor
train
js
cfbe3661f4c551734ae98d882e06fc16f9510f17
diff --git a/src/Leevel/Database/Condition.php b/src/Leevel/Database/Condition.php index <HASH>..<HASH> 100644 --- a/src/Leevel/Database/Condition.php +++ b/src/Leevel/Database/Condition.php @@ -2195,7 +2195,6 @@ class Condition // 格式化字段值,支持数组 if (array_key_exists(2, $cond)) { $isArray = true; - if (!is_array($cond[2])) { $cond[2] = [$cond[2]]; $isArray = false; @@ -2250,8 +2249,7 @@ class Condition $cond[2][$condKey] = $tmp; } - if (false === $isArray || - (1 === count($cond[2]) && 0 === strpos((string) ($cond[2][0]), '('))) { + if (false === $isArray) { $cond[2] = reset($cond[2]); } }
fix(database): remove bad code for parse where and having condition
hunzhiwange_framework
train
php
0cfd6874056cdda1e62dec6f832b1ee8fe8d9531
diff --git a/lib/amqp_client.js b/lib/amqp_client.js index <HASH>..<HASH> 100644 --- a/lib/amqp_client.js +++ b/lib/amqp_client.js @@ -139,7 +139,7 @@ AMQPClient.prototype.connect = function(url) { self._session = self._newSession(c); } - self._session.on(Session.Mapped, function(s) { + self._session.once(Session.Mapped, function(s) { debug('mapped'); resolve(self); });
fix(client): only listen for Session.Mapped once during connect
noodlefrenzy_node-amqp10
train
js
4f968bab2353d5c42f78e5c397d9d9675221ae6d
diff --git a/epab/cmd/test_runner.py b/epab/cmd/test_runner.py index <HASH>..<HASH> 100644 --- a/epab/cmd/test_runner.py +++ b/epab/cmd/test_runner.py @@ -16,6 +16,9 @@ COVERAGE_CONFIG = r""" #timid = True branch = True source = epab +omit = + */_versioneer.py + {package_name}/_version.py [report] # Regexes for lines to exclude from consideration @@ -55,7 +58,7 @@ def _run_tests(ctx): _info('Running test suite') os.environ['PYTEST_QT_API'] = 'pyqt5' coverage_rc = Path('.coveragerc') - coverage_rc.write_text(COVERAGE_CONFIG) + coverage_rc.write_text(COVERAGE_CONFIG.format(package_name=ctx.obj["CONFIG"]["package"])) cmd = ['pytest', 'test'] if os.environ.get('APPVEYOR') and ctx.obj['CONFIG']['test']['av_runner_options']: cmd = cmd + ctx.obj['CONFIG']['test']['av_runner_options']
fix: omit versioneer files during coverage
etcher-be_epab
train
py
0ef0694cc34496afd1d08b013daae29b8782e694
diff --git a/docs/gatsby-config.js b/docs/gatsby-config.js index <HASH>..<HASH> 100644 --- a/docs/gatsby-config.js +++ b/docs/gatsby-config.js @@ -25,7 +25,7 @@ module.exports = { null: [ 'index', { - resolve: '/storybook', + resolve: '[Storybook](/storybook)', isRelative: false, withPrefix: true, },
refactor(react-docs): fixed relative link
Availity_availity-react
train
js
971bfabacb97f5b88301b19918eaf3ef72504da7
diff --git a/examples/07-display-field.js b/examples/07-display-field.js index <HASH>..<HASH> 100644 --- a/examples/07-display-field.js +++ b/examples/07-display-field.js @@ -9,5 +9,5 @@ module.exports = function (migration) { .type('Symbol') .name('what it tastes like'); - food.displayField('amount'); + food.displayField('taste'); };
fix(examples): display field in example to an existing field
contentful_contentful-migration
train
js
de3f059cc3b9d6352cd9312280842c7a804ceac1
diff --git a/samples/greengrass/basicDiscovery.py b/samples/greengrass/basicDiscovery.py index <HASH>..<HASH> 100644 --- a/samples/greengrass/basicDiscovery.py +++ b/samples/greengrass/basicDiscovery.py @@ -123,13 +123,13 @@ while retryCount != 0: except DiscoveryInvalidRequestException as e: print("Invalid discovery request detected!") print("Type: %s" % str(type(e))) - print("Error message: %s" % e.message) + print("Error message: %s" % str(e)) print("Stopping...") break except BaseException as e: print("Error in discovery!") print("Type: %s" % str(type(e))) - print("Error message: %s" % e.message) + print("Error message: %s" % str(e)) retryCount -= 1 print("\n%d/%d retries left\n" % (retryCount, MAX_DISCOVERY_RETRIES)) print("Backing off...\n") @@ -157,7 +157,7 @@ for connectivityInfo in coreInfo.connectivityInfoList: except BaseException as e: print("Error in connect!") print("Type: %s" % str(type(e))) - print("Error message: %s" % e.message) + print("Error message: %s" % str(e)) if not connected: print("Cannot connect to core %s. Exiting..." % coreInfo.coreThingArn)
fix: use string representation of error (Fixes #<I>) A BaseException does not always have a message field. Traceback (most recent call last): File "basicDiscovery.py", line <I>, in <module> print("Error message: %s" % e.message) AttributeError: 'ConnectionRefusedError' object has no attribute 'message'
aws_aws-iot-device-sdk-python
train
py
baf9169c4852ed3af7a0e13ac1511a788d6c7fae
diff --git a/src/storyFinder/index.test.js b/src/storyFinder/index.test.js index <HASH>..<HASH> 100644 --- a/src/storyFinder/index.test.js +++ b/src/storyFinder/index.test.js @@ -10,13 +10,13 @@ import { loadStories } from './'; jest.mock('glob'); beforeEach(() => { - jest.resetAllMocks(); + jest.clearAllMocks(); }); const files = [faker.system.fileName(), faker.system.fileName()]; -function setupMocks(sync) { - glob.sync = jest.fn(sync || (() => files)); +function setupMocks() { + glob.sync = jest.fn(() => files); } test('loadStories should locate stories', () => { @@ -24,3 +24,12 @@ test('loadStories should locate stories', () => { const actual = loadStories(); expect(actual).toBe(files); }); + +test('loadStories should perform expected work', () => { + setupMocks(); + const pattern = faker.system.fileName(); + + loadStories(pattern); + + expect(glob.sync).toHaveBeenCalledWith(pattern); +});
test(storyFinder): Added a test to confirm glob call
elderfo_react-native-storybook-loader
train
js
9687015e07c0c6b669b4afeae3595a2adf19bfc4
diff --git a/lib/dependencies/LocalModule.js b/lib/dependencies/LocalModule.js index <HASH>..<HASH> 100644 --- a/lib/dependencies/LocalModule.js +++ b/lib/dependencies/LocalModule.js @@ -2,18 +2,22 @@ MIT License http://www.opensource.org/licenses/mit-license.php Author Tobias Koppers @sokra */ -function LocalModule(module, name, idx) { - this.module = module; - this.name = name; - this.idx = idx; - this.used = false; -} -module.exports = LocalModule; +"use strict"; + +class LocalModule { + constructor(module, name, idx) { + this.module = module; + this.name = name; + this.idx = idx; + this.used = false; + } -LocalModule.prototype.flagUsed = function() { - this.used = true; -}; + flagUsed() { + this.used = true; + } -LocalModule.prototype.variableName = function() { - return "__WEBPACK_LOCAL_MODULE_" + this.idx + "__"; -}; + variableName() { + return "__WEBPACK_LOCAL_MODULE_" + this.idx + "__"; + } +} +module.exports = LocalModule;
refactor(ES6): upgrade LocalModule to ES6
webpack_webpack
train
js