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
bf3379a817809f7c9f92d158e2c3de186e06f358
diff --git a/test/test.js b/test/test.js index <HASH>..<HASH> 100644 --- a/test/test.js +++ b/test/test.js @@ -5,7 +5,7 @@ describe('XmlParserMiddleware', function () { describe('#testMime', function () { - var regexp = /^(text\/xml|application\/([\w!#\$%&\*`\-\.\^~]+\+)?xml)$/i; + var regexp = xmlparser.regexp; it('should detect common XML mime-types', function () {
chore: use same regexp in tests as in module itself
macedigital_express-xml-bodyparser
train
js
1426a6e0428f385fe0b97d2a20bb05d5681da0a2
diff --git a/pymatgen/entries/compatibility.py b/pymatgen/entries/compatibility.py index <HASH>..<HASH> 100644 --- a/pymatgen/entries/compatibility.py +++ b/pymatgen/entries/compatibility.py @@ -865,8 +865,9 @@ class MaterialsProject2020Compatibility(Compatibility): # if config_file: # self.config_file = config_file # else: - self.config_file = os.path.join(MODULE_DIR, "MP2020Compatibility.yaml") - c = loadfn(self.config_file) + self.config_file = None + c = loadfn(os.path.join(MODULE_DIR, "MP2020Compatibility.yaml")) + self.name = c["Name"] self.comp_correction = c["Corrections"].get("CompositionCorrections", defaultdict(float)) self.comp_errors = c["Uncertainties"].get("CompositionCorrections", defaultdict(float))
fix: force path to None as a temp measure
materialsproject_pymatgen
train
py
234b6bbba9096eb70eccd7f4d4fa1efd32c0bcca
diff --git a/superset/db_engine_specs/oracle.py b/superset/db_engine_specs/oracle.py index <HASH>..<HASH> 100644 --- a/superset/db_engine_specs/oracle.py +++ b/superset/db_engine_specs/oracle.py @@ -15,7 +15,7 @@ # specific language governing permissions and limitations # under the License. from datetime import datetime -from typing import Optional +from typing import Any, List, Optional, Tuple from superset.db_engine_specs.base import BaseEngineSpec, LimitMethod from superset.utils import core as utils @@ -58,3 +58,16 @@ class OracleEngineSpec(BaseEngineSpec): @classmethod def epoch_ms_to_dttm(cls) -> str: return "TO_DATE('1970-01-01','YYYY-MM-DD')+(1/24/60/60/1000)*{col}" + + @classmethod + def fetch_data( + cls, cursor: Any, limit: Optional[int] = None + ) -> List[Tuple[Any, ...]]: + """ + :param cursor: Cursor instance + :param limit: Maximum number of rows to be returned by the cursor + :return: Result of query + """ + if not cursor.description: + return [] + return super().fetch_data(cursor, limit)
fix(db-engine-spec): execute oracle DML statement bug in sqllab (#<I>) * fix execute oracle DML statement bug in sqllab when i execute oracle sql statements like update in SQLLAB, get "oracle error: not a query" error. Refer <URL> method yet. * Apply suggestions from code review
apache_incubator-superset
train
py
defe668a85cc61785a2f7baa4aa1bbb3c9691362
diff --git a/client/response_test.go b/client/response_test.go index <HASH>..<HASH> 100644 --- a/client/response_test.go +++ b/client/response_test.go @@ -37,5 +37,6 @@ func TestResponse(t *testing.T) { assert.EqualValues(t, under.StatusCode, resp.Code()) assert.Equal(t, under.Status, resp.Message()) assert.Equal(t, "blah blah", resp.GetHeader("blah")) + assert.Equal(t, []string{"blah blah"}, resp.GetHeaders("blah")) assert.Equal(t, under.Body, resp.Body()) }
chore: add unit test for new method
go-openapi_runtime
train
go
2cdbabe32cdb05dadb43d5c65bca42118b36f135
diff --git a/benchbuild/environments/adapters/podman.py b/benchbuild/environments/adapters/podman.py index <HASH>..<HASH> 100644 --- a/benchbuild/environments/adapters/podman.py +++ b/benchbuild/environments/adapters/podman.py @@ -190,7 +190,7 @@ class PodmanRegistry(ContainerRegistry): create_cmd = create_cmd[ '--mount', f'type=bind,src={source},target={target}'] - container_id, err = run(create_cmd['--name', name, image.name, args]) + container_id, err = run(create_cmd['--name', name, image.name][args]) if err: raise ContainerCreateError( container_id, " ".join(err.argv)
fix(environments): supply args as dedicated subcommand args
PolyJIT_benchbuild
train
py
800503ea75ba4b95b8b673d15cbaef181a74d0bd
diff --git a/views/js/qtiCreator/widgets/interactions/extendedTextInteraction/states/Question.js b/views/js/qtiCreator/widgets/interactions/extendedTextInteraction/states/Question.js index <HASH>..<HASH> 100755 --- a/views/js/qtiCreator/widgets/interactions/extendedTextInteraction/states/Question.js +++ b/views/js/qtiCreator/widgets/interactions/extendedTextInteraction/states/Question.js @@ -147,6 +147,15 @@ define([ $constraintsBlock = $form.find('#constraints'); $recommendationsBlock = $form.find('#recommendations'); + if (format === 'xhtml') { + if (!features.isVisible('taoQtiItem/creator/interaction/extendedText/property/xhtmlConstraints')) { + $constraintsBlock.hide(); + } + if (!features.isVisible('taoQtiItem/creator/interaction/extendedText/property/xhtmlRecommendations')) { + $recommendationsBlock.hide(); + } + } + // init data change callbacks var callbacks = {};
fix: call feature hiding on item load
oat-sa_extension-tao-itemqti
train
js
74a199d3c3d8ea06e714fd6cb56e5d95cb39713c
diff --git a/js/gateio.js b/js/gateio.js index <HASH>..<HASH> 100755 --- a/js/gateio.js +++ b/js/gateio.js @@ -2641,7 +2641,7 @@ module.exports = class gateio extends Exchange { request['limit'] = limit; } if (since !== undefined && (market['spot'] || market['margin'])) { - request['start'] = parseInt (since / 1000); + request['from'] = parseInt (since / 1000); } const method = this.getSupportedMapping (market['type'], { 'spot': 'privateSpotGetOrders',
fix: request 'start' should be 'from' in gateio
ccxt_ccxt
train
js
c1fdae0438063ffe7d34423db8fcbd6477ecea61
diff --git a/tests/e2e/pattern-lab-compiling.js b/tests/e2e/pattern-lab-compiling.js index <HASH>..<HASH> 100644 --- a/tests/e2e/pattern-lab-compiling.js +++ b/tests/e2e/pattern-lab-compiling.js @@ -75,7 +75,7 @@ module.exports = { 'Bolt Docs: Verify Docs Site Compiled + Deployed': function (browser) { browser .url(`${testingUrl}`) - .waitForElementVisible('.c-bolt-site', 1000) + .waitForElementVisible('body.c-bolt-site', 1000) .assert.containsText('h1.c-bolt-headline', 'Bolt Design System') .end() },
chore: revert updating nightwatch test selector -- stashing for a separate PR
bolt-design-system_bolt
train
js
52fd80576143c0cc1758a02b32bcc0eae8e673a7
diff --git a/test/rules/no-angular-classes.js b/test/rules/no-angular-classes.js index <HASH>..<HASH> 100644 --- a/test/rules/no-angular-classes.js +++ b/test/rules/no-angular-classes.js @@ -17,7 +17,11 @@ eslintTester.run('no-angular-classes', rule, { '$$(".myotherclass.myclass");', '$("input.myclass");', 'var s = "ng-scope";', - 'element(by.id("ng-isolate-scope"));' + 'element(by.id("ng-isolate-scope"));', + '$();', + '$$();', + 'element(by.css());', + 'element.all(by.css());' ], invalid: [
test(rules): add a test for 'no-angular-classes' rule for the no arguments case
alecxe_eslint-plugin-protractor
train
js
a40d7632f856a78ff78c0428075c78f90af67a68
diff --git a/src/repository.js b/src/repository.js index <HASH>..<HASH> 100644 --- a/src/repository.js +++ b/src/repository.js @@ -1,5 +1,6 @@ import {inject} from 'aurelia-dependency-injection'; import {Config} from 'spoonx/aurelia-api'; +import typer from 'typer'; @inject(Config) export class Repository { @@ -164,6 +165,12 @@ export class Repository { let value = data[key]; + if (entityMetadata.has('types', key)) { + populatedData[key] = typer.cast(value, entityMetadata.fetch('types', key)); + + continue; + } + if (!entityMetadata.has('associations', key) || typeof value !== 'object') { // Not an association, or not an object. clean copy. populatedData[key] = value;
feat(repository): Cast values if they have type decorators
SpoonX_aurelia-orm
train
js
cf390090762ba4588b7cebc2dabb8a7b332e49d7
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -68,7 +68,7 @@ class Bugspots { } async _paginate(method, param) { - let response = await method({...param, per_page: 100}); + let response = await method(Object.assign(param, {per_page: 100})); let {data} = response; while (this.octokit.hasNextPage(response)) { response = await this.octokit.getNextPage(response);
fix: Not spread operator but Object.assign because of not supporting in <I>.
aha-oretama_github-bugspots
train
js
7273037c687963fff0281744c13bd2e1e2f65ac8
diff --git a/anyconfig/backend/base.py b/anyconfig/backend/base.py index <HASH>..<HASH> 100644 --- a/anyconfig/backend/base.py +++ b/anyconfig/backend/base.py @@ -572,7 +572,7 @@ def dump_with_fn(dump_fn, data, stream, **options): if stream is None: return dump_fn(data, **options) - dump_fn(data, stream, **options) + return dump_fn(data, stream, **options) class StringStreamFnParser(Parser, FromStreamLoaderMixin, ToStreamDumperMixin):
fix: suppress pylint's warn, inconsistent-return-statements (not a bug actually but just in case)
ssato_python-anyconfig
train
py
dd4edec5d275a55d4c4bee8873d6ecbd83bb08d0
diff --git a/scheduler/fleet.py b/scheduler/fleet.py index <HASH>..<HASH> 100644 --- a/scheduler/fleet.py +++ b/scheduler/fleet.py @@ -129,7 +129,7 @@ class FleetHTTPClient(object): # prepare memory limit for the container type mem = kwargs.get('memory', {}).get(l['c_type'], None) if mem: - l.update({'memory': '-m {}'.format(mem.lower())}) + l.update({'memory': '-m {} --memory-swap=-1'.format(mem.lower())}) else: l.update({'memory': ''}) # prepare memory limit for the container type
feat(controller): disable swap usage if there is a memory limit
deis_controller-sdk-go
train
py
df5224cf9fad74e9b64c3e053bf9c8ceae323f2a
diff --git a/lib/openapi3.js b/lib/openapi3.js index <HASH>..<HASH> 100644 --- a/lib/openapi3.js +++ b/lib/openapi3.js @@ -631,6 +631,7 @@ function convertInner(api, options, callback) { let header = {}; header.title = api.info && (api.info.title||'API') + ' ' + data.version; header.language_tabs = options.language_tabs; + if (options.language_clients) header.language_clients = options.language_clients; header.toc_footers = []; if (api.externalDocs) { if (api.externalDocs.url) {
feat: include language_clients in yaml frontmatter
Mermade_widdershins
train
js
6066b076b9cd9d836044e062a3bfdb80bf02d0a2
diff --git a/lib/gitWorkflow.js b/lib/gitWorkflow.js index <HASH>..<HASH> 100644 --- a/lib/gitWorkflow.js +++ b/lib/gitWorkflow.js @@ -306,7 +306,7 @@ class GitWorkflow { await Promise.all(this.deletedFiles.map(file => unlink(file))) // Clean out patch - if (this.partiallyStagedFiles) await unlink(PATCH_UNSTAGED) + await unlink(this.getHiddenFilepath(PATCH_UNSTAGED)) debug('Done restoring original state!') } catch (error) {
fix: pass correct path to unstaged patch during cleanup
okonet_lint-staged
train
js
59b811ac5bf6ea64da8e9343fed28676001b9015
diff --git a/superset/reports/api.py b/superset/reports/api.py index <HASH>..<HASH> 100644 --- a/superset/reports/api.py +++ b/superset/reports/api.py @@ -211,7 +211,7 @@ class ReportScheduleRestApi(BaseSupersetModelRestApi): "dashboard": "dashboard_title", "chart": "slice_name", "database": "database_name", - "owners": RelatedFieldFilter("first_name", FilterRelatedOwners), + "created_by": RelatedFieldFilter("first_name", FilterRelatedOwners), } apispec_parameter_schemas = { diff --git a/tests/integration_tests/reports/api_tests.py b/tests/integration_tests/reports/api_tests.py index <HASH>..<HASH> 100644 --- a/tests/integration_tests/reports/api_tests.py +++ b/tests/integration_tests/reports/api_tests.py @@ -432,7 +432,7 @@ class TestReportSchedulesApi(SupersetTestCase): ReportSchedule Api: Test get releated report schedule """ self.login(username="admin") - related_columns = ["owners", "chart", "dashboard", "database"] + related_columns = ["created_by", "chart", "dashboard", "database"] for related_column in related_columns: uri = f"api/v1/report/related/{related_column}" rv = self.client.get(uri)
fix: report list search by created_by (#<I>)
apache_incubator-superset
train
py,py
3f1111222cdd678c234f8b8b1037c3264c538507
diff --git a/src/server.js b/src/server.js index <HASH>..<HASH> 100644 --- a/src/server.js +++ b/src/server.js @@ -22,7 +22,9 @@ app.use(helmet.ieNoOpen()) app.disable('x-powered-by') app.use((req, res, next) => { - res.setHeader('Access-Control-Allow-Origin', req.protocol + '://' + process.env.UPPY_ENDPOINT) + var protocol = req.headers.origin.startsWith('https') ? 'https' : 'http' + + res.setHeader('Access-Control-Allow-Origin', protocol + '://' + process.env.UPPY_ENDPOINT) res.setHeader('Access-Control-Allow-Methods', 'GET, POST, OPTIONS, PUT, PATCH, DELETE') res.setHeader('Access-Control-Allow-Headers', 'Authorization, Origin, Content-Type, Accept') res.setHeader('Access-Control-Allow-Credentials', true)
fix: cors protocol from origin header
transloadit_uppy-server
train
js
1a29a8f6c92a23655f3cc8e8470f6469aaef3152
diff --git a/src/lib/modules/blockchain_process/simulator.js b/src/lib/modules/blockchain_process/simulator.js index <HASH>..<HASH> 100644 --- a/src/lib/modules/blockchain_process/simulator.js +++ b/src/lib/modules/blockchain_process/simulator.js @@ -75,7 +75,8 @@ class Simulator { const programName = 'ganache-cli'; const program = ganache; console.log(`running: ${programName} ${cmds.join(' ')}`); - shelljs.exec(`${program} ${cmds.join(' ')}`, {async : true}); + + shelljs.exec(`node ${program} ${cmds.join(' ')}`, {async : true}); if(useProxy){ let ipcObject = new Ipc({ipcRole: 'client'});
fix(simulator): adds `node` to sim command to comply with Windows
embark-framework_embark
train
js
9cb7402158745d8c4f7aacb4efbe64574dbf4e19
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 @@ -1179,6 +1179,8 @@ proto.parse = function(text, root) { if (inlineValues) { this._values = extend({}, this._orgValues, inlineValues); inlineValues = null; + } else { + this._values = this._orgValues; } };
feat: support for setting mutil inline value in Rules
avwo_whistle
train
js
83d0080343a576708e9596e382a0ced58518c2bb
diff --git a/lib/push.js b/lib/push.js index <HASH>..<HASH> 100644 --- a/lib/push.js +++ b/lib/push.js @@ -1,6 +1,6 @@ // Require Packages -const get = require('lodash.get'); -const set = require('lodash.set'); +const get = require('lodash/get'); +const set = require('lodash/set'); module.exports = function(db, params, options) { @@ -49,4 +49,4 @@ module.exports = function(db, params, options) { return newData } -} \ No newline at end of file +}
feat: switch to lodash singular package
TrueXPixels_quick.db
train
js
4b45c1f98c433f2edceaef063d0bf3e93917fc32
diff --git a/server.go b/server.go index <HASH>..<HASH> 100644 --- a/server.go +++ b/server.go @@ -614,7 +614,11 @@ func (s *server) loop() { // until the event is actually processed before returning. func (s *server) send(value interface{}) (interface{}, error) { event := &ev{target: value, c: make(chan error, 1)} - s.c <- event + select { + case s.c <- event: + case <-s.stopped: + return nil, StopError + } select { case <-s.stopped: return nil, StopError @@ -637,7 +641,10 @@ func (s *server) sendAsync(value interface{}) { s.routineGroup.Add(1) go func() { defer s.routineGroup.Done() - s.c <- event + select { + case s.c <- event: + case <-s.stopped: + } }() }
chore(server): avoid blocking on event send
influxdata_influxdb
train
go
2499087e2e9c5a3349b9652a5adbb7a1fcf91b34
diff --git a/fastly/condition.go b/fastly/condition.go index <HASH>..<HASH> 100644 --- a/fastly/condition.go +++ b/fastly/condition.go @@ -4,6 +4,7 @@ import ( "fmt" "net/url" "sort" + "time" ) // Condition represents a condition response from the Fastly API. @@ -11,11 +12,14 @@ type Condition struct { ServiceID string `mapstructure:"service_id"` Version int `mapstructure:"version"` - Name string `mapstructure:"name"` - Comment string `mapstructure:"comment"` - Statement string `mapstructure:"statement"` - Type string `mapstructure:"type"` - Priority int `mapstructure:"priority"` + Name string `mapstructure:"name"` + Comment string `mapstructure:"comment"` + Statement string `mapstructure:"statement"` + Type string `mapstructure:"type"` + Priority int `mapstructure:"priority"` + CreatedAt *time.Time `mapstructure:"created_at"` + UpdatedAt *time.Time `mapstructure:"updated_at"` + DeletedAt *time.Time `mapstructure:"deleted_at"` } // conditionsByName is a sortable list of conditions.
feat(condition): add timestamp fields to response object Add support for created_at, updated_at, and deleted_at fields.
sethvargo_go-fastly
train
go
0c56e27f04d32f5b4206681d05f9b3481576492f
diff --git a/gulpfile.js b/gulpfile.js index <HASH>..<HASH> 100644 --- a/gulpfile.js +++ b/gulpfile.js @@ -535,7 +535,7 @@ gulp.task('build:demo', () => { }); gulp.task('build:demo:prod', () => { - return execDemoCmd(`build --preserve-symlinks --prod --aot --build-optimizer --base-href /@angular-material-extensions/password-strength/ --deploy-url /@angular-material-extensions/password-strength/`, {cwd: `${config.demoDir}`}); + return execDemoCmd(`build --preserve-symlinks --prod --aot --build-optimizer --base-href /password-strength/ --deploy-url /password-strength/`, {cwd: `${config.demoDir}`}); }); gulp.task('serve:demo-ssr', ['build:demo'], () => { @@ -569,7 +569,7 @@ gulp.task('push:demo', () => { }); gulp.task('deploy:demo', (cb) => { - runSequence('build:demo', 'build:doc', 'push:demo', cb); + runSequence('build:demo:prod', 'build:doc', 'push:demo', cb); });
chore(package): fixed base href and deploy url params for the build demo prod task
angular-material-extensions_password-strength
train
js
1a7e7a93b261c32284f75719745b3b78f2eae766
diff --git a/src/scaffolder-test.js b/src/scaffolder-test.js index <HASH>..<HASH> 100644 --- a/src/scaffolder-test.js +++ b/src/scaffolder-test.js @@ -264,7 +264,7 @@ suite('javascript project scaffolder', () => { async () => { const {verificationCommand} = await scaffold(options); - assert.equal(verificationCommand, 'npm test'); + assert.equal(verificationCommand, 'npm run generate:* && npm test'); } ); }); diff --git a/src/scaffolder.js b/src/scaffolder.js index <HASH>..<HASH> 100644 --- a/src/scaffolder.js +++ b/src/scaffolder.js @@ -114,7 +114,7 @@ export async function scaffold(options) { badges: buildBadgesDetails(contributors), documentation: scaffoldDocumentation({projectTypeResults}), vcsIgnore: buildVcsIgnoreLists(contributors), - verificationCommand: 'npm test', + verificationCommand: 'npm run generate:* && npm test', projectDetails: {...projectHomepage && {homepage: projectHomepage}}, nextSteps: contributors .reduce((acc, contributor) => (contributor.nextSteps ? [...acc, ...contributor.nextSteps] : acc), [])
feat(generate): called generate scripts btwn scaffolding & verification
travi_javascript-scaffolder
train
js,js
867f9129436e59f2b70f33a951beff0803d22203
diff --git a/Events/CustomerPlugin.php b/Events/CustomerPlugin.php index <HASH>..<HASH> 100644 --- a/Events/CustomerPlugin.php +++ b/Events/CustomerPlugin.php @@ -295,11 +295,10 @@ class CustomerPlugin $storeId = 0, $sendemailStoreId = null ) { - exit('3'); if (!$storeId) { $storeId = $this->getWebsiteStoreId($customer, $sendemailStoreId); } - + return $proceed($customer, $type, $backUrl, $storeId, $sendemailStoreId); /*if (! $this->scopeConfig->getValue( path_in_the_config_table,
fix(customer-plugin): quick fix MAGENTO-OPS
emartech_magento2-extension
train
php
8f11bfd932d9cfb6c8466ad9299f02c73066034f
diff --git a/src/pipeline-provider.js b/src/pipeline-provider.js index <HASH>..<HASH> 100644 --- a/src/pipeline-provider.js +++ b/src/pipeline-provider.js @@ -26,6 +26,7 @@ export class PipelineProvider { //NOTE: app state changes start below - point of no return DeactivatePreviousStep, //optional ActivateNextStep, //optional + createRouteFilterStep('precommit'), CommitChangesStep ]; } @@ -35,4 +36,4 @@ export class PipelineProvider { this.steps.forEach(step => pipeline.withStep(this.container.get(step))); return pipeline; } -} \ No newline at end of file +}
feat(router): Add a precommit extension point to the pipeline
aurelia_router
train
js
7213a95d7e8996e741d7fc0052ca3b551647eb9e
diff --git a/src/swarm.js b/src/swarm.js index <HASH>..<HASH> 100644 --- a/src/swarm.js +++ b/src/swarm.js @@ -117,6 +117,12 @@ module.exports = (common) => { Swarm: addrs, API: '/ip4/127.0.0.1/tcp/0', Gateway: '/ip4/127.0.0.1/tcp/0' + }, + Bootstrap: [], + Discovery: { + MDNS: { + Enabled: false + } } } } @@ -213,6 +219,7 @@ module.exports = (common) => { (cb) => { nodeA.swarm.peers((err, peers) => { expect(err).to.not.exist() + peers.forEach((peer) => console.log(peer.addr.toString())) expect(peers).to.have.length(1) cb() })
fix: swarm test - disable bootstrap and multicastdns
ipfs_interface-js-ipfs-core
train
js
39fb41684618f480d4b95ccdf0422f7dd7cd9be0
diff --git a/source/rafcon/gui/controllers/top_tool_bar.py b/source/rafcon/gui/controllers/top_tool_bar.py index <HASH>..<HASH> 100644 --- a/source/rafcon/gui/controllers/top_tool_bar.py +++ b/source/rafcon/gui/controllers/top_tool_bar.py @@ -88,7 +88,7 @@ class TopToolBarController(ExtendedController): if event.is_hint: window_containing_pointer, x, y, state = event.get_window().get_pointer() else: - state = event.get_state() + state = event.get_state()[1] if state & Gdk.ModifierType.BUTTON1_MASK: self.top_level_window.begin_move_drag(Gdk.ModifierType.BUTTON1_MASK, int(event.x_root), int(event.y_root), 0)
fix(controllers): Access of event state
DLR-RM_RAFCON
train
py
732d37455e74e6472fb776db788804e7b47259ea
diff --git a/src/events/http/HttpServer.js b/src/events/http/HttpServer.js index <HASH>..<HASH> 100644 --- a/src/events/http/HttpServer.js +++ b/src/events/http/HttpServer.js @@ -5,7 +5,6 @@ import { join, resolve } from 'node:path' import process, { env, exit } from 'node:process' import h2o2 from '@hapi/h2o2' import { Server } from '@hapi/hapi' -import * as pathUtils from 'node:path' import authFunctionNameExtractor from '../authFunctionNameExtractor.js' import authJWTSettingsExtractor from './authJWTSettingsExtractor.js' import createAuthScheme from './createAuthScheme.js' @@ -429,10 +428,7 @@ export default class HttpServer { customizations && customizations.offline?.customAuthenticationProvider ) { - const root = pathUtils.resolve( - this.#serverless.serviceDir, - 'require-resolver', - ) + const root = resolve(this.#serverless.serviceDir, 'require-resolver') const customRequire = createRequire(root) const provider = customRequire(
refactor: re-use path.resolve kimport
dherault_serverless-offline
train
js
92158e69e17b6d3d091bd49883eaf9705241494b
diff --git a/build/tasks/test.js b/build/tasks/test.js index <HASH>..<HASH> 100644 --- a/build/tasks/test.js +++ b/build/tasks/test.js @@ -8,10 +8,10 @@ gulp.task('test', ['lint'], function(done) { var karmaServer = new KarmaServer({ configFile: __dirname + '/../../karma.conf.js', singleRun: true - }, function() { + }, function(exitCode) { done(); - process.exit(); + process.exit(exitCode); }); karmaServer.start();
chore(test): test task exit with exit code
SpoonX_aurelia-authentication
train
js
7e3c706faaac6e61400a81409b4e408d96593334
diff --git a/src/android/NotificareUtils.java b/src/android/NotificareUtils.java index <HASH>..<HASH> 100644 --- a/src/android/NotificareUtils.java +++ b/src/android/NotificareUtils.java @@ -371,9 +371,13 @@ public class NotificareUtils { public static JSONObject mapInboxItem(NotificareInboxItem notificareInboxItem) throws JSONException { JSONObject inboxItemMap = new JSONObject(); inboxItemMap.put("inboxId", notificareInboxItem.getItemId()); - inboxItemMap.put("notification", notificareInboxItem.getNotification().getNotificationId()); + if (notificareInboxItem.getNotification() != null) { + inboxItemMap.put("notification", notificareInboxItem.getNotification().getNotificationId()); + } inboxItemMap.put("type", notificareInboxItem.getType()); - inboxItemMap.put("message", notificareInboxItem.getNotification().getMessage()); + if (notificareInboxItem.getNotification() != null) { + inboxItemMap.put("message", notificareInboxItem.getNotification().getMessage()); + } inboxItemMap.put("title", notificareInboxItem.getTitle()); inboxItemMap.put("subtitle", notificareInboxItem.getSubtitle()); if (notificareInboxItem.getAttachment() != null) {
fix: check null notification on mapping ISSUE SDK-<I>
Notificare_notificare-push-lib-cordova
train
java
351f4d98921e593150efb13c3ad14c24afefb693
diff --git a/middlewares/flow.js b/middlewares/flow.js index <HASH>..<HASH> 100644 --- a/middlewares/flow.js +++ b/middlewares/flow.js @@ -67,6 +67,9 @@ function repeatAttribute (array) { iteration: for (let item of array) { let prevItem = prevArray[++i] + if (prevItem === item) { + continue + } if (trackBy(item, prevItem, trackByProp)) { this.$mutateContext(i, {[repeatValue]: item}) prevArray[i] = item
perf(flow): check for strict equality before everything else
nx-js_framework
train
js
a4104215be8c3aa902095dcb182d28b05ff3b79e
diff --git a/src/components/gridList/gridList.js b/src/components/gridList/gridList.js index <HASH>..<HASH> 100644 --- a/src/components/gridList/gridList.js +++ b/src/components/gridList/gridList.js @@ -115,7 +115,7 @@ function GridListDirective($interpolate, $mdConstant, $mdGridLayout, $mdMedia, $ var invalidateLayout = angular.bind(ctrl, ctrl.invalidateLayout), unwatchAttrs = watchMedia(); - scope.$on('$destroy', unwatchMedia()); + scope.$on('$destroy', unwatchMedia); /** * Watches for changes in media, invalidating layout as necessary.
fix(gridlist): Prevents media from being unwatched immediately
angular_material
train
js
71e775a329b2a585af9e48e2e15eb356037a8828
diff --git a/src/Api/Traits/Searchable.php b/src/Api/Traits/Searchable.php index <HASH>..<HASH> 100644 --- a/src/Api/Traits/Searchable.php +++ b/src/Api/Traits/Searchable.php @@ -13,6 +13,7 @@ use seregazhuk\PinterestBot\Api\SearchResponse; * * @property string $searchScope * @property Request request + * @property Response $response */ trait Searchable {
fix: traits docBlocks issues
seregazhuk_php-pinterest-bot
train
php
6044ecece8079dfadbda127785d1b7f7064b52f3
diff --git a/create-l10n-injector/create-l10n-injector.js b/create-l10n-injector/create-l10n-injector.js index <HASH>..<HASH> 100644 --- a/create-l10n-injector/create-l10n-injector.js +++ b/create-l10n-injector/create-l10n-injector.js @@ -18,6 +18,7 @@ export default function createL10NInjector({ componentWillUnmount() { this.isUnmounting = true; } + // eslint-disable-next-line camelcase UNSAFE_componentWillReceiveProps(nextProps) { if (mapPropsToLocale(this.props) !== mapPropsToLocale(nextProps)) { this.loadCountries(nextProps);
refactor: disable eslint camcelcase for all unsafe lifeycle methods
commercetools_merchant-center-application-kit
train
js
5a5b55e6d82d941f3be7bcecf0b2cd362892b4f6
diff --git a/src/lib/CollectStore.js b/src/lib/CollectStore.js index <HASH>..<HASH> 100644 --- a/src/lib/CollectStore.js +++ b/src/lib/CollectStore.js @@ -395,6 +395,7 @@ export default class CollectStore { const { konnector, account } = connection this.dispatch(updateConnectionRunningStatus(konnector, account, false)) this.updateConnector(konnector) + enqueue() }) .catch(error => { this.dispatch(updateConnectionRunningStatus(connection.konnector || konnector, connection.account || account, false)) @@ -448,7 +449,7 @@ export default class CollectStore { .then(job => { this.dispatch(updateConnectionRunningStatus(connector, account, false)) if (!enqueued) { - clearTimeout(enqueueTimeout) + enqueue() resolve(job) } })
feat: also enqueue connection on success :sparkles:
cozy_cozy-home
train
js
f7aaf3e4806d659492464275b153161868a9e7b9
diff --git a/v2/apierror/apierror.go b/v2/apierror/apierror.go index <HASH>..<HASH> 100644 --- a/v2/apierror/apierror.go +++ b/v2/apierror/apierror.go @@ -28,7 +28,7 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // Package apierror implements a wrapper error for parsing error details from -// API calls. Currently, only errors representing a gRPC status are supported. +// API calls. Both HTTP & gRPC status errors are supported. package apierror import (
fix: update apierror docs with HTTP support (#<I>)
googleapis_gax-go
train
go
1e896411c8f1fca0db488d5d7d4395e36d3c55b5
diff --git a/src/stake-program.js b/src/stake-program.js index <HASH>..<HASH> 100644 --- a/src/stake-program.js +++ b/src/stake-program.js @@ -646,6 +646,7 @@ export class StakeProgram { keys: [ {pubkey: stakePubkey, isSigner: false, isWritable: true}, {pubkey: authorityBase, isSigner: true, isWritable: false}, + {pubkey: SYSVAR_CLOCK_PUBKEY, isSigner: false, isWritable: false}, ], programId: this.programId, data,
fix: add Clock sysvar to AuthorizeWithSeed instruction
solana-labs_solana-web3.js
train
js
eca52b4a9bc0592626409a8e06766da89eb5b489
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -44,12 +44,13 @@ export const config = options => { const schema = loadEnvironmentFile(options.schema, options.encoding, options.silent); const config = options.includeProcessEnv ? Object.assign({}, configData, process.env) : configData; const schemaKeys = Object.keys(schema); + const configOnlyKeys = Object.keys(configData); const configKeys = Object.keys(config); let missingKeys = schemaKeys.filter(function (key) { return configKeys.indexOf(key) < 0; }); - let extraKeys = configKeys.filter(function (key) { + let extraKeys = configOnlyKeys.filter(function (key) { return schemaKeys.indexOf(key) < 0; }); if (options.errorOnMissing && missingKeys.length) {
fix: check for extra keys needs to be specific to schema (closes #<I>)
keithmorris_node-dotenv-extended
train
js
55a2a1d6c88e798ee43d77f1e4be8869a9f6167f
diff --git a/src/transposition.js b/src/transposition.js index <HASH>..<HASH> 100644 --- a/src/transposition.js +++ b/src/transposition.js @@ -1,16 +1,16 @@ import Rx from 'rx' function transposeVTree(vTree) { - if (typeof vTree.data === `object` && vTree.data.static) { - return Rx.Observable.just(vTree) - } else if (!vTree) { + if (!vTree) { return null + } else if (typeof vTree.data === `object` && vTree.data.static) { + return Rx.Observable.just(vTree) } else if (typeof vTree.subscribe === `function`) { return vTree.flatMapLatest(transposeVTree) } else if (typeof vTree === `object`) { if (vTree.children && vTree.children.length > 0) { return Rx.Observable.combineLatest( - vTree.children.map(transposeVTree).filter(x => !!x), + vTree.children.map(transposeVTree).filter(x => x !== null), (...children) => ({ sel: vTree.sel, data: vTree.data,
fix(transposition): fix `null` value children switch around the if statements and fix filter() to remove null valued children from the vTree Close #9
TylorS_cycle-snabbdom
train
js
3de12906c8e5e27b2216642f0496a3efda8c4edd
diff --git a/src/transformers/trainer.py b/src/transformers/trainer.py index <HASH>..<HASH> 100755 --- a/src/transformers/trainer.py +++ b/src/transformers/trainer.py @@ -971,7 +971,7 @@ class Trainer: # Rebuild the deepspeed config to reflect the updated training parameters from transformers.deepspeed import HfDeepSpeedConfig - self.args.hf_deepspeed_config = HfDeepSpeedConfig(self.args) + self.args.hf_deepspeed_config = HfDeepSpeedConfig(self.args.deepspeed) def _report_to_hp_search( self, trial: Union["optuna.Trial", Dict[str, Any]], epoch: int, metrics: Dict[str, float]
fix: hfdeepspeed config argument (#<I>) `HfDeepSpeedConfig` accepts a dictionary or path to `.json` file containing DS configurations, not `TrainingArguments`.
huggingface_pytorch-pretrained-BERT
train
py
74d981af4a4e0b5e4001ee0a2f5d8eeacec71cd0
diff --git a/lib/components/map/bounds-updating-overlay.js b/lib/components/map/bounds-updating-overlay.js index <HASH>..<HASH> 100644 --- a/lib/components/map/bounds-updating-overlay.js +++ b/lib/components/map/bounds-updating-overlay.js @@ -9,6 +9,11 @@ import { } from '../../util/itinerary' import { getActiveItinerary, getActiveSearch } from '../../util/state' +/** + * This MapLayer component will automatically update the leaflet bounds + * depending on what data is in the redux store. This component does not + * "render" anything on the map. + */ class BoundsUpdatingOverlay extends MapLayer { createLeafletElement () {} diff --git a/lib/components/map/connected-park-and-ride-overlay.js b/lib/components/map/connected-park-and-ride-overlay.js index <HASH>..<HASH> 100644 --- a/lib/components/map/connected-park-and-ride-overlay.js +++ b/lib/components/map/connected-park-and-ride-overlay.js @@ -9,7 +9,7 @@ class ConnectedParkAndRideOverlay extends Component { componentDidMount () { const params = {} if (this.props.maxTransitDistance) { - params['maxTransitDistance'] = this.props.maxTransitDistance + params.maxTransitDistance = this.props.maxTransitDistance } // TODO: support config-defined bounding envelope
refactor: some small edits to address PR review comments
opentripplanner_otp-react-redux
train
js,js
568a244dc03854ff120fa943930bf4fb2e25a927
diff --git a/synth.py b/synth.py index <HASH>..<HASH> 100644 --- a/synth.py +++ b/synth.py @@ -54,5 +54,5 @@ s.copy(templates) # Node.js specific cleanup # ''' subprocess.run(['npm', 'install']) -subprocess.run(['npm', 'run', 'lint']) +subprocess.run(['npm', 'run', 'fix']) subprocess.run(['npx', 'compileProtos', 'src'])
chore: run fix instead of lint in synthfile (#<I>)
googleapis_nodejs-spanner
train
py
32356cceee19951c40f0f81c64d51d073d43260a
diff --git a/test/spec.js b/test/spec.js index <HASH>..<HASH> 100644 --- a/test/spec.js +++ b/test/spec.js @@ -67,13 +67,13 @@ describe( "Toposort", function() { var t = new Toposort(); t.add( "3", "1" ) - .add( "2", "3" ) - .add( "4", ["2", "3"] ) - .add( "5", ["3", "4"] ) .add( "6", ["3", "4", "5"] ) .add( "7", "1" ) - .add( "8", ["1", "2", "3", "4", "5"] ) - .add( "9", ["8", "6", "7"] ); + .add( "9", ["8", "6", "7"] ) + .add( "4", ["2", "3"] ) + .add( "2", "3" ) + .add( "5", ["3", "4"] ) + .add( "8", ["1", "2", "3", "4", "5"] ); var out = t.sort().reverse();
test: Shuffle the add order for the more complex test
gustavohenke_toposort
train
js
def12b088d60d01383c05ee7fd1e9b3dd09bdfe7
diff --git a/packages/link/src/components/Link.js b/packages/link/src/components/Link.js index <HASH>..<HASH> 100644 --- a/packages/link/src/components/Link.js +++ b/packages/link/src/components/Link.js @@ -43,7 +43,7 @@ const Link = props => { }; Link.propTypes = { - children: PropTypes.node.isRequired, + children: PropTypes.node, type: PropTypes.string, leftIcon: PropTypes.string, rightIcon: PropTypes.string, diff --git a/packages/link/src/components/Link.story.js b/packages/link/src/components/Link.story.js index <HASH>..<HASH> 100644 --- a/packages/link/src/components/Link.story.js +++ b/packages/link/src/components/Link.story.js @@ -30,6 +30,7 @@ storiesOf("Link/Featured", module) Awesome Link </Link> )) + .add("icon only", () => <Link href="#" leftIcon="wg-place" />) .add("external, mini size", () => ( <Link href="#" size={fontSizes.SMALL} external lineHeight={1.14}> Awesome Link
fix(link): remove isRequired for children prop affects: @crave/farmblocks-link so we can have icon-only links
CraveFood_farmblocks
train
js,js
1bff84e74de59eff3631673e732b4dcc6c5bb885
diff --git a/src/elements/table/Table.js b/src/elements/table/Table.js index <HASH>..<HASH> 100644 --- a/src/elements/table/Table.js +++ b/src/elements/table/Table.js @@ -117,9 +117,9 @@ export class NovoTableHeader { </thead> <!-- TABLE DATA --> <tbody *ngIf="rows.length > 0"> - <tr class="table-selection-row" *ngIf="config.rowSelectionStyle === 'checkbox' && showSelectAllMessage"> + <tr class="table-selection-row" *ngIf="config.rowSelectionStyle === 'checkbox' && showSelectAllMessage" data-automation-id="table-selection-row"> <td colspan="100%"> - {{labels.selectedRecords(selected.length)}} <a (click)="selectAll(true)">{{labels.totalRecords(rows.length)}}</a> + {{labels.selectedRecords(selected.length)}} <a (click)="selectAll(true)" data-automation-id="all-matching-records">{{labels.totalRecords(rows.length)}}</a> </td> </tr> <template ngFor let-row="$implicit" [ngForOf]="rows | slice:getPageStart():getPageEnd()">
chore(automation): Adding data-automation-ids to Table
bullhorn_novo-elements
train
js
70c436d4dd8b99f4f44c0076b9b22f6744b76a31
diff --git a/library/src/main/java/com/liulishuo/filedownloader/message/MessageSnapshotTaker.java b/library/src/main/java/com/liulishuo/filedownloader/message/MessageSnapshotTaker.java index <HASH>..<HASH> 100644 --- a/library/src/main/java/com/liulishuo/filedownloader/message/MessageSnapshotTaker.java +++ b/library/src/main/java/com/liulishuo/filedownloader/message/MessageSnapshotTaker.java @@ -169,10 +169,11 @@ public class MessageSnapshotTaker { default: // deal with as error. final String message = FileDownloadUtils. - formatString("it can't takes a snapshot for the task(%s) when its status " + - "is %d,", model, status); + formatString("it can't takes a snapshot for the task(%s) when its status is %d,", + model, status); - FileDownloadLog.w(MessageSnapshotTaker.class, message); + FileDownloadLog.w(MessageSnapshotTaker.class, + "it can't takes a snapshot for the task(%s) when its status is %d,", model, status); final Throwable throwable; if (processParams.getException() != null) {
fix: fix some case double-format raise can't match exception
lingochamp_FileDownloader
train
java
7044468d4335de21e54df0abb3497cbbd08c36c4
diff --git a/lib/util/http-mgr.js b/lib/util/http-mgr.js index <HASH>..<HASH> 100644 --- a/lib/util/http-mgr.js +++ b/lib/util/http-mgr.js @@ -234,7 +234,9 @@ function updateBody(url, callback, init) { return; } var code = res.statusCode; - if (!err && code != 200 && code != 204) { + if (code == 404) { + err = body = ''; + } else if (!err && code != 200 && code != 204) { err = new Error('Response ' + code); } if (err) {
refactor: handle reponse <I> of remote rules
avwo_whistle
train
js
3cbfbb15bbe5247fedc17abfb571c9e94a995dd1
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -1,2 +1,4 @@ /* eslint-disable import/no-commonjs */ -module.exports = require('./src/lib/main.js'); + +import docsearch from './src/lib/main.js'; +module.exports = docsearch;
fix(build): fix badly handled webpack upgrade
algolia_docsearch
train
js
e7c9c675e76c6e303e9913c35d746a017e6320f3
diff --git a/static/lib/composer.js b/static/lib/composer.js index <HASH>..<HASH> 100644 --- a/static/lib/composer.js +++ b/static/lib/composer.js @@ -152,10 +152,6 @@ define('composer', [ post.save_id = ['composer', app.user.uid, 'pid', post.pid].join(':'); } - // Post is opened, save to list of opened drafts - drafts.updateVisibility('available', post.save_id, true); - drafts.updateVisibility('open', post.save_id, true); - composer.posts[uuid] = post; composer.load(uuid); } @@ -331,6 +327,10 @@ define('composer', [ postContainer.on('change', 'input, textarea', function() { composer.posts[post_uuid].modified = true; + + // Post is modified, save to list of opened drafts + drafts.updateVisibility('available', composer.posts[post_uuid].save_id, true); + drafts.updateVisibility('open', composer.posts[post_uuid].save_id, true); }); submitBtn.on('click', function(e) {
fix: overzealous draft handling
NodeBB_nodebb-plugin-composer-default
train
js
5bdf73dfc133d192f92b551849882499687c1b1e
diff --git a/src/Store/SessionStore.php b/src/Store/SessionStore.php index <HASH>..<HASH> 100644 --- a/src/Store/SessionStore.php +++ b/src/Store/SessionStore.php @@ -104,7 +104,7 @@ final class SessionStore implements StoreInterface $session = $_SESSION; $prefix = $this->sessionPrefix . '_'; - while (current($session)) { + while (key($session)) { $sessionKey = key($session); if (is_string($sessionKey) && mb_substr($sessionKey, 0, strlen($prefix)) === $prefix) {
fix: Use key() instead of current() to iterate over PHP session store (#<I>)
auth0_auth0-PHP
train
php
157894979cb6214f679c05577df670a57dd63351
diff --git a/tests/integration/ApiTestCase.php b/tests/integration/ApiTestCase.php index <HASH>..<HASH> 100644 --- a/tests/integration/ApiTestCase.php +++ b/tests/integration/ApiTestCase.php @@ -228,15 +228,16 @@ class ApiTestCase extends TestCase $config->setThrowExceptions(true); $config->setOAuthClientOptions(['verify' => $this->getVerifySSL(), 'timeout' => '15']); + $maxRetries = 3; $clientOptions = [ 'verify' => $this->getVerifySSL(), 'timeout' => '15', 'middlewares' => [ - 'retry' => Middleware::retry(function ($retries, RequestInterface $request, ResponseInterface $response = null, $error = null) { + 'retry' => Middleware::retry(function ($retries, RequestInterface $request, ResponseInterface $response = null, $error = null) use ($maxRetries) { if ($response instanceof ResponseInterface && $response->getStatusCode() < 500) { return false; } - if ($retries > 2) { + if ($retries > $maxRetries) { return false; } if ($error instanceof ServiceUnavailableException) {
test(Integration): use variable for max retries
commercetools_commercetools-php-sdk
train
php
562dfaa5bc15f0e87e43fe4ce06d0f0bf2249a44
diff --git a/test/helpers/index.js b/test/helpers/index.js index <HASH>..<HASH> 100644 --- a/test/helpers/index.js +++ b/test/helpers/index.js @@ -6,20 +6,6 @@ var Stream = require('stream').Stream; var Readable = require('readable-stream').Readable; var Writable = require('readable-stream').Writable; -function adjustDateByOffset(d, offset) { - d = (d instanceof Date) ? d : new Date(); - - if (offset >= 1) { - d.setMinutes(d.getMinutes() - offset); - } else { - d.setMinutes(d.getMinutes() + Math.abs(offset)); - } - - return d; -} - -module.exports.adjustDateByOffset = adjustDateByOffset; - function binaryBuffer(n) { var buffer = new Buffer(n);
test: remove adjustDateByOffset now that we use universal time.
archiverjs_node-compress-commons
train
js
1c0a5fbc513b367a735192bb33c8b2793ad25667
diff --git a/lib/ditty/controllers/component.rb b/lib/ditty/controllers/component.rb index <HASH>..<HASH> 100644 --- a/lib/ditty/controllers/component.rb +++ b/lib/ditty/controllers/component.rb @@ -16,7 +16,7 @@ module Ditty set heading: nil def read(id) - dataset.first(settings.model_class.primary_key => id) + dataset.with_pk(id) end def skip_verify!
fix: Use with_pk lookups instead of first in component
EagerELK_ditty
train
rb
e35db8364e5fe9d204898f91da846787d5fcc18f
diff --git a/balebot/updater.py b/balebot/updater.py index <HASH>..<HASH> 100644 --- a/balebot/updater.py +++ b/balebot/updater.py @@ -59,9 +59,10 @@ class Updater: self.stop() def stop(self): - redis_db.set(self.token, pickle.dumps( - BotState(conversation_next_step_handlers=self.dispatcher.conversation_next_step_handlers, - conversation_data=self.dispatcher.conversation_data))) + if Config.state_holder: + redis_db.set(self.token, pickle.dumps( + BotState(conversation_next_step_handlers=self.dispatcher.conversation_next_step_handlers, + conversation_data=self.dispatcher.conversation_data))) self.dispatcher.bot.network.stop_network() self._stop_dispatcher() self._loop.stop()
fix: state holding problem at stop fixed
balemessenger_bale-bot-python
train
py
0343b31b3238407f5c4647acfa2a9f502e0c6127
diff --git a/packages/micro-journeys/src/two-character-layout.js b/packages/micro-journeys/src/two-character-layout.js index <HASH>..<HASH> 100644 --- a/packages/micro-journeys/src/two-character-layout.js +++ b/packages/micro-journeys/src/two-character-layout.js @@ -71,6 +71,9 @@ class BoltTwoCharacterLayout extends withLitHtml() { persistentlyAttemptToEqualizeRelativeHeights( eqHeightArgs, this.setConnectionWidth, + 0, + 3, + true, ); }
chore(micro-journeys): remove debug code from two-char layout
bolt-design-system_bolt
train
js
b2a80f8ada343136d668f446f0ba99f64fb5b787
diff --git a/test/application/inspectors/ensureNotExpired.test.js b/test/application/inspectors/ensureNotExpired.test.js index <HASH>..<HASH> 100644 --- a/test/application/inspectors/ensureNotExpired.test.js +++ b/test/application/inspectors/ensureNotExpired.test.js @@ -1,7 +1,6 @@ -import 'babel-polyfill'; import { ensureNotExpired } from '../../../src/inspectors'; -describe('Checks test suite', function () { +describe('Inspectors test suite', function () { describe('ensureNotExpired method', function () { const errorMessage = 'This certificate has expired.';
test(inspectors): ensureNotExpired test language
blockchain-certificates_cert-verifier-js
train
js
b83c123939e62a1fbdf41504078e40dec6cc6b16
diff --git a/src/ApiGatewayWebSocket.js b/src/ApiGatewayWebSocket.js index <HASH>..<HASH> 100644 --- a/src/ApiGatewayWebSocket.js +++ b/src/ApiGatewayWebSocket.js @@ -94,6 +94,11 @@ module.exports = class ApiGatewayWebSocket { ws.send(JSON.stringify({ message:'Internal server error', connectionId, requestId:'1234567890' })); } + // mimic AWS behaviour (close connection) when the $connect action handler throws + if (name === '$connect') { + ws.close(); + } + debugLog(`Error in handler of action ${action}`, err); };
chore: if an error occurs during the $connect action, close the connection
dherault_serverless-offline
train
js
3bb048251a91d1a6b51ddb49eb6867b976a12ef6
diff --git a/allauth/account/models.py b/allauth/account/models.py index <HASH>..<HASH> 100644 --- a/allauth/account/models.py +++ b/allauth/account/models.py @@ -145,7 +145,7 @@ class EmailConfirmationHMAC: try: max_age = 60 * 60 * 24 * app_settings.EMAIL_CONFIRMATION_EXPIRE_DAYS pk = signing.loads(key, max_age=max_age, salt=app_settings.SALT) - ret = EmailConfirmationHMAC(EmailAddress.objects.get(pk=pk)) + ret = EmailConfirmationHMAC(EmailAddress.objects.get(pk=pk, verified=False)) except ( signing.SignatureExpired, signing.BadSignature,
feat(account): only process confirmation mails for unverified email addresses * Update app_settings.py * Update views.py * Update views.py * Update models.py * Update app_settings.py * Update views.py * Update app_settings.py
pennersr_django-allauth
train
py
b01a4e65794585352d8a27ee46db6b2b9c823282
diff --git a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/group/GroupInfoFragment.java b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/group/GroupInfoFragment.java index <HASH>..<HASH> 100644 --- a/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/group/GroupInfoFragment.java +++ b/actor-sdk/sdk-core-android/android-sdk/src/main/java/im/actor/sdk/controllers/group/GroupInfoFragment.java @@ -216,7 +216,7 @@ public class GroupInfoFragment extends BaseFragment { //Members TextView memberCount = (TextView) header.findViewById(R.id.membersCount); - memberCount.setText(groupInfo.getMembersCount()); + memberCount.setText(groupInfo.getMembersCount() + ""); memberCount.setTextColor(style.getTextHintColor()); listView.addHeaderView(header, null, false);
fix(android): set members count string
actorapp_actor-platform
train
java
18880cde042c0c24d8204d7b34cfd14b803b478e
diff --git a/src/processor/intents/movement.js b/src/processor/intents/movement.js index <HASH>..<HASH> 100644 --- a/src/processor/intents/movement.js +++ b/src/processor/intents/movement.js @@ -99,7 +99,7 @@ exports.check = function(roomIsInSafeMode) { if(matrix[i].length > 1) { var rates = _.map(matrix[i], (object) => { - var moveBodyparts = _.filter(object.body, (i) => i.hits > 0 && i.type == C.MOVE).length, + var moves = utils.calcBodyEffectiveness(object.body, C.MOVE, 'fatigue', 1), weight = _.filter(object.body, (i) => i.type != C.MOVE && i.type != C.CARRY).length; weight += calcResourcesWeight(object); weight = weight || 1; @@ -111,11 +111,11 @@ exports.check = function(roomIsInSafeMode) { return { object, rate1, - rate2: moveBodyparts / weight + rate2: moves / weight }; }); - rates.sort((a,b) => b.rate1 - a.rate1 != 0 ? b.rate1 - a.rate1 : b.rate2 - a.rate2); + rates.sort((a,b) => b.rate1 - a.rate1 || b.rate2 - a.rate2); resultingMoveObject = rates[0].object; }
fix(processor): updated moves/weight ratio to consider boosts on move parts DEV-<I>
screeps_engine
train
js
8b9e92d25a7b4b4ba3b7492eb3f9ae82ae414493
diff --git a/views/js/uiForm.js b/views/js/uiForm.js index <HASH>..<HASH> 100755 --- a/views/js/uiForm.js +++ b/views/js/uiForm.js @@ -737,6 +737,7 @@ if (classUri && classUri.trim()) { $this.parent('div').children('div.form-error').remove(); + const isRemoteList = !!$this.find('option:selected').attr('data-remote-list'); $.ajax({ url: context.root_url + 'taoBackOffice/Lists/getListElements', @@ -749,12 +750,16 @@ let html = '<ul class="form-elt-list">', property; - for (property in response) { - if(!response.hasOwnProperty(property)) { + for (property in response.data.elements) { + if (!response.data.elements.hasOwnProperty(property)) { continue; } - html += '<li>' + encode.html(response[property]) + '</li>'; + html += `<li>${encode.html(response.data.elements[property].label)}</li>`; + } + + if (isRemoteList && response.data.totalCount > response.data.elements.length) { + html += `<li>...</li>`; } html += '</ul>';
refactor: check for remote list on FE side. Render dots element on FE side
oat-sa_tao-core
train
js
a874fe3c7a2ed13182761db25352ecdd37ef6e1c
diff --git a/docs/conf.py b/docs/conf.py index <HASH>..<HASH> 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -109,6 +109,7 @@ html_theme_options = { "github_button": "true", "github_repo": "aioopenssl", "github_user": "horazont", + "font_size": "12pt", } html_sidebars = { '**': [
docs: make font size more bearable
horazont_aioopenssl
train
py
732436864bab7981070f404b7d0bbc5516340c48
diff --git a/vendors/hypeJunction/hypeList.js b/vendors/hypeJunction/hypeList.js index <HASH>..<HASH> 100644 --- a/vendors/hypeJunction/hypeList.js +++ b/vendors/hypeJunction/hypeList.js @@ -557,9 +557,6 @@ $(this).data('item-index', itemIndex); $(this).appendTo(self.$list); if (self.options.selectorDelete) { - if (typeof $.fn.die === 'function') { - $(this).find(self.options.selectorDelete).die('click'); - } $(this).find(self.options.selectorDelete).off('click').on('click', self.deleteItem); } }); @@ -620,9 +617,11 @@ */ deleteItem: function (e) { e.preventDefault(); - var confirmText = $(this).data('confirm') || elgg.echo('question:areyousure'); - if (!confirm(confirmText)) { - return false; + if (!$(this).is('*[data-confirm],.elgg-requires-confirmation')) { + var confirmText = $(this).data('confirm') || elgg.echo('question:areyousure'); + if (!confirm(confirmText)) { + return false; + } } var $elem = $(this), $item = $elem.closest($elem.closest('.elgg-list,.elgg-gallery').children()),
fix(js): remove duplicate confirmation dialogs
hypeJunction_hypeLists
train
js
de4a54b8e4c8957f6ef492e4296139e222ed1bf7
diff --git a/src/store/configureStore.js b/src/store/configureStore.js index <HASH>..<HASH> 100644 --- a/src/store/configureStore.js +++ b/src/store/configureStore.js @@ -17,8 +17,8 @@ const persistConfig = { const configureStore = (legacyClient, cozyClient, context, options = {}) => { // Enable Redux dev tools - const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE || compose - + const composeEnhancers = + window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose const persistedReducer = persistReducer( persistConfig, getReducers(cozyClient)
fix: Redux dev tools working
cozy_cozy-home
train
js
f7c42268f6a99ab4cb3c503b2b30389ed371fe4a
diff --git a/system/Throttle/Throttler.php b/system/Throttle/Throttler.php index <HASH>..<HASH> 100644 --- a/system/Throttle/Throttler.php +++ b/system/Throttle/Throttler.php @@ -100,7 +100,7 @@ class Throttler implements ThrottlerInterface // If it hasn't been created, then we'll set it to the maximum // capacity - 1, and save it to the cache. $this->cache->save($tokenName, $capacity - $cost, $seconds); - $this->cache->save($tokenName . 'Time', time(), $seconds); + $this->cache->save($tokenName . 'Time', $this->time(), $seconds); return true; } @@ -129,7 +129,7 @@ class Throttler implements ThrottlerInterface // we need to decrement the number of available tokens. if ($tokens >= 1) { $this->cache->save($tokenName, $tokens - $cost, $seconds); - $this->cache->save($tokenName . 'Time', time(), $seconds); + $this->cache->save($tokenName . 'Time', $this->time(), $seconds); return true; } @@ -164,6 +164,8 @@ class Throttler implements ThrottlerInterface /** * Return the test time, defaulting to current. + * + * @TODO should be private */ public function time(): int {
fix: use $this->time() instead of time() For testing, we need to use testTime in all places.
codeigniter4_CodeIgniter4
train
php
1b41c0aaeafb94e844c90c36c38396dd3cc9d359
diff --git a/version.go b/version.go index <HASH>..<HASH> 100644 --- a/version.go +++ b/version.go @@ -1,4 +1,4 @@ package gock // Version defines the current package semantic version. -const Version = "1.0.13" +const Version = "1.0.14"
feat(version): bump to <I>
h2non_gock
train
go
b01b75e36790d8026dd27ce59051d9581ad47940
diff --git a/framework/core/src/Extend/Link.php b/framework/core/src/Extend/Link.php index <HASH>..<HASH> 100644 --- a/framework/core/src/Extend/Link.php +++ b/framework/core/src/Extend/Link.php @@ -21,14 +21,14 @@ class Link implements ExtenderInterface protected $setRel = null; protected $setTarget = null; - public function setRel(callable $callable): static + public function setRel(callable $callable) { $this->setRel = $callable; return $this; } - public function setTarget(callable $callable): static + public function setTarget(callable $callable) { $this->setTarget = $callable;
fix: return type hint static is php 8+
flarum_core
train
php
5c5fc3a54a4733552ebe885c253bb8a7e69c750c
diff --git a/client/mobilizations/widgets/__plugins__/form/components/input.js b/client/mobilizations/widgets/__plugins__/form/components/input.js index <HASH>..<HASH> 100644 --- a/client/mobilizations/widgets/__plugins__/form/components/input.js +++ b/client/mobilizations/widgets/__plugins__/form/components/input.js @@ -97,7 +97,7 @@ class Input extends Component { }} onBlur={onBlur} placeholder={field.placeholder} - type='text' + type={field.kind === 'email' ? 'email' : 'text'} /> ) }
fix(form-widget): input type as email by field kind close #<I>
nossas_bonde-client
train
js
bde9037208742f224b72878189d251b841e8d3db
diff --git a/test/k8sT/external_ips.go b/test/k8sT/external_ips.go index <HASH>..<HASH> 100644 --- a/test/k8sT/external_ips.go +++ b/test/k8sT/external_ips.go @@ -243,6 +243,7 @@ var _ = Describe("K8sKubeProxyFreeMatrix tests", func() { "global.autoDirectNodeRoutes": "true", "global.nodePort.device": external_ips.PublicInterfaceName, "global.nodePort.enabled": "true", + "global.bpfMasquerade": "false", }) }) DescribeTable("From pod running on node-1 to services being backed by a pod running on node-1", @@ -287,6 +288,7 @@ var _ = Describe("K8sKubeProxyFreeMatrix tests", func() { "global.tunnel": "vxlan", "global.nodePort.device": external_ips.PublicInterfaceName, "global.nodePort.enabled": "true", + "global.bpfMasquerade": "false", }) }) DescribeTable("From pod running on node-1 to services being backed by a pod running on node-1",
test: Disable BPF masq for K8sKubeProxyFreeMatrix Disable the BPF masq in the vxlan tests until PublicInterfaceName is decluttered. The communication between pod and remote node has to be SNAT'd in the case of vxlan, which is currently not feasible, as bpf_netdev is loaded only on PublicInterfaceName.
cilium_cilium
train
go
2529baa064fa562ad5651b64b1ec30b5f2869382
diff --git a/src/lib/CollectStore.js b/src/lib/CollectStore.js index <HASH>..<HASH> 100644 --- a/src/lib/CollectStore.js +++ b/src/lib/CollectStore.js @@ -3,6 +3,8 @@ import * as accounts from './accounts' import * as konnectors from './konnectors' import * as jobs from './jobs' +import { createConnection } from '../ducks/connections' + const AUTHORIZED_CATEGORIES = require('config/categories') const isValidCategory = (cat) => AUTHORIZED_CATEGORIES.includes(cat) @@ -318,6 +320,7 @@ export default class CollectStore { }) // 4. Add account to konnector .then(installedkonnector => { + this.dispatch(createConnection(installedkonnector, connection.account, connection.folderId)) return konnectors.addAccount(cozy.client, installedkonnector, connection.account) }) // 5. Add permissions to folder for konnector if folder created
feat: dispatch createConnection action from CollectStore :pencil:
cozy_cozy-home
train
js
3ed1538c740f9134f72610efd1cc07e1f1c8e726
diff --git a/pages/linker.js b/pages/linker.js index <HASH>..<HASH> 100644 --- a/pages/linker.js +++ b/pages/linker.js @@ -91,7 +91,7 @@ export default class Page extends React.Component { this.setState({ error: `There was a problem getting scene data.\nTry to re-initialize the project with dcl init.` }) - closeServer(false, 'scene metadata error') + closeServer(false, 'There was a problem getting scene data.\nTry to re-initialize the project with dcl init.') return } @@ -103,7 +103,7 @@ export default class Page extends React.Component { this.setState({ error: `There was a problem getting IPNS hash of your scene.\nTry to re-upload with dcl upload.` }) - closeServer(false, 'ipns error') + closeServer(false, 'There was a problem getting IPNS hash of your scene.\nTry to re-upload with dcl upload.') return } @@ -147,7 +147,7 @@ export default class Page extends React.Component { this.setState({ tx, transactionLoading: true }) } catch (err) { this.setState({ loading: false, error: 'Transaction Rejected' }) - closeServer(false, 'transaction rejected') + closeServer(false, 'Transaction rejected') } } catch (err) { this.setState({ loading: false, error: err.message })
chore: manually merged <I>cc8a<I>d3bc6d<I>f6c<I>a<I>bce
decentraland_cli
train
js
a7a7eb91dc0c39570a7bd4355e52ae46cc63c2cd
diff --git a/src/Modules/Rollback.php b/src/Modules/Rollback.php index <HASH>..<HASH> 100644 --- a/src/Modules/Rollback.php +++ b/src/Modules/Rollback.php @@ -167,7 +167,7 @@ class Rollback extends Abstract_Module { return ''; } - return sprintf( '%slicense/versions/%s/%s/%s/%s', Product::API_URL, urlencode( $this->product->get_name() ), $license, urlencode( get_site_url() ), $this->product->get_version() ); + return sprintf( '%slicense/versions/%s/%s/%s/%s', Product::API_URL, rawurlencode( $this->product->get_name() ), $license, urlencode( get_site_url() ), $this->product->get_version() ); } /**
fix: use rawurlencode on all version urls
Codeinwp_themeisle-sdk
train
php
91a83d6ba55b18a15faad58c90f7fc13b94810ea
diff --git a/library/src/pivotal-ui-react/autocomplete/autocomplete.js b/library/src/pivotal-ui-react/autocomplete/autocomplete.js index <HASH>..<HASH> 100644 --- a/library/src/pivotal-ui-react/autocomplete/autocomplete.js +++ b/library/src/pivotal-ui-react/autocomplete/autocomplete.js @@ -116,7 +116,7 @@ class Autocomplete extends mixin(React.Component).with(Scrim) { var {scrollIntoView, onPick, onSearch} = this; input = React.cloneElement(input, {$autocomplete, onPick, scrollIntoView, onSearch, disabled, onFocus, onClick, placeholder}); return ( - <div className={classnames('autocomplete', 'mhs', className)} {...props} > + <div className={classnames('autocomplete', className)} {...props} > {input} <AutocompleteList {...{$autocomplete, onPick, maxItems, selectedSuggestion}}>{children}</AutocompleteList> </div>
fix(autocomplete): remove small horizontal margin from autocomplete
pivotal-cf_pivotal-ui
train
js
4bfebf8705d06d8568619cc0c6b83fd3d4fad95e
diff --git a/mapillary_tools/upload.py b/mapillary_tools/upload.py index <HASH>..<HASH> 100644 --- a/mapillary_tools/upload.py +++ b/mapillary_tools/upload.py @@ -629,7 +629,7 @@ def upload( elif file_type == "blackvue": video_paths = [ path - for path in utils.iterate_files(import_path) + for path in utils.iterate_files(import_path, recursive=True) if os.path.splitext(path)[1].lower() in [".mp4"] ] _upload_blackvues( @@ -641,7 +641,7 @@ def upload( elif file_type == "zip": zip_paths = [ path - for path in utils.iterate_files(import_path) + for path in utils.iterate_files(import_path, recursive=True) if os.path.splitext(path)[1].lower() in [".zip"] ] _upload_zipfiles(
fix: upload blackvue in subfolders (#<I>)
mapillary_mapillary_tools
train
py
1f0edb19da7ef1bc7e68a34c109e876f87b6ccdf
diff --git a/src/index.js b/src/index.js index <HASH>..<HASH> 100644 --- a/src/index.js +++ b/src/index.js @@ -121,7 +121,7 @@ class Apsis { .pipe(gulp.dest(config.paths.root)); }, { options: { - 'bump': 'what bump to perform. [ patch, minor, major]', + 'bump [type]': 'what bump to perform. [patch, minor, major]', }, }); }
docs: update help for bump task
ApsisInternational_gulp-config-apsis
train
js
a25d86c4b4447518c2ecc2cd52231b55eb73d629
diff --git a/lib/app/dataMixin.js b/lib/app/dataMixin.js index <HASH>..<HASH> 100644 --- a/lib/app/dataMixin.js +++ b/lib/app/dataMixin.js @@ -34,7 +34,7 @@ export default { return store.siteData }, $localeConfig () { - const { locales } = this.$site + const { locales = {}} = this.$site let targetLang let defaultLang Object.keys(locales).forEach(path => {
fix: ensure runnable when no locales are provided
vuejs_vuepress
train
js
92b1d47bcfc735a04bd51cd83a40132de26d9176
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -84,6 +84,7 @@ setup( url="https://github.com/aws/sagemaker-python-sdk/", license="Apache License 2.0", keywords="ML Amazon AWS AI Tensorflow MXNet", + python_requires=">= 3.6", classifiers=[ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers",
fix: update setup.py to add minimum python requirement of <I> (#<I>)
aws_sagemaker-python-sdk
train
py
60ac03c08f942a8dda49b9f9f7d2ce7a63535414
diff --git a/spec/api-app-spec.js b/spec/api-app-spec.js index <HASH>..<HASH> 100644 --- a/spec/api-app-spec.js +++ b/spec/api-app-spec.js @@ -805,6 +805,14 @@ describe('app module', () => { }) describe('getGPUInfo() API', () => { + before(function () { + // TODO(alexeykuzmoin): Fails on linux. Enable them back. + // https://github.com/electron/electron/pull/14863 + if (process.platform === 'linux') { + this.skip() + } + }) + it('succeeds with basic GPUInfo', (done) => { app.getGPUInfo('basic').then((gpuInfo) => { // Devices information is always present in the available info
test: disable getGPUInfo() tests on Linux (#<I>)
electron_electron
train
js
965cf1bae6cc9bcac756d1a539d61396f1ab0479
diff --git a/packages/browserslist-config-instui/index.js b/packages/browserslist-config-instui/index.js index <HASH>..<HASH> 100644 --- a/packages/browserslist-config-instui/index.js +++ b/packages/browserslist-config-instui/index.js @@ -29,5 +29,6 @@ module.exports = [ 'last 2 ios versions', 'last 2 opera versions', 'last 2 safari versions', - 'last 2 ChromeAndroid versions' + 'last 2 ChromeAndroid versions', + 'ie >= 11' ]
fix(browserslist-config-instui): fix broken tests caused by IE<I> support removal TEST PLAN: Make sure all tests are passing
instructure_instructure-ui
train
js
3ad593f5835ce0f6ef98f65d841899e1355fa736
diff --git a/src/geshi/cuesheet.php b/src/geshi/cuesheet.php index <HASH>..<HASH> 100644 --- a/src/geshi/cuesheet.php +++ b/src/geshi/cuesheet.php @@ -118,8 +118,8 @@ $language_data = array ( 'OBJECT_SPLITTERS' => array( ), 'REGEXPS' => array( + 2 => '\b[A-Za-z0-9]{5}\d{7}\b', 1 => '(?<=[\s:]|^)\d+(?=[\s:]|$)', - 2 => '\b[A-Za-z]{5}\d{7}\b', ), 'STRICT_MODE_APPLIES' => GESHI_NEVER, 'SCRIPT_DELIMITERS' => array(
fix: ISRC allows for digits in first 5 places too
GeSHi_geshi-1.0
train
php
177ab3a4335c0447f317cd03825b3840ea70579b
diff --git a/actions/class.PropertiesAuthoring.php b/actions/class.PropertiesAuthoring.php index <HASH>..<HASH> 100644 --- a/actions/class.PropertiesAuthoring.php +++ b/actions/class.PropertiesAuthoring.php @@ -561,15 +561,19 @@ class tao_actions_PropertiesAuthoring extends tao_actions_CommonModule FeatureFlagChecker::FEATURE_FLAG_LISTS_DEPENDENCY_ENABLED ); - if ($isListsDependencyEnabled) { - if ($dependsOnPropertyUri === null) { - $property->removePropertyValues( - $this->getProperty(RemoteSourcedListOntology::PROPERTY_DEPENDS_ON_PROPERTY) - ); - } else { - $property->setDependsOnProperty($this->getProperty($dependsOnPropertyUri)); - } + if (!$isListsDependencyEnabled) { + return; } + + if ($dependsOnPropertyUri === null) { + $property->removePropertyValues( + $this->getProperty(RemoteSourcedListOntology::PROPERTY_DEPENDS_ON_PROPERTY) + ); + + return; + } + + $property->setDependsOnProperty($this->getProperty($dependsOnPropertyUri)); } private function isElasticSearchEnabled(): bool
refactor: remove if-statement multilevel
oat-sa_tao-core
train
php
e397d7c9a5b4a36877c3dd1f46619f8075499c09
diff --git a/src/Client/ResponseTrait.php b/src/Client/ResponseTrait.php index <HASH>..<HASH> 100644 --- a/src/Client/ResponseTrait.php +++ b/src/Client/ResponseTrait.php @@ -28,17 +28,17 @@ trait ResponseTrait case 400: case 405: $returnArray = json_decode($body, true); - throw new ApiSyntaxException($this->getFirstError($returnArray)); + throw new ApiSyntaxException($this->getFirstError($returnArray), $status); case 401: case 403: $returnArray = json_decode($body, true); - throw new ApiAuthenticationException($this->getFirstError($returnArray, 'Invalid credentials')); + throw new ApiAuthenticationException($this->getFirstError($returnArray, 'Invalid credentials'), $status); case 410: case 404: - throw new ApiNotFoundException($url); + throw new ApiNotFoundException($url, $status); default: $returnArray = json_decode($body, true); - throw new ApiGeneralException($this->generalExceptionMessage($returnArray ?? [], $headers)); + throw new ApiGeneralException($this->generalExceptionMessage($returnArray ?? [], $headers), $status); } }
fix: include status codes in exceptions
bookboon_api-php
train
php
e07cee0b46697c3733de8e4e00392056ebc2ab55
diff --git a/tests/system/Database/Live/DbUtilsTest.php b/tests/system/Database/Live/DbUtilsTest.php index <HASH>..<HASH> 100644 --- a/tests/system/Database/Live/DbUtilsTest.php +++ b/tests/system/Database/Live/DbUtilsTest.php @@ -92,7 +92,7 @@ final class DbUtilsTest extends CIUnitTestCase { $util = (new Database())->loadUtils($this->db); - if (in_array($this->db->DBDriver, ['MySQLi', 'Postgre', 'SQLSRV'], true)) { + if (in_array($this->db->DBDriver, ['MySQLi', 'Postgre', 'SQLSRV', 'OCI8'], true)) { $exist = $util->databaseExists($this->db->getDatabase()); $this->assertTrue($exist);
test: add databaseExists test for oci8.
codeigniter4_CodeIgniter4
train
php
0a37afafde32d91525e57dc6ec9dd298e244c367
diff --git a/library/spec/pivotal-ui-react/inputs/inputs_spec.js b/library/spec/pivotal-ui-react/inputs/inputs_spec.js index <HASH>..<HASH> 100644 --- a/library/spec/pivotal-ui-react/inputs/inputs_spec.js +++ b/library/spec/pivotal-ui-react/inputs/inputs_spec.js @@ -68,11 +68,11 @@ describe('inputs', function() { }); it('renders an input with the label', function() { - expect('.form-group label').toContainText('First Name'); + expect('.control-label').toContainText('First Name'); }); it('attaches the label to the input', function() { - expect('.form-group label').toHaveAttr('for', id); + expect('.control-label').toHaveAttr('for', id); expect('.form-group input').toHaveAttr('id', id); });
fix(BasicInput): Label is selected correctly in specs [#<I>]
pivotal-cf_pivotal-ui
train
js
bdc73fc19207488034d29d15826ad546714d46e0
diff --git a/lib/platform/bitbucket/index.js b/lib/platform/bitbucket/index.js index <HASH>..<HASH> 100644 --- a/lib/platform/bitbucket/index.js +++ b/lib/platform/bitbucket/index.js @@ -280,7 +280,19 @@ async function setBranchStatus( ); } -function deleteBranch(branchName) { +async function deleteBranch(branchName, closePr = false) { + // istanbul ignore if + if (closePr) { + logger.debug('Closing PR'); + const pr = await getBranchPr(branchName); + if (pr) { + await api.post( + `/2.0/repositories/${config.repository}/pullrequests/${ + pr.number + }/decline` + ); + } + } return api.delete( `/2.0/repositories/${config.repository}/refs/branches/${branchName}` );
fix(bitbucket): decline PR after deleting branch This fixes autoclose. Closes #<I>
renovatebot_renovate
train
js
a21fc1ce8c66d3bc5c4a658bbbfb15dbad9ee54d
diff --git a/src/Storage/StorageManager.php b/src/Storage/StorageManager.php index <HASH>..<HASH> 100644 --- a/src/Storage/StorageManager.php +++ b/src/Storage/StorageManager.php @@ -300,7 +300,7 @@ class StorageManager } if (0 === $count) { - throw new \RuntimeException(\sprintf('Impossible to a a file (%s) identified by the hash %s into at least one storage services', $filename, $hash)); + throw new NotSavedException($hash); } return $hash;
refactor: new NotSavedException($hash) in saveFile
ems-project_EMSCommonBundle
train
php
43ba563a1c409402ba9ac0afbe68d227341b37a5
diff --git a/pkg/api/pluginproxy/pluginproxy.go b/pkg/api/pluginproxy/pluginproxy.go index <HASH>..<HASH> 100644 --- a/pkg/api/pluginproxy/pluginproxy.go +++ b/pkg/api/pluginproxy/pluginproxy.go @@ -88,7 +88,7 @@ func NewApiPluginProxy(ctx *middleware.Context, proxyPath string, route *plugins } for key, value := range headers { - log.Info("setting key %v value %v", key, value[0]) + log.Trace("setting key %v value %v", key, value[0]) req.Header.Set(key, value[0]) } }
fix(logging): change log level to trace for plugin proxy logging call, fixes #<I>
grafana_grafana
train
go
46e13a70cc167d37dacc213cc4c17794f79f17a9
diff --git a/test/test_lock.rb b/test/test_lock.rb index <HASH>..<HASH> 100644 --- a/test/test_lock.rb +++ b/test/test_lock.rb @@ -52,5 +52,21 @@ module RestoreBundledWith end end end + + sub_test_case '#==' do + test 'compare different lock file' do + v19 = File.read('./test/fixtures/v1-9-example1.lock') + v110 = File.read('./test/fixtures/v1-10-example1.lock') + assert do + Lock.new(v19) != Lock.new(v110) + end + end + test 'compare same lock file' do + v110 = File.read('./test/fixtures/v1-10-example1.lock') + assert do + Lock.new(v110) == Lock.new(v110) + end + end + end end end
test(lock): compare lock files
packsaddle_ruby-restore_bundled_with
train
rb
8991ceb209884f72beba0ab8b166a258c0af3e1d
diff --git a/lib/utils/yamlAstParser.js b/lib/utils/yamlAstParser.js index <HASH>..<HASH> 100644 --- a/lib/utils/yamlAstParser.js +++ b/lib/utils/yamlAstParser.js @@ -107,7 +107,7 @@ const addNewArrayItem = (ymlFile, pathInYml, newValue) => } currentNode[arrayPropertyName] = _.union(arrayProperty, [newValue]); - const branchToReplaceName = _.head(pathInYmlArray); + const branchToReplaceName = pathInYmlArray[0]; const newObject = {}; newObject[branchToReplaceName] = plainObject[branchToReplaceName]; const newText = yaml.dump(newObject); @@ -155,7 +155,7 @@ const removeExistingArrayItem = (ymlFile, pathInYml, removeValue) => } } - const headObjectPath = _.head(pathInYmlArray); + const headObjectPath = pathInYmlArray[0]; let newText = ''; if (plainObject[headObjectPath]) {
refactor: Replace `_.head` with `array[0]` (#<I>)
serverless_serverless
train
js
5a994ed3054c17259c04e7c145dcd69d6279eae0
diff --git a/test/lib/browser/load-css.js b/test/lib/browser/load-css.js index <HASH>..<HASH> 100644 --- a/test/lib/browser/load-css.js +++ b/test/lib/browser/load-css.js @@ -7,7 +7,7 @@ module.exports = function (t, a, d) { webmake(`${ pg }/lib/browser-test.js`)(result => { // eslint-disable-next-line no-eval result = eval(result); - a(result.style.innerHTML, "body { color: black; background: white; }"); - a(result.html.innerHTML, "<p><span>Hello!</span></p>"); + a(result.style.innerHTML, "body {\n\tcolor: black;\n\tbackground: white;\n}"); + a(result.html.innerHTML, "<p><span>Hello!</span></p>\n"); }).done(d, d); };
test: Update up to changes in dependencies
medikoo_modules-webmake
train
js
f09b4e5a3b73965ba3464186970b48635b73edda
diff --git a/core/resource/DependsOnPropertyCollection.php b/core/resource/DependsOnPropertyCollection.php index <HASH>..<HASH> 100644 --- a/core/resource/DependsOnPropertyCollection.php +++ b/core/resource/DependsOnPropertyCollection.php @@ -26,8 +26,27 @@ use ArrayIterator; use core_kernel_classes_Property; /** - * @method core_kernel_classes_Property current() + * @method core_kernel_classes_Property|null current() */ class DependsOnPropertyCollection extends ArrayIterator { + public function isEqual(DependsOnPropertyCollection $dependsOnPropertyCollection): bool + { + return $this->isArraysEqual($this->getPropertyUris(), $dependsOnPropertyCollection->getPropertyUris()); + } + + public function getPropertyUris(): array + { + return array_map( + static function (core_kernel_classes_Property $property) { + return $property->getUri(); + }, + $this->getArrayCopy() + ); + } + + private function isArraysEqual(array $array1, array $array2): bool + { + return empty(array_diff($array1, $array2)) && empty(array_diff($array2, $array1)); + } }
feat: add equal method to dependd on property collections
oat-sa_generis
train
php
19de5556c0a29f386612b31887134a3c68842512
diff --git a/django_blog_it/django_blog_it/static/js/jquery.smartmenus.js b/django_blog_it/django_blog_it/static/js/jquery.smartmenus.js index <HASH>..<HASH> 100644 --- a/django_blog_it/django_blog_it/static/js/jquery.smartmenus.js +++ b/django_blog_it/django_blog_it/static/js/jquery.smartmenus.js @@ -35,7 +35,7 @@ var eNS = '.smartmenus_mouse'; if (!mouseDetectionEnabled && !disable) { // if we get two consecutive mousemoves within 2 pixels from each other and within 300ms, we assume a real mouse/cursor is present - // in practice, this seems like impossible to trick unintentianally with a real mouse and a pretty safe detection on touch devices (even with older browsers that do not support touch events) + // in practice, this seems like impossible to trick unintentionally with a real mouse and a pretty safe detection on touch devices (even with older browsers that do not support touch events) var firstTime = true, lastMove = null; $(document).bind(getEventsNS([ @@ -1212,4 +1212,4 @@ }; return $; -})); \ No newline at end of file +}));
docs: Fix simple typo, unintentianally -> unintentionally (#<I>) There is a small typo in django_blog_it/django_blog_it/static/js/jquery.smartmenus.js. Should read `unintentionally` rather than `unintentianally`.
MicroPyramid_django-blog-it
train
js
6b136c2bc9a6c9756e5319b045e3c42da06243cb
diff --git a/superset/views/datasource/views.py b/superset/views/datasource/views.py index <HASH>..<HASH> 100644 --- a/superset/views/datasource/views.py +++ b/superset/views/datasource/views.py @@ -81,7 +81,7 @@ class Datasource(BaseSupersetView): if "owners" in datasource_dict and orm_datasource.owner_class is not None: # Check ownership - if app.config["OLD_API_CHECK_DATASET_OWNERSHIP"]: + if app.config.get("OLD_API_CHECK_DATASET_OWNERSHIP"): # mimic the behavior of the new dataset command that # checks ownership and ensures that non-admins aren't locked out # of the object
fix: can't save dataset modal (#<I>)
apache_incubator-superset
train
py
c7334363b36c5f7f1c7880fe77a2e9b2eb1a6442
diff --git a/src/structures/Message.js b/src/structures/Message.js index <HASH>..<HASH> 100644 --- a/src/structures/Message.js +++ b/src/structures/Message.js @@ -555,6 +555,7 @@ class Message extends Base { * .catch(console.error); */ async react(emoji) { + emoji = this.client.emojis.resolveIdentifier(emoji); await this.channel.messages.react(this.id, emoji); return this.client.actions.MessageReactionAdd.handle({ user: this.client.user,
fix: resolve emoji in Message#react (#<I>)
discordjs_discord.js
train
js
2d136552b03f6984dc74f4b5469a1a8a7d02b6c6
diff --git a/packages/types/src/core/records.js b/packages/types/src/core/records.js index <HASH>..<HASH> 100644 --- a/packages/types/src/core/records.js +++ b/packages/types/src/core/records.js @@ -11,7 +11,12 @@ import type { import { List, Map, Record, Set } from "immutable"; export { HostRef, makeLocalKernelRecord, makeDesktopHostRecord } from "./hosts"; -export { KernelspecsRef } from "./kernelspecs"; +export { + KernelspecsRef, + communicationKernelspecsFactory, + entitiesKernelspecsSpecFactory, + entitiesKernelspecsFactory +} from "./kernelspecs"; /*
refactor: export kernelspecs record factories.
nteract_nteract
train
js
1715e8dd25bd3fa5a8fa6fbf4e77be1236e079e5
diff --git a/lib/createDiff.js b/lib/createDiff.js index <HASH>..<HASH> 100644 --- a/lib/createDiff.js +++ b/lib/createDiff.js @@ -11,7 +11,9 @@ function getBranch(git, branch) { `git tag --sort -version:refname`, { cwd: git } ).toString().split('\n')[1]; - } catch (e) {} + } catch (e) { + console.log(e) + } } exports = module.exports = function createDiff(cache, git, tag) { @@ -27,6 +29,7 @@ exports = module.exports = function createDiff(cache, git, tag) { `git clone -l -b ${branch} ${repository} ${cache} >& /dev/null` ); } catch (e) { + console.log(e) throw new Error(`Git branch ${branch} not exist.`); }
test(createDiff): test createDiff case
xgfe_freepack
train
js
7ce58dbd4a960a205df44c2b8ef3ae1d9ddf76ec
diff --git a/src/sharding/ShardClientUtil.js b/src/sharding/ShardClientUtil.js index <HASH>..<HASH> 100644 --- a/src/sharding/ShardClientUtil.js +++ b/src/sharding/ShardClientUtil.js @@ -79,6 +79,7 @@ class ShardClientUtil { * Sends a message to the master process. * @param {*} message Message to send * @returns {Promise<void>} + * @emits Shard#message */ send(message) { return new Promise((resolve, reject) => {
docs(ShardClientUtil): link Shard#message from send method (#<I>) * docs(ShardClientUtil): link Shard#message from send method * docs(ShardClientUtil): use @ emits instead of @ link
discordjs_discord.js
train
js
5738766b3f5150f88916395784d22f70abf80f07
diff --git a/src/Service/Exception.php b/src/Service/Exception.php index <HASH>..<HASH> 100644 --- a/src/Service/Exception.php +++ b/src/Service/Exception.php @@ -33,7 +33,7 @@ class Exception extends GoogleException * @param string $message * @param int $code * @param Exception|null $previous - * @param array<string,string> $errors List of errors returned in an HTTP + * @param array<array<string,string>> $errors List of errors returned in an HTTP * response. Defaults to []. */ public function __construct( @@ -54,15 +54,17 @@ class Exception extends GoogleException /** * An example of the possible errors returned. * - * { - * "domain": "global", - * "reason": "authError", - * "message": "Invalid Credentials", - * "locationType": "header", - * "location": "Authorization", - * } + * [ + * { + * "domain": "global", + * "reason": "authError", + * "message": "Invalid Credentials", + * "locationType": "header", + * "location": "Authorization", + * } + * ] * - * @return array<string,string> List of errors return in an HTTP response or []. + * @return array<array<string,string>> List of errors return in an HTTP response or []. */ public function getErrors() {
chore: correct phpdoc types for Exception::getErrors (#<I>)
googleapis_google-api-php-client
train
php
98371cb0bc62133d8fd5f286284eee1811ac045d
diff --git a/lib/https/index.js b/lib/https/index.js index <HASH>..<HASH> 100644 --- a/lib/https/index.js +++ b/lib/https/index.js @@ -334,9 +334,20 @@ function resolveWebsocket(socket, wss) { options.auths = config.getAuths(proxyOptions); } else { var proxyHeaders = options.headers = {}; - var ua = !socket.disable.proxyUA && headers['user-agent']; - if (ua) { - proxyHeaders['user-agent'] = ua; + pluginMgr.getTunnelKeys().forEach(function(k) { + var val = headers[k]; + if (val) { + proxyHeaders[k] = val; + } + }); + var auth = headers['proxy-authorization']; + if (auth) { + proxyHeaders['proxy-authorization'] = auth; + } + if (socket.disable.proxyUA) { + delete proxyHeaders['user-agent']; + } else if (headers['user-agent']) { + proxyHeaders['user-agent'] = headers['user-agent']; } if (wss && (isInternalProxy || isHttps2HttpProxy)) { headers[config.HTTPS_FIELD] = 1;
feat: custom tunnel proxy headers for websocket
avwo_whistle
train
js