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
3dedc35ccbc16335c0ab3b975ea53c4df9e68dcb
diff --git a/lib/js-transform.js b/lib/js-transform.js index <HASH>..<HASH> 100644 --- a/lib/js-transform.js +++ b/lib/js-transform.js @@ -1,6 +1,8 @@ const babelify = require('babelify') const envify = require('envify/custom') const markdown = require('browserify-markdown') +const pkg = require('../lib/pkg') +const commit = require('this-commit')() const through = require('through2') const YAML = require('yamljs') @@ -11,9 +13,12 @@ module.exports = function transform ({ config, env }) { {}, process.env, { + BUILD_TIMESTAMP: (new Date()).getTime(), + COMMIT_SHA: commit, CONFIG_PATH: config.path, MESSAGES: JSON.stringify(config.messages), NODE_ENV: env, + REPO_URL: pkg.repository && pkg.repository.url && pkg.repository.url.replace('.git', ''), SETTINGS: JSON.stringify(config.settings), STORE: JSON.stringify(config.store) },
feat(build): add some useful environment variables
conveyal_mastarm
train
js
4e41308986d2702f4b0a362a9759ee9169fa420a
diff --git a/src/foremast/dns/create_dns.py b/src/foremast/dns/create_dns.py index <HASH>..<HASH> 100644 --- a/src/foremast/dns/create_dns.py +++ b/src/foremast/dns/create_dns.py @@ -74,6 +74,8 @@ class SpinnakerDns: for zone_id in zone_ids: self.log.debug('zone_id: %s', zone_id) + # TODO: boto3 call can fail with botocore.exceptions.ClientError, + # need to retry response = self.r53client.change_resource_record_sets( HostedZoneId=zone_id, ChangeBatch=json.loads(dns_json), )
chore: TODO to retry DNS boto3 call
foremast_foremast
train
py
7e99f5f35e4eb1be5593915b29eaec3e2488d6f6
diff --git a/lib/static/modules/actions.js b/lib/static/modules/actions.js index <HASH>..<HASH> 100644 --- a/lib/static/modules/actions.js +++ b/lib/static/modules/actions.js @@ -152,8 +152,8 @@ export const findSameDiffs = ({suitePath, browser, stateName, fails}) => { try { if (isEmpty(imagesInfoWithEqualDiffSizes)) { - const сloseImagesInfoIds = difference(allOpenedImagesInfoIds, [refImagesInfoId]); - dispatch(closeSections(сloseImagesInfoIds)); + const closeImagesInfoIds = difference(allOpenedImagesInfoIds, [refImagesInfoId]); + dispatch(closeSections(closeImagesInfoIds)); return; } @@ -162,12 +162,12 @@ export const findSameDiffs = ({suitePath, browser, stateName, fails}) => { [refImagesInfo].concat(imagesInfoWithEqualDiffSizes)) ).data; - const сloseImagesInfoIds = difference( + const closeImagesInfoIds = difference( allOpenedImagesInfoIds, equalImages.map(getImagesInfoId).concat(refImagesInfoId) ); - dispatch(closeSections(сloseImagesInfoIds)); + dispatch(closeSections(closeImagesInfoIds)); } catch (e) { console.error('Error while trying to find equal diffs of failed tests:', e); } finally {
chore: replace cyrillic "с" with latin "c"
gemini-testing_html-reporter
train
js
d3aa1050141c76c4de2edea7119f81c14d8ad6ea
diff --git a/src/Response/index.js b/src/Response/index.js index <HASH>..<HASH> 100644 --- a/src/Response/index.js +++ b/src/Response/index.js @@ -1,5 +1,15 @@ +// @flow + export class Response { - constructor(code = 200, body = {}, headers = {}) { + code: number; + body: any; + headers: { [header: string]: string }; + + constructor( + code: number = 200, + body: any = {}, + headers: { [header: string]: string } = {} + ) { this.code = code; this.body = body; this.headers = headers;
refactor: add flow types to response class
devlucky_Kakapo.js
train
js
b454a027cfa4fa8d83278d195cd14fbc5594968d
diff --git a/test/k8sT/Policies.go b/test/k8sT/Policies.go index <HASH>..<HASH> 100644 --- a/test/k8sT/Policies.go +++ b/test/k8sT/Policies.go @@ -89,6 +89,7 @@ var _ = Describe("K8sPolicyTest", func() { knpAllowEgress = helpers.ManifestGet(kubectl.BasePath(), "knp-default-allow-egress.yaml") cnpMatchExpression = helpers.ManifestGet(kubectl.BasePath(), "cnp-matchexpressions.yaml") + deleteCiliumDS(kubectl) DeployCiliumOptionsAndDNS(kubectl, []string{ "--set global.tls.secretsBackend=k8s", "--set global.debug.verbose=flow",
test: Delete Cilium DS before changing startup options.
cilium_cilium
train
go
9afdb134240a321f24e2e41e4e07eb3af455b930
diff --git a/packages/vaex-core/vaex/test/dataset.py b/packages/vaex-core/vaex/test/dataset.py index <HASH>..<HASH> 100644 --- a/packages/vaex-core/vaex/test/dataset.py +++ b/packages/vaex-core/vaex/test/dataset.py @@ -1168,7 +1168,8 @@ class TestDataset(unittest.TestCase): np.testing.assert_array_almost_equal(df['x'].count(), 4) np.testing.assert_array_almost_equal(self.dataset.count("y", selection=None), 10) np.testing.assert_array_almost_equal(self.dataset['y'].count(), 10) - np.testing.assert_array_almost_equal(self.df['y'].count(), 10) + + np.testing.assert_array_almost_equal(self.df['y'].count(), 9) np.testing.assert_array_almost_equal(self.dataset.count("y", selection=True), 4) np.testing.assert_array_almost_equal(ds['y'].count(), 4) np.testing.assert_array_almost_equal(df['y'].count(), 4)
fix: with filtering, actually the count is 9, since nan < <I> is false
vaexio_vaex
train
py
a5023be65d51cb0c5a3f2eee8689e9e13c2bb83c
diff --git a/src/mixins/overlayable.js b/src/mixins/overlayable.js index <HASH>..<HASH> 100644 --- a/src/mixins/overlayable.js +++ b/src/mixins/overlayable.js @@ -101,6 +101,8 @@ export default { this.checkPath(e)) e.preventDefault() }, hasScrollbar (el) { + if (!el || el.nodeType !== Node.ELEMENT_NODE) return false + const style = window.getComputedStyle(el) return ['auto', 'scroll'].includes(style['overflow-y']) && el.scrollHeight > el.clientHeight },
fix(overlayable): only check Elements for a scrollbar Fixes #<I>
vuetifyjs_vuetify
train
js
ddc82138aac1fa3a050cbdd6207ef6d43f8b6cd7
diff --git a/core/poi/lib/plugins/serve.js b/core/poi/lib/plugins/serve.js index <HASH>..<HASH> 100644 --- a/core/poi/lib/plugins/serve.js +++ b/core/poi/lib/plugins/serve.js @@ -108,7 +108,7 @@ exports.apply = api => { api.hook('createWebpackChain', config => { if (!api.cli.options.serve) return - config.devtool('cheap-module-eval-source-map') + config.devtool('cheap-module-source-map') const { hotEntries, hot } = api.config.devServer
fix: react-error-overlay doesn't work with eval source map
egoist_poi
train
js
5bb9b6b94cdce9f8830b1b50484f2b84a27356ed
diff --git a/packages/ui-docs-client/src/components/Nav/index.js b/packages/ui-docs-client/src/components/Nav/index.js index <HASH>..<HASH> 100644 --- a/packages/ui-docs-client/src/components/Nav/index.js +++ b/packages/ui-docs-client/src/components/Nav/index.js @@ -339,7 +339,7 @@ export default class Nav extends Component { const sections = this.renderSections() const themes = this.renderThemes() const icons = this.renderIcons() - const matches = [ ...sections, ...icons, ...themes ] + const matches = [ ...sections, ...themes, ...icons ] return ( <div className={styles.root}>
docs(ui-docs-client): move iconography to the bottom of the nav list refs: INSTUI-<I> TEST PLAN: ensure iconography displays as the last item ensure nav still works as usual Change-Id: Id0e6dc<I>e4a0b5e<I>a<I>b<I>d2b<I>a<I> Reviewed-on: <URL>
instructure_instructure-ui
train
js
c5bb2e43a28915aa981fd00770ae9d388f3ce56c
diff --git a/stellar_sdk/client/requests_client.py b/stellar_sdk/client/requests_client.py index <HASH>..<HASH> 100644 --- a/stellar_sdk/client/requests_client.py +++ b/stellar_sdk/client/requests_client.py @@ -1,5 +1,5 @@ import json -from typing import Any, Dict, Generator, Tuple, Union +from typing import Any, Dict, Generator, Tuple, Union, Optional import requests from requests import RequestException, Session @@ -38,6 +38,7 @@ class RequestsClient(BaseSyncClient): :param backoff_factor: a backoff factor to apply between attempts after the second try :param session: the request session :param stream_session: the stream request session + :param custom_headers: any additional HTTP headers to add in requests """ # TODO: need to allow the user to customize the user agent? @@ -50,6 +51,7 @@ class RequestsClient(BaseSyncClient): backoff_factor: float = DEFAULT_BACKOFF_FACTOR, session: Session = None, stream_session: Session = None, + custom_headers: Optional[Dict[str, str]] = None, ): self.pool_size: int = pool_size self.num_retries: int = num_retries @@ -82,6 +84,9 @@ class RequestsClient(BaseSyncClient): headers = {**IDENTIFICATION_HEADERS, "User-Agent": USER_AGENT} + if custom_headers: + headers = {**headers, **custom_headers} + # init session if session is None: session = requests.Session()
feat: allow custom headers to be set in Server (#<I>, #<I>)
StellarCN_py-stellar-base
train
py
a9187b7c9937b641acde8784f23455c1b9539ec5
diff --git a/platform/nativescript/runtime/index.js b/platform/nativescript/runtime/index.js index <HASH>..<HASH> 100644 --- a/platform/nativescript/runtime/index.js +++ b/platform/nativescript/runtime/index.js @@ -59,7 +59,7 @@ const mount = function(el, hydrating) { } }) } else { - mountComponent(this, el, hydrating) + return mountComponent(this, el, hydrating) } }
fix: return mounted component (#<I>) Make sure to return the mounted component, so we can use it in unit tests.
nativescript-vue_nativescript-vue
train
js
d2982e10d87dde04b250d64f6d2d876cabbc89fc
diff --git a/protocol-designer/src/tutorial/reducers.js b/protocol-designer/src/tutorial/reducers.js index <HASH>..<HASH> 100644 --- a/protocol-designer/src/tutorial/reducers.js +++ b/protocol-designer/src/tutorial/reducers.js @@ -2,6 +2,8 @@ import {combineReducers} from 'redux' import {handleActions} from 'redux-actions' import uniq from 'lodash/uniq' +import without from 'lodash/without' +import type {EditIngredient} from '../labware-ingred/actions' import type {HintKey} from './index' import type {AddHintAction, RemoveHintAction} from './actions' @@ -10,6 +12,9 @@ const hints = handleActions({ ADD_HINT: (state: HintReducerState, action: AddHintAction): HintReducerState => ( uniq([...state, action.payload.hint]) ), + EDIT_INGREDIENT: (state: HintReducerState, action: EditIngredient) => ( + without(state, 'add_liquids_and_labware') + ), }, []) type DismissedHintReducerState = Array<HintKey>
feat(protocol-designer): auto dismiss no liquid hint (#<I>) Upon adding liquid to deck after triggering no liquid hint, remove hint.
Opentrons_opentrons
train
js
4b98e1fcbd08720836c34958e9692124525bf44a
diff --git a/wandb/data_types.py b/wandb/data_types.py index <HASH>..<HASH> 100644 --- a/wandb/data_types.py +++ b/wandb/data_types.py @@ -1774,7 +1774,12 @@ class _ImageFileType(_dtypes.Type): types = [Image] def __init__( - self, box_layers=None, box_score_keys=None, mask_layers=None, class_map=None + self, + box_layers=None, + box_score_keys=None, + mask_layers=None, + class_map=None, + **kwargs, ): box_layers = box_layers or {} box_score_keys = box_score_keys or []
fix(weave): Image Type should gracefully handle older type params (#<I>)
wandb_client
train
py
0da49bf4b989c9b140f309d20ea52c8af64378cd
diff --git a/website/pages/en/examples.js b/website/pages/en/examples.js index <HASH>..<HASH> 100644 --- a/website/pages/en/examples.js +++ b/website/pages/en/examples.js @@ -16,6 +16,7 @@ const examples = examplesPkgs.map((e) => { const node = base.startsWith('node'); const chrome = base.startsWith('chrome'); const ptor = base.startsWith('protractor'); + const puppet = base.startsWith('puppeteer'); const r = base.startsWith('react'); const js = base.endsWith('js'); const ts = base.endsWith('ts'); @@ -42,6 +43,10 @@ const examples = examplesPkgs.map((e) => { imgs.push('img/protractor.svg'); title = 'Protractor'; } + if (puppet) { + imgs.push('https://user-images.githubusercontent.com/10379601/29446482-04f7036a-841f-11e7-9872-91d1fc2ea683.png'); + title = 'Puppeteer'; + } if (r) { imgs.push('img/react.svg'); title = 'React';
chore: fix puppeteer example (#<I>)
qlik-oss_after-work.js
train
js
60e4c2a67d50dc499e384fe201033097034f434d
diff --git a/src/js/api/boot.js b/src/js/api/boot.js index <HASH>..<HASH> 100644 --- a/src/js/api/boot.js +++ b/src/js/api/boot.js @@ -9,30 +9,12 @@ export default function (UIkit) { return; } - if (document.body) { - - fastdom.read(init); - - } else { - - (new MutationObserver(function () { - - if (document.body) { - this.disconnect(); - init(); - } - - })).observe(document, {childList: true, subtree: true}); - - } + fastdom.read(init); function init() { apply(document.body, connect); - // Safari renders prior to first animation frame - fastdom.flush(); - (new MutationObserver(mutations => mutations.forEach(applyMutation))).observe(document, { childList: true, subtree: true,
refactor: remove the check to wait for body (Safari <I> executes requestAnimationFrame before next frame now)
uikit_uikit
train
js
66db765a17b5dc0904fcafe83aeb7c3eb5d60c12
diff --git a/lib/standards/html-elms.js b/lib/standards/html-elms.js index <HASH>..<HASH> 100644 --- a/lib/standards/html-elms.js +++ b/lib/standards/html-elms.js @@ -936,7 +936,7 @@ const htmlElms = { }, wbr: { contentTypes: ['phrasing', 'flow'], - allowedRoles: true + allowedRoles: ['presentation', 'none'] } };
fix(aria-allowed-role): updates the allowed roles for the wbr element to none and presentation (#<I>) related to issue #<I>
dequelabs_axe-core
train
js
e06800286d3099c81a7988897191dfdb0d435c42
diff --git a/lib/auth.http.router.js b/lib/auth.http.router.js index <HASH>..<HASH> 100644 --- a/lib/auth.http.router.js +++ b/lib/auth.http.router.js @@ -74,7 +74,7 @@ router.post('/signin', (request, response, next) => { }, function encodePartyToJWT(party, then) { - encode({ _id: party._id }, function afterEncode(error, jwtToken) { + encode({ id: party._id }, function afterEncode(error, jwtToken) { if (error) { then(error); } else {
fix(auth): encode id as payload
CodeTanzania_emis-stakeholder
train
js
c46a984cef5329eea6de30b3cbf63bc1652ce1c6
diff --git a/memote/utils.py b/memote/utils.py index <HASH>..<HASH> 100644 --- a/memote/utils.py +++ b/memote/utils.py @@ -127,7 +127,8 @@ def get_ids(iterable): def get_ids_and_bounds(iterable): """Retrieve the identifier and bounds of a number of objects.""" - return [(elem.id, elem.lower_bound, elem.upper_bound) for elem in iterable] + return ["{0.lower_bound} <= {0.id} <= {0.upper_bound}".format(elem) for + elem in iterable] def truncate(sequence):
fix: get_ids_and_bounds now returns list of str (#<I>)
opencobra_memote
train
py
8befb05db7f9f3cff43f0e5763470bf5f838d552
diff --git a/packages/orbit-components/src/Modal/ModalSection/index.js b/packages/orbit-components/src/Modal/ModalSection/index.js index <HASH>..<HASH> 100644 --- a/packages/orbit-components/src/Modal/ModalSection/index.js +++ b/packages/orbit-components/src/Modal/ModalSection/index.js @@ -50,7 +50,7 @@ export const StyledModalSection = styled.section` &:first-of-type { margin-top: ${({ suppressed, theme, closable }) => - suppressed && closable && theme.orbit.spaceXXLarge}; + ((suppressed && closable) || suppressed) && theme.orbit.spaceXXLarge}; border-top-left-radius: ${({ isMobileFullPage }) => !isMobileFullPage && "9px"}; // TODO: create token border-top-right-radius: ${({ isMobileFullPage }) =>
fix(ModalSection): margin-top (#<I>)
kiwicom_orbit-components
train
js
b02f28ff25213e88712df04b4cb0b4005379a5d1
diff --git a/lib/statement-generators/column/index.js b/lib/statement-generators/column/index.js index <HASH>..<HASH> 100644 --- a/lib/statement-generators/column/index.js +++ b/lib/statement-generators/column/index.js @@ -30,6 +30,11 @@ function buildConstraint (target) { return constraint } +const needCast = [ + 'jsonb', + 'integer' +] + function buildType (target, columnName) { let type = target.dataType @@ -41,8 +46,8 @@ function buildType (target, columnName) { type += `[] USING ${columnName}::${target.dataType}[]` } - if (target.dataType === 'jsonb') { - type += ` USING ${columnName}::jsonb` + if (needCast.includes(target.dataType)) { + type += ` USING ${columnName}::${target.dataType}` } return type
fix: Add USING cast to Alter column to integer
wmfs_pg-diff-sync
train
js
52189e71942e7ef1e4d8630c28ba36b11bd7d0dd
diff --git a/packages/node_modules/@webex/internal-plugin-team/test/integration/spec/get.js b/packages/node_modules/@webex/internal-plugin-team/test/integration/spec/get.js index <HASH>..<HASH> 100644 --- a/packages/node_modules/@webex/internal-plugin-team/test/integration/spec/get.js +++ b/packages/node_modules/@webex/internal-plugin-team/test/integration/spec/get.js @@ -161,8 +161,7 @@ describe('plugin-team', () => { })); }); - // Skipping until SPARK-92569 - describe.skip('#list()', () => { + describe('#list()', () => { it('retrieves a list of teams', () => kirk.webex.internal.team.list() .then((teams) => { assert.equal(teams.length, 2);
test(internal-plugin-team): remove skip clause from testing suite Remove the unnecessary 'skip' clause from the testing suite now that all tests for the specified clause are passing.
webex_spark-js-sdk
train
js
2eff4a4467ccb867c03584304521da590093bf4a
diff --git a/src/lib/type.js b/src/lib/type.js index <HASH>..<HASH> 100644 --- a/src/lib/type.js +++ b/src/lib/type.js @@ -6,7 +6,7 @@ module.exports = function (plugins, commits, lastRelease, cb) { if (!type) { return cb(new SemanticReleaseError( - 'There are no relevant changes, so no new version is released', + 'There are no relevant changes, so no new version is released.', 'ENOCHANGE' )) }
style(type): add dot at end of sentence
semantic-release_semantic-release
train
js
2c449b6b48f5cbc88e666afa852055b873994ca5
diff --git a/src/structures/Sticker.js b/src/structures/Sticker.js index <HASH>..<HASH> 100644 --- a/src/structures/Sticker.js +++ b/src/structures/Sticker.js @@ -78,7 +78,7 @@ class Sticker extends Base { * The user that uploaded the guild sticker * @type {?User} */ - this.user = sticker.user ? this.client.users.add(sticker.user) : null; + this.user = sticker.user ? this.client.users._add(sticker.user) : null; /** * The standard sticker's sort order within its pack
fix(Sticker): Rename method correctly to _add (#<I>)
discordjs_discord.js
train
js
4531d8ee17755208ee2d6cb1c06d24cbde6bee27
diff --git a/connection/connection.js b/connection/connection.js index <HASH>..<HASH> 100644 --- a/connection/connection.js +++ b/connection/connection.js @@ -651,6 +651,13 @@ Connection.prototype.connect = function(_options) { ); } + // clean up existing event handlers + this.connection.removeAllListeners('error'); + this.connection.removeAllListeners('timeout'); + this.connection.removeAllListeners('close'); + this.connection.removeAllListeners('data'); + this.connection = undefined; + return doConnect(this, 4, _options, _errorHandler); }); };
fix(connection): ensure connection cleanup before fallback retry Now that we default to connecting to ipv6 hosts first, and then fallback to ipv4, we need to make sure that there are no duplicate event handlers attached to the connection which might cause confusion up the chain.
mongodb_node-mongodb-native
train
js
1fc2c28988b3e3b4b7ffa21c9005778af240d83f
diff --git a/quasar/src/mixins/prevent-scroll.js b/quasar/src/mixins/prevent-scroll.js index <HASH>..<HASH> 100644 --- a/quasar/src/mixins/prevent-scroll.js +++ b/quasar/src/mixins/prevent-scroll.js @@ -1,4 +1,4 @@ -import { getEventPath, stopAndPrevent } from '../utils/event.js' +import { getEventPath, listenOpts, stopAndPrevent } from '../utils/event.js' import { hasScrollbar } from '../utils/scroll.js' import Platform from '../plugins/Platform.js' @@ -52,7 +52,10 @@ function prevent (register) { document.body.classList[action]('q-body--prevent-scroll') } else if (Platform.is.desktop) { - window[`${action}EventListener`]('wheel', onWheel) + // ref. https://developers.google.com/web/updates/2017/01/scrolling-intervention + const evtOpts = listenOpts.passive === void 0 ? void 0 : { passive: false } + + window[`${action}EventListener`]('wheel', onWheel, evtOpts) } }
fix(quasar): Fix wheel event beeing passive by default in chrome (#<I>) * fix(quasar): Fix wheel event beeing passive by default in chrome See wheel scroll over body on v1 docs site when left drawer is open. * Update prevent-scroll.js
quasarframework_quasar
train
js
44c6ac06849a89985e6d687f827f890b4ccb953b
diff --git a/src/Views.php b/src/Views.php index <HASH>..<HASH> 100644 --- a/src/Views.php +++ b/src/Views.php @@ -76,7 +76,7 @@ class Views * * @var \DateTime */ - public $cacheLifetime; + protected $cacheLifetime; /** * Used IP Address instead of the provided one by the resolver.
feat: import required DateTime class in Views class
cyrildewit_eloquent-viewable
train
php
1a2e3d0b424fec4d2e3f68071b6520a5477284c8
diff --git a/src/components/chips/js/chipsDirective.js b/src/components/chips/js/chipsDirective.js index <HASH>..<HASH> 100644 --- a/src/components/chips/js/chipsDirective.js +++ b/src/components/chips/js/chipsDirective.js @@ -298,7 +298,6 @@ secondaryPlaceholder: '@?', maxChips: '@?mdMaxChips', transformChip: '&mdTransformChip', - onAppend: '&?mdOnAppend', onAdd: '&?mdOnAdd', onRemove: '&?mdOnRemove', addedMessage: '@?mdAddedMessage', @@ -416,13 +415,6 @@ // before appending chips. if (attrs.mdTransformChip) mdChipsCtrl.useTransformChipExpression(); - // If an `md-on-append` attribute was set, tell the controller to use the expression - // when appending chips. - // - // TODO: Remove this now that 1.0 is long since released - // DEPRECATED: Will remove in official 1.0 release - if (attrs.mdOnAppend) mdChipsCtrl.useOnAppendExpression(); - // If an `md-on-add` attribute was set, tell the controller to use the expression // when adding chips. if (attrs.mdOnAdd) mdChipsCtrl.useOnAddExpression();
refactor(chips): remove deprecated md-on-append attribute BREAKING CHANGE: Removed the deprecated, since <I>, `md-on-append` attribute. It was deprecated in favor of `md-transform-chip` or the simple notifier `md-on-add`. Please see the [md-chips Demos](<URL>) for examples of using `md-transform-chip`.
angular_material
train
js
786a033628a253ffe310c3fe804e55faa8cc1e6b
diff --git a/src/Request.php b/src/Request.php index <HASH>..<HASH> 100644 --- a/src/Request.php +++ b/src/Request.php @@ -61,6 +61,9 @@ class Request implements RequestInterface case 'laravel': case 'symfony': return $this->request->headers->get($name, $default); + + case 'thinkphp': + return $this->request->header($name, $default); } // Not using framewoerk ? diff --git a/src/Response.php b/src/Response.php index <HASH>..<HASH> 100644 --- a/src/Response.php +++ b/src/Response.php @@ -68,6 +68,10 @@ class Response implements ResponseInterface $this->response->headers->set($name, $value); break; + case 'thinkphp': + $this->response->header($name, $value); + break; + default: $this->response[$name] = $value; break;
feat(Core): CORS request and response adapter support ThinkPHP
medz_cors
train
php,php
e23f9402674324e637620dc33f695c727e44030a
diff --git a/tests/system/Helpers/CookieHelperTest.php b/tests/system/Helpers/CookieHelperTest.php index <HASH>..<HASH> 100755 --- a/tests/system/Helpers/CookieHelperTest.php +++ b/tests/system/Helpers/CookieHelperTest.php @@ -122,7 +122,7 @@ final class CookieHelperTest extends CIUnitTestCase public function testGetCookie() { - $_COOKIE['TEST'] = 5; + $_COOKIE['TEST'] = '5'; $this->assertSame('5', get_cookie('TEST')); }
test: fix $_COOKIE value It should be a string.
codeigniter4_CodeIgniter4
train
php
601ee7794cbb1f6227f4a17c54e031110e74356f
diff --git a/Debugger/src/Breakpoint.php b/Debugger/src/Breakpoint.php index <HASH>..<HASH> 100644 --- a/Debugger/src/Breakpoint.php +++ b/Debugger/src/Breakpoint.php @@ -476,7 +476,9 @@ class Breakpoint 'stackFrames' => array_map(function ($sf) { return $sf->info(); }, $this->stackFrames), - 'evaluatedExpressions' => $this->evaluatedExpressions + 'evaluatedExpressions' => array_map(function ($exp) { + return $exp->info(); + }, $this->evaluatedExpressions), ]; if ($this->labels) { $info['labels'] = $this->labels;
fix: correctly serialize evaluated expressions (#<I>)
googleapis_google-cloud-php
train
php
6c40335f80d98732c9501238896556ab5f6b98b7
diff --git a/lib/components/user/back-link.js b/lib/components/user/back-link.js index <HASH>..<HASH> 100644 --- a/lib/components/user/back-link.js +++ b/lib/components/user/back-link.js @@ -4,6 +4,8 @@ import styled from 'styled-components' import Icon from '../narrative/icon' +const Container = styled.div`` + const StyledButton = styled(Button)` padding: 0; ` @@ -14,12 +16,14 @@ const navigateBack = () => window.history.back() * Back link that navigates to the previous location in browser history. */ const BackLink = () => ( - <StyledButton - bsStyle='link' - onClick={navigateBack} - > - <Icon name='arrow-left' /> Back - </StyledButton> + <Container> + <StyledButton + bsStyle='link' + onClick={navigateBack} + > + <Icon name='arrow-left' /> Back + </StyledButton> + </Container> ) export default BackLink
refactor(BackLink): Move markup into BackLink
opentripplanner_otp-react-redux
train
js
c5642447384f18202376379c2a1c332a8f03ba01
diff --git a/spec/validated_object_spec.rb b/spec/validated_object_spec.rb index <HASH>..<HASH> 100644 --- a/spec/validated_object_spec.rb +++ b/spec/validated_object_spec.rb @@ -2,6 +2,11 @@ require 'spec_helper' describe ValidatedObject do + class Apple < ValidatedObject::Base + attr_accessor :diameter + validates :diameter, type: Float + end + it 'has a version number' do expect(ValidatedObject::VERSION).not_to be nil end @@ -10,25 +15,21 @@ describe ValidatedObject do expect(ValidatedObject::Base).not_to be nil end + it 'throws an ArgumentError if non-hash is given' do + expect { + Apple.new(5) + }.to raise_error(ArgumentError) + end + context 'TypeValidator' do it 'verifies a valid type' do - class Apple1 < ValidatedObject::Base - attr_accessor :diameter - validates :diameter, type: Float - end - - small_apple = Apple1.new diameter: 2.0 + small_apple = Apple.new diameter: 2.0 expect( small_apple ).to be_valid end it 'rejects an invalid type' do - class Apple2 < ValidatedObject::Base - attr_accessor :diameter - validates :diameter, type: Float - end - expect { - Apple2.new diameter: '2' + Apple.new diameter: '2' }.to raise_error(ArgumentError) end
chore: failing test for param type
public-law_validated_object
train
rb
1a861757633726767d5a430aa4a5876d42473b01
diff --git a/src/validation/validation-rules-collection.js b/src/validation/validation-rules-collection.js index <HASH>..<HASH> 100644 --- a/src/validation/validation-rules-collection.js +++ b/src/validation/validation-rules-collection.js @@ -96,7 +96,7 @@ export class ValidationRulesCollection { addValidationRule(validationRule) { if (validationRule.validate === undefined) //Can ES6 check on base class?? - throw new exception("That's not a valid validationRule"); + throw new Error("That's not a valid validationRule"); this.validationRules.push(validationRule); }
fix(validation-rules-collection): fix throw syntax
aurelia_validation
train
js
1129d184482720bb52fa61f0a309645b7caaddd9
diff --git a/src/core/instance/render.js b/src/core/instance/render.js index <HASH>..<HASH> 100644 --- a/src/core/instance/render.js +++ b/src/core/instance/render.js @@ -86,15 +86,11 @@ export function renderMixin (Vue: Class<Component>) { // return error render result, // or previous vnode to prevent render error causing blank component /* istanbul ignore else */ - if (process.env.NODE_ENV !== 'production') { - if (vm.$options.renderError) { - try { - vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e) - } catch (e) { - handleError(e, vm, `renderError`) - vnode = vm._vnode - } - } else { + if (process.env.NODE_ENV !== 'production' && vm.$options.renderError) { + try { + vnode = vm.$options.renderError.call(vm._renderProxy, vm.$createElement, e) + } catch (e) { + handleError(e, vm, `renderError`) vnode = vm._vnode } } else {
refactor: reduce if-else nesting, coalesce conditions (#<I>)
kaola-fed_megalo
train
js
1e258625952dde16f8ff211c25845520126da743
diff --git a/lib/scuid.js b/lib/scuid.js index <HASH>..<HASH> 100644 --- a/lib/scuid.js +++ b/lib/scuid.js @@ -9,7 +9,7 @@ var os = require( 'os' ) */ function pad( str, chr, n ) { while( str.length < n ) str = chr + str; - return str.substring( 0, n ) + return str.substring( str.length - n, str.length ) } /**
feat: make fingerprint unique for different pids on same host by using substring of tail instead of substring of head
jhermsmeier_node-scuid
train
js
2cd2d991ceb7261e1fc6471f07741a520f2d05c6
diff --git a/GPy/core/sparse_gp.py b/GPy/core/sparse_gp.py index <HASH>..<HASH> 100644 --- a/GPy/core/sparse_gp.py +++ b/GPy/core/sparse_gp.py @@ -76,7 +76,7 @@ class SparseGP(GP): def parameters_changed(self): self.posterior, self._log_marginal_likelihood, self.grad_dict = \ self.inference_method.inference(self.kern, self.X, self.Z, self.likelihood, - self.Y, Y_metadata=self.Y_metadata, + self.Y_normalized, Y_metadata=self.Y_metadata, mean_function=self.mean_function) self._update_gradients()
fix: #<I> Y_normalized was not used for running optimization
SheffieldML_GPy
train
py
79b3cfc6ad02ecc76fe23a3c3ff2d0b32a0ae4a8
diff --git a/src/connection-manager/auto-dialler.js b/src/connection-manager/auto-dialler.js index <HASH>..<HASH> 100644 --- a/src/connection-manager/auto-dialler.js +++ b/src/connection-manager/auto-dialler.js @@ -57,7 +57,9 @@ class AutoDialler { } this._running = true - this._autoDial() + this._autoDial().catch(err => { + log.error('could start autodial', err) + }) log('started') }
fix: do not wait for autodial start (#<I>) When we've previously seen loads of peers and stored them in the datastore we'll try to dial them as part of starting the autodial component. If we or our peers have bad network connections this can make starting a libp2p node take ages so don't wait for a round of auto dialing before considering the component started.
libp2p_js-libp2p
train
js
815467da5a9196405b43f27ca674b014b60093ab
diff --git a/packages/cozy-jobs-cli/src/konnector-dev.js b/packages/cozy-jobs-cli/src/konnector-dev.js index <HASH>..<HASH> 100755 --- a/packages/cozy-jobs-cli/src/konnector-dev.js +++ b/packages/cozy-jobs-cli/src/konnector-dev.js @@ -65,8 +65,14 @@ authenticate({ tokenPath: token, manifestPath: manifest }) .then(() => { const { BaseKonnector, mkdirp } = require('cozy-konnector-libs') BaseKonnector.prototype.init = async () => { - const rootPath = '/cozy-konnector-dev-root' - await mkdirp(rootPath) + let rootPath = '/cozy-konnector-dev-root' + try { + await mkdirp(rootPath) + } + catch (e) { + console.log(`Could not create folder ${rootPath}, using / as base folder.`) + rootPath = '/' + } return { ...config.fields, folderPath: rootPath
fix: Don't crash if root path can't be created
konnectors_libs
train
js
888300b5e319093c03663a4bb45d47033c15ca69
diff --git a/packages/app-frontend/src/features/timeline/index.js b/packages/app-frontend/src/features/timeline/index.js index <HASH>..<HASH> 100644 --- a/packages/app-frontend/src/features/timeline/index.js +++ b/packages/app-frontend/src/features/timeline/index.js @@ -59,7 +59,7 @@ export function useSelectedEvent () { return { selectedEvent, selectedEventData: computed(() => parse(selectedEvent.value.data)), - selectedEventTime: computed(() => formatTime(selectedEvent.value.time - minTime.value)) + selectedEventTime: computed(() => formatTime(selectedEvent.value.time, 'ms')) } }
fix(timeline): event time display
vuejs_vue-devtools
train
js
9b88fa804b1211c92f4d8cc2f4911b81309927ab
diff --git a/lib/utils/ember.js b/lib/utils/ember.js index <HASH>..<HASH> 100644 --- a/lib/utils/ember.js +++ b/lib/utils/ember.js @@ -406,7 +406,11 @@ function isRouteLifecycleHook(property) { } function isActionsProp(property) { - return property.key.name === 'actions' && types.isObjectExpression(property.value); + return ( + types.isIdentifier(property.key) && + property.key.name === 'actions' && + types.isObjectExpression(property.value) + ); } function isComponentLifecycleHookName(name) { diff --git a/tests/lib/rules/no-actions-hash.js b/tests/lib/rules/no-actions-hash.js index <HASH>..<HASH> 100644 --- a/tests/lib/rules/no-actions-hash.js +++ b/tests/lib/rules/no-actions-hash.js @@ -64,6 +64,11 @@ ruleTester.run('no-actions-hash', rule, { }, }); `, + + // Spread syntax + 'Route.extend({ ...foo });', + 'Route.extend(Evented, { ...foo });', + 'Route.extend(...foo);', ], invalid: [
fix: crash with spread syntax in no-actions-hash rule
ember-cli_eslint-plugin-ember
train
js,js
18a496b3f75444a8737d182b060da99b19ba8506
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -113,6 +113,15 @@ class Homefront { } /** + * Get data object. + * + * @return {Object} + */ + getData() { + return this.data; + } + + /** * Expands flat object to nested object. * * @return {{}} @@ -156,7 +165,7 @@ class Homefront { * * @returns {Homefront} */ - defaults(key, defaults) { + applyDefaults(key, defaults) { return this.put(key, Homefront.merge(defaults, this.fetch(key, {}))); } diff --git a/test/index.test.js b/test/index.test.js index <HASH>..<HASH> 100644 --- a/test/index.test.js +++ b/test/index.test.js @@ -300,11 +300,11 @@ describe('Homefront', () => { }); }); - describe('.defaults()', () => { + describe('.applyDefaults()', () => { it("Should set the defaults (left to right) provided", () => { let homefront = new Homefront({foo: {bar: {bat: 'value', baz: 'value', deep: {also: 'works'}}}}); - homefront.defaults('foo.bar', { + homefront.applyDefaults('foo.bar', { bat : 'never applied', cake : 'lies', bacon: 'Why not',
fix(project): rename defaults method defaults cause exceptions on android stock browser. It shadows the name of a strict-mode function. BREAKING CHANGE: defaults is now called applyDefaults
SpoonX_homefront
train
js,js
d2848ae7ce0c4d403246c03c76fa6bd8703b09cf
diff --git a/Tests/ProviderAggregatorTest.php b/Tests/ProviderAggregatorTest.php index <HASH>..<HASH> 100644 --- a/Tests/ProviderAggregatorTest.php +++ b/Tests/ProviderAggregatorTest.php @@ -13,7 +13,6 @@ declare(strict_types=1); namespace Geocoder\Tests; use Geocoder\Collection; -use Geocoder\Geocoder; use Geocoder\Model\Address; use Geocoder\Model\AddressCollection; use Geocoder\Query\GeocodeQuery;
docs: update google maps code in readme (#<I>) * docs: update google maps code in readme * fix: throw exception if API key is not provided * fix: tests * docs: update google maps docs
geocoder-php_php-common
train
php
ac4af8a20fdf7de8a5c35525fe987c594a3fab73
diff --git a/library/actor-common/src/main/java/im/actor/model/entity/ContentDescription.java b/library/actor-common/src/main/java/im/actor/model/entity/ContentDescription.java index <HASH>..<HASH> 100644 --- a/library/actor-common/src/main/java/im/actor/model/entity/ContentDescription.java +++ b/library/actor-common/src/main/java/im/actor/model/entity/ContentDescription.java @@ -65,7 +65,7 @@ public class ContentDescription extends BserObject { 0, true); } else if (msg instanceof ServiceGroupUserJoined) { return new ContentDescription(ContentType.SERVICE_JOINED, "", - 0, true); + 0, false); } else { return new ContentDescription(ContentType.UNKNOWN_CONTENT); }
fix(common): Fixing ContentDescription for Joined
actorapp_actor-platform
train
java
e1da06c8a0f00ed22cecd09094daa05a7e82b88c
diff --git a/generators/deployment/index.js b/generators/deployment/index.js index <HASH>..<HASH> 100644 --- a/generators/deployment/index.js +++ b/generators/deployment/index.js @@ -163,7 +163,7 @@ module.exports = class extends Generator { _configureNode() { if (this.fs.exists(this.destinationPath("webpack.js")) || this.fs.exists(this.destinationPath("webpack.prod.js"))) { - this.manifestConfig.command = 'npm prune --production && NODE_ENV=production npm start'; + this.manifestConfig.command = 'NODE_ENV=production npm start'; this.manifestConfig.env.NPM_CONFIG_PRODUCTION = false; } else { this.manifestConfig.command = 'npm start';
fix: fix node cf deployments due to pruning
ibm-developer_generator-ibm-cloud-enablement
train
js
db160f4aaec36308ec510a04f1767a4007bcf6bd
diff --git a/test/standard-transformers-and-validators/if.spec.js b/test/standard-transformers-and-validators/if.spec.js index <HASH>..<HASH> 100644 --- a/test/standard-transformers-and-validators/if.spec.js +++ b/test/standard-transformers-and-validators/if.spec.js @@ -79,3 +79,20 @@ test('if: smart enough to separate validation from if transformer', t => { t.end(); }); + +test('if: support options', t => { + let rule = {a: [ + {if: "$b", validate: "mandatory", b: true} + ]}; + + t.deepEqual(v.validate({a: ''}, rule), {a: ['must not be empty']}); + + rule = {a: [ + {if: "$b", validate: "mandatory", "b.bind": "c"} + ]}; + + t.deepEqual(v.validate({a: '', c: true}, rule), {a: ['must not be empty']}); + t.equal(v.validate({a: '', c: false}, rule), undefined); + + t.end(); +});
test: add failing test of "if" using option
buttonwoodcx_bcx-validation
train
js
07287019e694bdf51b0f50797436016dd4f86716
diff --git a/models/classes/Lists/DataAccess/Repository/RdfValueCollectionRepository.php b/models/classes/Lists/DataAccess/Repository/RdfValueCollectionRepository.php index <HASH>..<HASH> 100644 --- a/models/classes/Lists/DataAccess/Repository/RdfValueCollectionRepository.php +++ b/models/classes/Lists/DataAccess/Repository/RdfValueCollectionRepository.php @@ -24,7 +24,7 @@ declare(strict_types=1); namespace oat\tao\model\Lists\DataAccess\Repository; -use BadMethodCallException; +use common_exception_Error; use common_persistence_SqlPersistence as SqlPersistence; use core_kernel_classes_Class as KernelClass; use core_kernel_classes_Resource as KernelResource; @@ -123,9 +123,20 @@ class RdfValueCollectionRepository extends InjectionAwareService implements Valu } } + /** + * @param string $valueCollectionUri + * + * @throws common_exception_Error + */ public function delete(string $valueCollectionUri): void { - throw new BadMethodCallException('Not Implemented'); + $listClass = new KernelClass($valueCollectionUri); + + $listItems = $listClass->getInstances(false); + + foreach ($listItems as $listItem) { + $listItem->delete(); + } } /**
chore: method delete implemented in rdf repository
oat-sa_tao-core
train
php
67e027166045d13790b5b86bd3bb0116abd9ffc0
diff --git a/src/org/nutz/mvc/filter/CheckSession.java b/src/org/nutz/mvc/filter/CheckSession.java index <HASH>..<HASH> 100644 --- a/src/org/nutz/mvc/filter/CheckSession.java +++ b/src/org/nutz/mvc/filter/CheckSession.java @@ -32,10 +32,7 @@ public class CheckSession implements ActionFilter { public View match(ActionContext context) { HttpSession session = Mvcs.getHttpSession(false); - if (session == null) - return null; - Object obj = session.getAttribute(name); - if (null == obj) + if (session == null || null == session.getAttribute(name)) return new ServerRedirectView(path); return null; }
fix: CheckSession ERROR when session is NULL
nutzam_nutz
train
java
89c52ba2aaa1975291ddc7c19b672187dc62599a
diff --git a/test/test_SCardGetErrorMessage.py b/test/test_SCardGetErrorMessage.py index <HASH>..<HASH> 100644 --- a/test/test_SCardGetErrorMessage.py +++ b/test/test_SCardGetErrorMessage.py @@ -30,7 +30,7 @@ class TestError(unittest.TestCase): res = SCardGetErrorMessage(1) # macOS bug not yet fixed - if get_platform() < 'macosx-10.13': + if get_platform().startswith('macosx-') and get_platform() < 'macosx-10.13': expected = "Unkown error: 0x00000001" else: expected = "Unknown error: 0x00000001"
test: fix test for SCardGetErrorMessage(1) on Mojave And do not fail on other Unixes.
LudovicRousseau_pyscard
train
py
f5252627be86369d03bb7fd5fde994aaa44bdf15
diff --git a/rollup.config.js b/rollup.config.js index <HASH>..<HASH> 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -1,5 +1,5 @@ import commonjs from 'rollup-plugin-commonjs'; -// import angular from 'rollup-plugin-angular'; +import angular from 'rollup-plugin-angular'; import nodeResolve from 'rollup-plugin-node-resolve'; import typescript from 'rollup-plugin-typescript'; import uglify from 'rollup-plugin-uglify'; @@ -13,7 +13,7 @@ export default { moduleName: '@ngx-prism/core', onwarn, plugins: [ - // angular(), + angular(), commonjs({ namedExports: { 'node_modules/rxjs/**': ['named']
chore(package-lock): add rollup-plugin-angular Prepare for new version of rollup-plugin-angular with ngx component support
ngx-prism_core
train
js
aa3c0c16aa8e0601be3a411d05aa65e3b814fcda
diff --git a/ipyvolume/serialize.py b/ipyvolume/serialize.py index <HASH>..<HASH> 100644 --- a/ipyvolume/serialize.py +++ b/ipyvolume/serialize.py @@ -18,7 +18,8 @@ def cube_to_png(grid, vmin, vmax, file): grid_normalized = (grid*1.0 - vmin) / (vmax - vmin) grid_normalized[~np.isfinite(grid_normalized)] = 0 gradient = np.gradient(grid_normalized) - gradient = gradient / np.sqrt(gradient[0]**2 + gradient[1]**2 + gradient[2]**2) + with np.errstate(divide='ignore'): + gradient = gradient / np.sqrt(gradient[0]**2 + gradient[1]**2 + gradient[2]**2) # intensity_normalized = (np.log(self.data3d + 1.) - np.log(mi)) / (np.log(ma) - np.log(mi)); import PIL.Image for y2d in range(rows):
fix: divide by zero is ignored in gradient
maartenbreddels_ipyvolume
train
py
35643f4151c4f17ad8b5e4d1d2ca76516734c792
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,3 @@ 'use strict'; -if (typeof window !== 'undefined') { - require('babel-polyfill'); -} - module.exports = require('./lib/parser');
fix(index): testing for browser is no longer required
richardschneider_table-master-parser
train
js
93627d1a2f5fc3e1a35dba67098c7fe0a24bb6b8
diff --git a/lib/util/index.js b/lib/util/index.js index <HASH>..<HASH> 100644 --- a/lib/util/index.js +++ b/lib/util/index.js @@ -497,6 +497,9 @@ function getFullUrl(req) { var hostRule; if (hasProtocol(req.url)) { var options = url.parse(req.url); + if (options.protocol === 'https:') { + req.isHttps = true; + } req.url = options.path; if (options.host) { if (!host || typeof host !== 'string') {
refactor: getFullUrl
avwo_whistle
train
js
90a5f84d569879b186584e5d913a9d3cc5f16058
diff --git a/alerta/management/views.py b/alerta/management/views.py index <HASH>..<HASH> 100644 --- a/alerta/management/views.py +++ b/alerta/management/views.py @@ -227,13 +227,21 @@ def status(): @permission(Scope.read_management) def prometheus_metrics(): + now = int(time.time() * 1000) total_alert_gauge.set(Alert.get_count()) output = Gauge.find_all() output += Counter.find_all() output += Timer.find_all() + outputs = [o.serialize(format='prometheus') for o in output] + outputs += ( + '# HELP alerta_uptime_msecs milliseconds since app has started\n' + '# TYPE alerta_uptime counter\n' + 'alerta_uptime_msecs {timestamp}\n'.format( + timestamp=int(now - started) + ) + ) - return Response( - [o.serialize(format='prometheus') for o in output], + return Response(outputs, content_type='text/plain; version=0.0.4; charset=utf-8' )
feat: add uptime stat to prometheus metrics (#<I>)
alerta_alerta
train
py
6fa4e8157d7546b28fd6a18968cbec3be0bf5912
diff --git a/ibis/backends/tests/test_generic.py b/ibis/backends/tests/test_generic.py index <HASH>..<HASH> 100644 --- a/ibis/backends/tests/test_generic.py +++ b/ibis/backends/tests/test_generic.py @@ -621,6 +621,7 @@ def test_where_column(backend, alltypes, df): expected = pd.Series( np.where(df.int_col == 0, 42, -1), name="where_col", + dtype="int64", ) backend.assert_series_equal(result, expected)
test(windows): give int<I> dtype to series constructor
ibis-project_ibis
train
py
620c91076581f87f67471157446bfb3c43376f20
diff --git a/packages/core/botpress/tests/database_helpers.js b/packages/core/botpress/tests/database_helpers.js index <HASH>..<HASH> 100644 --- a/packages/core/botpress/tests/database_helpers.js +++ b/packages/core/botpress/tests/database_helpers.js @@ -53,6 +53,7 @@ run('helpers', () => { .then(inserted => { expect(inserted).to.not.equal(null) expect(inserted.tString).to.equal(tString) + expect(typeof inserted.tId).to.equal('number') }) }) })
chore(perf): add another test assertion
botpress_botpress
train
js
249f72735645f18bf02035ddfc5afde6ffd53d70
diff --git a/pyethereum/peermanager.py b/pyethereum/peermanager.py index <HASH>..<HASH> 100644 --- a/pyethereum/peermanager.py +++ b/pyethereum/peermanager.py @@ -199,7 +199,7 @@ def config_peermanager(sender, config, **kwargs): @receiver(signals.p2p_address_ready) -def p2p_address_ready_handler(sender, ip, port): +def p2p_address_ready_handler(sender, ip, port, **kwargs): peer_manager.set_local_address(ip, port)
fix: p2p_address_ready_handler signature
ethereum_pyethereum
train
py
a8f8a67d80badb0950f4168a452ac44f23540479
diff --git a/lib/features/interaction-events/InteractionEvents.js b/lib/features/interaction-events/InteractionEvents.js index <HASH>..<HASH> 100644 --- a/lib/features/interaction-events/InteractionEvents.js +++ b/lib/features/interaction-events/InteractionEvents.js @@ -75,7 +75,7 @@ function InteractionEvents(eventBus, elementRegistry) { contextmenu: 'element.contextmenu' }; - var elementSelector = 'td'; + var elementSelector = 'td,th'; ///// event registration
fix(interaction-events): also fire events on table headers related to CAM-<I>
bpmn-io_table-js
train
js
b2462ed13fdca73ae47bf19257703e6802997d96
diff --git a/webapps/client/scripts/tasklist/directives/cam-tasklist-tasks.js b/webapps/client/scripts/tasklist/directives/cam-tasklist-tasks.js index <HASH>..<HASH> 100644 --- a/webapps/client/scripts/tasklist/directives/cam-tasklist-tasks.js +++ b/webapps/client/scripts/tasklist/directives/cam-tasklist-tasks.js @@ -149,10 +149,23 @@ define([ } // wait for angular to update the classes and scroll to the newly selected task $timeout(function(){ - $($event.target).find('li.active')[0].scrollIntoView(false); + var $el = $($event.target).find('li.active')[0]; + if ($el) { + $el.scrollIntoView(false); + } }); }; + $scope.getHrefUrl = function (task) { + var href = '#/?task=' + task.id; + var detailsTab = $location.search().detailsTab; + if (detailsTab) { + href = href + '&detailsTab=' + detailsTab; + } + + return href; + }; + /** * invoked when pagination is changed */
chore(code): add lost code
camunda_camunda-bpm-platform
train
js
9f26938f4fc5861e8e92fe3e77c2787cfb5615ca
diff --git a/tests/__init__.py b/tests/__init__.py index <HASH>..<HASH> 100755 --- a/tests/__init__.py +++ b/tests/__init__.py @@ -114,6 +114,7 @@ class TestSacad(unittest.TestCase): self.assertLessEqual(out_height, size * (100 + size_tolerance) / 100) self.assertGreaterEqual(out_height, size * (100 - size_tolerance) / 100) + @unittest.skipIf(os.getenv("CI") is not None, "Test is not reliable on CI servers") def test_getImageUrlMetadata(self): """ Download the beginning of image files to guess their format and resolution. """ refs = {
fix(test): skip another test unreliable on CI
desbma_sacad
train
py
9b243a3d3bcbc9e3a9391c27ac753d284cf9d00a
diff --git a/tests/commands/test_bump_command.py b/tests/commands/test_bump_command.py index <HASH>..<HASH> 100644 --- a/tests/commands/test_bump_command.py +++ b/tests/commands/test_bump_command.py @@ -273,9 +273,19 @@ def test_bump_when_version_is_not_specify(mocker): @pytest.mark.usefixtures("tmp_commitizen_project") def test_bump_when_no_new_commit(mocker): + """bump without any commits since the last bump.""" + # We need this first commit otherwise the revision is invalid. + create_file_and_commit("feat: initial") + testargs = ["cz", "bump", "--yes"] mocker.patch.object(sys, "argv", testargs) + # First bump. + # The next bump should fail since + # there is not a commit between the two bumps. + cli.main() + + # bump without a new commit. with pytest.raises(NoCommitsFoundError) as excinfo: cli.main()
test(bump): fixes logic issue made evident by the latest fix(git) commit git was failing "fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree". There is no HEAD for get_commits until at least one commit is made.
Woile_commitizen
train
py
c48da9b5cf57f1d9e84a4cad7f392a81bf9ab2f8
diff --git a/public/app/features/dashboard/rowCtrl.js b/public/app/features/dashboard/rowCtrl.js index <HASH>..<HASH> 100644 --- a/public/app/features/dashboard/rowCtrl.js +++ b/public/app/features/dashboard/rowCtrl.js @@ -41,7 +41,6 @@ function (angular, _, config) { $scope.dashboard.addPanel(panel, $scope.row); }; - $scope.deleteRow = function() { function delete_row() { $scope.dashboard.rows = _.without($scope.dashboard.rows, $scope.row); diff --git a/public/test/specs/row-ctrl-specs.js b/public/test/specs/row-ctrl-specs.js index <HASH>..<HASH> 100644 --- a/public/test/specs/row-ctrl-specs.js +++ b/public/test/specs/row-ctrl-specs.js @@ -19,7 +19,7 @@ define([ ctx.scope.row = ctx.scope.dashboard.rows[0]; ctx.scope.appEvent = sinon.spy(); - ctx.scope.delete_row(); + ctx.scope.deleteRow(); }); it('should NOT ask for confirmation', function () {
fix(tests): fix broken unittest due to merge conflict
grafana_grafana
train
js,js
15a404e071aa8977bb5aa3a968405eea92326652
diff --git a/custom-rules/skip-comment.js b/custom-rules/skip-comment.js index <HASH>..<HASH> 100644 --- a/custom-rules/skip-comment.js +++ b/custom-rules/skip-comment.js @@ -55,7 +55,7 @@ e.g. const commentBefore = sourceCode.getCommentsBefore(node) const hasExplain = commentBefore && commentBefore.map( - (v) => commentTokens.map((commentToken) => v.value.trim().startsWith(commentToken)).filter(Boolean)[0] + (v) => commentTokens.concat(commentTokens.map((v) => `# ${v}`)).map((commentToken) => v.value.trim().startsWith(commentToken)).filter(Boolean)[0] ).filter(Boolean)[0] if (hasExplain) { diff --git a/test/fixtures/skip-comment-pass.js b/test/fixtures/skip-comment-pass.js index <HASH>..<HASH> 100644 --- a/test/fixtures/skip-comment-pass.js +++ b/test/fixtures/skip-comment-pass.js @@ -19,3 +19,7 @@ context.skip('some test', ()=>{ it.skip('some test', ()=>{ }) +//# TODO: im skipping this for good reason +it.skip('some test', ()=>{ + +})
fix(custom-rules): skip-comments allow "cypress-io/eslint-plugin-dev#" before comment for coffeescript (cypress-io/eslint-plugin-dev#<I>)
cypress-io_cypress
train
js,js
e27f4bfa8ba1c26a49504a008038a1c1ac034c6f
diff --git a/tests/Features/Methods/ModelExtension.php b/tests/Features/Methods/ModelExtension.php index <HASH>..<HASH> 100644 --- a/tests/Features/Methods/ModelExtension.php +++ b/tests/Features/Methods/ModelExtension.php @@ -141,6 +141,11 @@ class ModelExtension return User::updateOrCreate([]); } + public function testFirstOrCreate(): User + { + return User::firstOrCreate([]); + } + public function testScope() : Builder { return Thread::valid(); @@ -189,12 +194,12 @@ class Thread extends Model { return $query->where('valid', true); } - + public static function testFindOnStaticSelf() : ?Thread { return self::valid()->first(); } - + public static function testFindOnStatic() : ?Thread { return static::valid()->first();
fix: #<I> firstOrCreate is missing Close #<I> Add tests for firstOrCreate
nunomaduro_larastan
train
php
58ab8e81587f8d17e34234fe884066f3ec567d38
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -35,7 +35,8 @@ module.exports = function (path) { ");"; }); })(function (indexTestsData) { - var srcCode = ["// DO NOT EDIT: FILE GENERATED BY 'tape-index'", "", "\"use strict\";"]; + var srcCode = ["// DO NOT EDIT: FILE GENERATED BY 'tape-index'", "", "\"use strict\";", + "", "Error.stackTraceLimit = Infinity;", ""]; srcCode.push("", "var test = require(\"tape\");");
feat: ensure long error stack traces When test crashes with an error it's good to have full call stack information
medikoo_tape-index
train
js
abc0afd73033dbcb08fa4d9e19ad7f1841af84f8
diff --git a/src/Model/Common/AssetDraft.php b/src/Model/Common/AssetDraft.php index <HASH>..<HASH> 100644 --- a/src/Model/Common/AssetDraft.php +++ b/src/Model/Common/AssetDraft.php @@ -6,6 +6,7 @@ namespace Commercetools\Core\Model\Common; use Commercetools\Core\Model\CustomField\CustomFieldObject; +use Commercetools\Core\Model\CustomField\CustomFieldObjectDraft; /** * @package Commercetools\Core\Model\Common @@ -30,7 +31,7 @@ class AssetDraft extends JsonObject 'name' => [static::TYPE => LocalizedString::class], 'description' => [static::TYPE => LocalizedString::class], 'tags' => [static::TYPE => 'array'], - 'custom' => [static::TYPE => CustomFieldObject::class], + 'custom' => [static::TYPE => CustomFieldObjectDraft::class], ]; } }
fix(AssetDraft): correct type for custom field object BREAKING CHANGE: AssetDraft requires CustomFieldObjectDraft instead of CustomFieldObject Before: ``` $assetDraft = AssetDraft::of()->setCustom(CustomFieldObject::of()); ``` After: ``` $assetDraft = AssetDraft::of()->setCustom(CustomFieldObjectDraft::of()); ```
commercetools_commercetools-php-sdk
train
php
4c913e35d488c6fe21fba990ff973bde9b726ec7
diff --git a/lib/features/mouse-tracking/MouseTracking.js b/lib/features/mouse-tracking/MouseTracking.js index <HASH>..<HASH> 100644 --- a/lib/features/mouse-tracking/MouseTracking.js +++ b/lib/features/mouse-tracking/MouseTracking.js @@ -54,6 +54,6 @@ MouseTracking.prototype._setHoverElement = function(event) { MouseTracking.prototype._setMousePosition = function(event) { - this._mouseX = event.offsetX; - this._mouseY = event.offsetY; + this._mouseX = event.layerX; + this._mouseY = event.layerY; };
fix(mouse-tracking): use "layerX|Y" instead of "offsetX|Y" Closes #<I>
bpmn-io_diagram-js
train
js
f04dc7514750ca82cdd68dc54ceddc32b14c11d9
diff --git a/scripts/build-package.js b/scripts/build-package.js index <HASH>..<HASH> 100644 --- a/scripts/build-package.js +++ b/scripts/build-package.js @@ -143,7 +143,7 @@ function run() { if (watchMode) { const runWatchMode = () => { - const baseWatchCommand = `lerna exec --scope "${glob}" -- cross-env-shell node ${resolve( + const baseWatchCommand = `lerna exec --scope "${glob}" --parallel -- cross-env-shell node ${resolve( __dirname )}`; const watchTsc = `${baseWatchCommand}/watch-tsc.js`;
chore(build-package): run processes in parallel
storybooks_storybook
train
js
383673b770f1334ace0b9e7ee00ab8b4482cb1e5
diff --git a/packages/components/bolt-video/plugins/cue-points.js b/packages/components/bolt-video/plugins/cue-points.js index <HASH>..<HASH> 100644 --- a/packages/components/bolt-video/plugins/cue-points.js +++ b/packages/components/bolt-video/plugins/cue-points.js @@ -6,7 +6,7 @@ import { getSubArray } from '../utils'; export const VideoOverlayContent = props => { return ( - <bolt-button color="primary" url={props.url}> + <bolt-button color="primary" url={props.url} target={props.target}> {props.text} </bolt-button> ); @@ -110,7 +110,12 @@ export function cuePointsPlugin(player, elem) { } ReactDOM.render( - <VideoOverlayContent url={ctaUrl} text={ctaText} />, + <VideoOverlayContent + url={ctaUrl} + text={ctaText} + onClick={elem.pause()} + target="_blank" + />, elem.overlayElement, ); }
feat: auto-pause the video + open in a new tab when interacting with cue point ctas
bolt-design-system_bolt
train
js
fff8adb5260099518c8e29fa0e122c1339c42c72
diff --git a/lib/scripts/writer.js b/lib/scripts/writer.js index <HASH>..<HASH> 100644 --- a/lib/scripts/writer.js +++ b/lib/scripts/writer.js @@ -9,6 +9,7 @@ var fs = require('fs'); var path = require('path'); var qio = require('q-io/fs'); + exports.output = output; function output(file, content) { var fullPath = OUTPUT_DIR + file; @@ -109,7 +110,7 @@ exports.copyDir = function(dir, dest) { } else { return qfs.exists(dest).then(function(exists) { if(exists){ - qio.removeTree(dest).then(function() { + return qio.removeTree(dest).then(function() { return qio.copyTree(dir, dest); }); }else{
fix(writer): synchronisation problem removing folder
Vertafore_docular
train
js
5ac40c7d3afc55835978856daa624b024ed57a44
diff --git a/rundeckapp/grails-app/assets/javascripts/resourceModelConfig.js b/rundeckapp/grails-app/assets/javascripts/resourceModelConfig.js index <HASH>..<HASH> 100644 --- a/rundeckapp/grails-app/assets/javascripts/resourceModelConfig.js +++ b/rundeckapp/grails-app/assets/javascripts/resourceModelConfig.js @@ -246,7 +246,7 @@ pageInit:function () { //load widgets for any in-page configs // widgets must be indexed from 1. PasswordFieldsService depends on this ordering. var n = 0; - $('configs').select('li div.inpageconfig').each(function(e) { + jQuery('#configs').find('li div.inpageconfig').each(function(ndx,e) { n++; self.addConfigChrome(e, null, '${prefixKey}.' + n + '.', n, true); });
fix: broken js when #configs id is not present
rundeck_rundeck
train
js
64c0ee21fc9883b727c05d35a2aed83f76a232aa
diff --git a/src/Database/Barry/Model.php b/src/Database/Barry/Model.php index <HASH>..<HASH> 100644 --- a/src/Database/Barry/Model.php +++ b/src/Database/Barry/Model.php @@ -682,7 +682,15 @@ abstract class Model implements \ArrayAccess, \JsonSerializable */ public function jsonSerialize() { - return $this->attributes; + $data = []; + + foreach ($this->attributes as $key => $value) { + if (!in_array($key, $this->hidden)) { + $data[$key] = $value; + } + } + + return $data; } /**
fix: hidden value where json called
bowphp_framework
train
php
e7f0bc4ee17001e5e692abbf824d5d420a5ad47f
diff --git a/index.ios.js b/index.ios.js index <HASH>..<HASH> 100644 --- a/index.ios.js +++ b/index.ios.js @@ -51,9 +51,18 @@ class ApiAi { SpeechToText.finishRecognition(); } - requestQuery(query: String, onResult: ()=>{}, onError: ()=>{}) { - this.client.textRequest(query).then(res=>onResult(res)).catch(err=>onError(err)); - } + setContexts(contexts) { + this.contexts = contexts; + } + + requestQuery(query: String, onResult: ()=>{}, onError: ()=>{}) { + if (this.contexts) { + this.client.textRequest(query, {contexts: this.contexts}).then(res=>onResult(res)).catch(err=>onError(err)); + this.contexts = null; + } else { + this.client.textRequest(query).then(res=>onResult(res)).catch(err=>onError(err)); + } + } onAudioLevel(callback) {
feat: add contexts functionality for ios
innFactory_react-native-dialogflow
train
js
e80c6f6b2505be51b5db732ae95f1ea5509f5b29
diff --git a/packages/build/webpack/index.js b/packages/build/webpack/index.js index <HASH>..<HASH> 100644 --- a/packages/build/webpack/index.js +++ b/packages/build/webpack/index.js @@ -26,7 +26,7 @@ const validateRules = (config, options) => ) } else if (!options.defaultInclude) { error( - `module.rule {$rules.test} is missing an "include" property and no "defaultInclude" options has been given to #decorateConfig. Please implement one or the other avoid rule clashes with the design system. See https://webpack.js.org/configuration/module/#rule-include` + `module.rule ${rules.test} is missing an "include" property and no "defaultInclude" options has been given to #decorateConfig. Please implement one or the other avoid rule clashes with the design system. See https://webpack.js.org/configuration/module/#rule-include` ) } }
fix(build): webpack validation typo
pluralsight_design-system
train
js
2d6c38db83a95f6c2b2c4fe50aebad2811d159c9
diff --git a/setup.py b/setup.py index <HASH>..<HASH> 100644 --- a/setup.py +++ b/setup.py @@ -26,7 +26,7 @@ setup( url = "https://github.com/neherlab/treetime", packages=['treetime'], install_requires = [ - 'biopython>=1.66,<=1.76', + 'biopython>=1.67,!=1.77,!=1.78', 'numpy>=1.10.4', 'pandas>=0.17.1', 'scipy>=0.16.1'
chore: relax version constraint of BioPython since bug is fixed in <I>
neherlab_treetime
train
py
85840ce6d069255364678dfb2fa9bceba178e00b
diff --git a/dev/test/helpers/mailhog.js b/dev/test/helpers/mailhog.js index <HASH>..<HASH> 100644 --- a/dev/test/helpers/mailhog.js +++ b/dev/test/helpers/mailhog.js @@ -8,7 +8,11 @@ const getMails = async () => { const getSentAddresses = async () => { const { data: emails } = await getMails(); - return emails.map(email => email.Raw.To[0].split('<')[1]); + return emails.map(email => { + const rawEmailTo = email.Raw.To[0]; + console.log('getSentAddresses -> rawEmailTo', rawEmailTo); + return email.Raw.To[0].split('<')[1]; + }); }; const clearMails = async () => {
test(mailhog-helper): log email to field CDPIP-OPS
emartech_magento2-extension
train
js
a40c8e325d82165a9b4c9195f79e8feec010322c
diff --git a/wct.conf.js b/wct.conf.js index <HASH>..<HASH> 100644 --- a/wct.conf.js +++ b/wct.conf.js @@ -57,8 +57,8 @@ module.exports = { //}, { "browserName": "safari", - "platform": "OS X 10.9", - "version": "7" + "platform": "OS X 10.11", + "version": "9" } ] }
test(travis): test on more recent version of Safari
rnicholus_ajax-form
train
js
194103964430970163c6939c15b717360b634e41
diff --git a/icons/fontawesome.js b/icons/fontawesome.js index <HASH>..<HASH> 100644 --- a/icons/fontawesome.js +++ b/icons/fontawesome.js @@ -48,6 +48,9 @@ export default { chip: { close: 'far fa-times-circle' }, + chipsInput: { + add: 'far fa-paper-plane' + }, collapsible: { icon: 'fas fa-chevron-down' }, diff --git a/icons/mdi.js b/icons/mdi.js index <HASH>..<HASH> 100644 --- a/icons/mdi.js +++ b/icons/mdi.js @@ -48,6 +48,9 @@ export default { chip: { close: 'mdi-close-circle' }, + chipsInput: { + add: 'mdi-send' + }, collapsible: { icon: 'mdi-chevron-down' },
feat: Add QChipsInput add icons for the rest of the icon sets
quasarframework_quasar
train
js,js
52d088a442c24c3fd5d151e24d0bb7bcb9ae41d3
diff --git a/src/anyconfig/backend/xml.py b/src/anyconfig/backend/xml.py index <HASH>..<HASH> 100644 --- a/src/anyconfig/backend/xml.py +++ b/src/anyconfig/backend/xml.py @@ -65,9 +65,10 @@ import re try: import xml.etree.cElementTree as ET except ImportError: - import xml.etree.ElementTree as ET -except ImportError: - import elementtree.ElementTree as ET + try: + import xml.etree.ElementTree as ET + except ImportError: + import elementtree.ElementTree as ET import anyconfig.backend.base import anyconfig.compat
fix: catch cases if neigther xml.etree.{c,}ElementTree were missing correctly
ssato_python-anyconfig
train
py
91a00c5a1efb216accb4b0f69222608a68a789dc
diff --git a/src/components/ImportRecordsFlow/index.js b/src/components/ImportRecordsFlow/index.js index <HASH>..<HASH> 100644 --- a/src/components/ImportRecordsFlow/index.js +++ b/src/components/ImportRecordsFlow/index.js @@ -63,13 +63,13 @@ function ImportRecordsFlow(props) { const prevIsOpen = useRef(isOpen); useEffect(() => { if (prevIsOpen.current && !isOpen) { - setCurrentStepIndex(0); + setCurrentStepIndex(actionType === ADD_RECORDS_TYPE ? 1 : 0); removeFile(); setActionOption(''); setMatchField('default'); } prevIsOpen.current = isOpen; - }, [isOpen]); + }, [isOpen, actionType]); const getModalTitle = () => { if (currentStepIndex === 1 && hasFileSelected) {
fix: wrong behavior when open the ImportRecordFlow component twice (#<I>) fix: #<I>
90milesbridge_react-rainbow
train
js
2c82e485c0b32d02ab410a026396a6656ce7f0bd
diff --git a/packages/core/src/plugins/input/graph.js b/packages/core/src/plugins/input/graph.js index <HASH>..<HASH> 100644 --- a/packages/core/src/plugins/input/graph.js +++ b/packages/core/src/plugins/input/graph.js @@ -10,15 +10,14 @@ * @return {CSL} entry */ export const applyGraph = (entry, graph) => { - const isArrayElse = ({type}) => type === '@else/list+object' - - if (!Array.isArray(entry._graph)) { - entry._graph = graph - } else if (graph.find(isArrayElse)) { - graph.splice(graph.findIndex(isArrayElse), 1, ...entry._graph.slice(0, -1)) - entry._graph = graph + if (entry._graph) { + const index = graph.findIndex(({type}) => type === '@else/list+object') + if (index !== -1) { + graph.splice(index + 1, 0, ...entry._graph.slice(0, -1)) + } } + entry._graph = graph return entry }
feat(core): include complete graph Include @else/list+object entry in graphs. Fix larsgw/citation.js#<I>
citation-js_citation-js
train
js
6196977cc57012825c40e3a0fb4a0c4012fb1692
diff --git a/hooks/before_prepare/icon.js b/hooks/before_prepare/icon.js index <HASH>..<HASH> 100644 --- a/hooks/before_prepare/icon.js +++ b/hooks/before_prepare/icon.js @@ -138,12 +138,12 @@ function generate(done) { // Default, the icon is a PNG image var source = path.join(__dirname, '../../res/icon.png'); - + if(!fs.existsSync(source)) { // If the PNG image does not exist, it means it is an SVG image - source = path.join(__dirname, '../../res/icon.svg');; + source = path.join(__dirname, '../../res/icon.svg'); } - + async.each(platform.icons, function(icon, next) { var dest = path.join(root, icon.file); @@ -151,7 +151,15 @@ function generate(done) { mkdirp.sync(path.dirname(dest)); } - gm(source).density(icon.dimension, icon.dimension).write(dest, next); + gm(source).density(icon.dimension, icon.dimension).write(dest, function(err){ + if(!err){ + next(); + } + else { + throw err; + } + }); + }, function(err) { if(err) { return done(err);
fix(gm): fix a case where user wouldn't be notified of a gm crash
SamVerschueren_gulp-cordova-icon
train
js
b18a76adc2e98ec31724476335cb1bf8146f5a0d
diff --git a/src/reducers/appbaseQueryReducer.js b/src/reducers/appbaseQueryReducer.js index <HASH>..<HASH> 100644 --- a/src/reducers/appbaseQueryReducer.js +++ b/src/reducers/appbaseQueryReducer.js @@ -2,7 +2,7 @@ import { SET_APPBASE_QUERY } from '../constants'; export default function appbaseQueryReducer(state = {}, action) { if (action.type === SET_APPBASE_QUERY) { - return { ...state, ...(action.query || []) }; + return [...(action.query || [])]; } return state; }
fix: store lastUsedAppbaseQuery as array
appbaseio_reactivecore
train
js
c4e12dc846ca04c03cab9de69c828b1351631cfc
diff --git a/cmd/bucket-handlers.go b/cmd/bucket-handlers.go index <HASH>..<HASH> 100644 --- a/cmd/bucket-handlers.go +++ b/cmd/bucket-handlers.go @@ -427,6 +427,12 @@ func (api objectAPIHandlers) DeleteMultipleObjectsHandler(w http.ResponseWriter, deleteObjectsFn = api.CacheAPI().DeleteObjects } + // Return Malformed XML as S3 spec if the list of objects is empty + if len(deleteObjects.Objects) == 0 { + writeErrorResponse(ctx, w, errorCodes.ToAPIErr(ErrMalformedXML), r.URL, guessIsBrowserReq(r)) + return + } + var objectsToDelete = map[ObjectToDelete]int{} getObjectInfoFn := objectAPI.GetObjectInfo if api.CacheAPI() != nil {
fix: in MultiDelete API return MalformedXML upon empty input (#<I>) To follow S3 spec
minio_minio
train
go
64719cdd31d6c0f2e724abd02760bdc894bc53d5
diff --git a/src/types/index.js b/src/types/index.js index <HASH>..<HASH> 100644 --- a/src/types/index.js +++ b/src/types/index.js @@ -23,7 +23,7 @@ supportedKeyTypes.define([ algParameters: '0500', version: 'two-prime', } -], 'RSA', RSA) +], RSA) // ECDSA supportedKeyTypes.define([ @@ -63,11 +63,11 @@ supportedKeyTypes.define([ // keyVersion: 1, // infoVersion: 'two-prime', // }, -], 'EC', ECDSA) +], ECDSA) // EDDSA supportedKeyTypes.define([ -], 'ED', EDDSA) +], EDDSA) /** * Export
refactor(algorithms): move kty param into params objects
EternalDeiwos_keyto
train
js
225abd596c07a09098eb1014be11301d48665309
diff --git a/lib/hexo/index.js b/lib/hexo/index.js index <HASH>..<HASH> 100644 --- a/lib/hexo/index.js +++ b/lib/hexo/index.js @@ -367,7 +367,7 @@ class Hexo extends EventEmitter { this.path = path; this.url = full_url_for.call(ctx, path); this.config = config; - this.theme = deepMerge(config, theme.config); + this.theme = theme.config; this._ = _; this.layout = 'layout'; this.env = env;
refactor: remove site config from theme config (#<I>)
hexojs_hexo
train
js
80d2dcccbc4b54bd300f516c490d553af917a918
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -17,7 +17,7 @@ module.exports = function(app, { mountPath = '/sdk' }) { try { const requestOptions = req.query.options ? JSON.parse(req.query.options) : {}; - const sdkOptions = Object.assign({}, requestOptions, sdkDefaultOptions); + const sdkOptions = Object.assign({}, sdkDefaultOptions, requestOptions); const script = generator.services(app, sdkOptions); const minifiedScript = compressor.minify(script);
fix(options): fixes the options and their default assignment
joinbox_loopback-component-angular-sdk
train
js
da69bfe88e5503dd6576bcb61b06396fa3bcc9fe
diff --git a/testbed/www/js/index.js b/testbed/www/js/index.js index <HASH>..<HASH> 100644 --- a/testbed/www/js/index.js +++ b/testbed/www/js/index.js @@ -233,9 +233,7 @@ function BranchDeepLink () { $match_duration: 2000, custom_string: 'data', custom_integer: Date.now(), - custom_boolean: true, - custom_array: [1, 2, 3, 4, 5], - custom_object: { 'random': 'dictionary' } + custom_boolean: true } // needs a universal object
fix: removed custom dictionary from testbed example
BranchMetrics_cordova-ionic-phonegap-branch-deep-linking
train
js
c277cee4748cfa8f0c6499ccef9e8f2456c05d1c
diff --git a/packages/api-headless-cms/__tests__/createDataModel.test.js b/packages/api-headless-cms/__tests__/createDataModel.test.js index <HASH>..<HASH> 100644 --- a/packages/api-headless-cms/__tests__/createDataModel.test.js +++ b/packages/api-headless-cms/__tests__/createDataModel.test.js @@ -33,7 +33,7 @@ describe(`createDataModel`, () => { for (let i = 0; i < models.length; i++) { const model = models[i]; context.models[model.modelId] = createDataModel( - context.createEnvironmentBase, + context.models.createEnvironmentBase, model, context ); diff --git a/packages/api-headless-cms/__tests__/modelFields.test.js b/packages/api-headless-cms/__tests__/modelFields.test.js index <HASH>..<HASH> 100644 --- a/packages/api-headless-cms/__tests__/modelFields.test.js +++ b/packages/api-headless-cms/__tests__/modelFields.test.js @@ -32,7 +32,7 @@ describe("Model fields", () => { .byType("cms-model-field-to-commodo-field") .find(pl => pl.fieldType === "datetime"); - const model = context.createEnvironmentBase(); + const model = context.models.createEnvironmentBase(); datetime.dataModel({ model,
test: use "context.models.createEnvironmentBase" instead of "context.createEnvironmentBase"
Webiny_webiny-js
train
js,js
a5ac249b954e3014788eec8094c85e4d264138e0
diff --git a/lib/datasource/docker/index.js b/lib/datasource/docker/index.js index <HASH>..<HASH> 100644 --- a/lib/datasource/docker/index.js +++ b/lib/datasource/docker/index.js @@ -419,6 +419,9 @@ async function getLabels(registry, repository, tag) { await renovateCache.set(cacheNamespace, cacheKey, labels, cacheMinutes); return labels; } catch (err) { + if (err.message === 'registry-failure') { + throw err; + } if (err.statusCode === 401) { logger.info( { registry, dockerRepository: repository },
fix(docker): pass registry-failure up
renovatebot_renovate
train
js
a97931c58d04789a79b85b90cb67d2567c2f8506
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 @@ -394,7 +394,7 @@ define('composer', [ if (draft && draft.title) { titleEl.val(draft.title); } - bodyEl.val(draft ? draft.text : postData.body); + bodyEl.val(draft.text ? draft.text : postData.body); if (app.user.uid > 0) { drafts.init(postContainer, postData); }
fix: #<I>, issue with editing posts due to new draft behaviour
NodeBB_nodebb-plugin-composer-default
train
js
2630a949f7993388b3cfe6305a3ba8c0eff03068
diff --git a/agent/consul/session_endpoint.go b/agent/consul/session_endpoint.go index <HASH>..<HASH> 100644 --- a/agent/consul/session_endpoint.go +++ b/agent/consul/session_endpoint.go @@ -58,7 +58,7 @@ func (s *Session) Apply(args *structs.SessionRequest, reply *string) error { return fmt.Errorf("Session lookup failed: %v", err) } if existing == nil { - return fmt.Errorf("Unknown session %q", args.Session.ID) + return nil } if authz.SessionWrite(existing.Node, &authzContext) != acl.Allow { return acl.ErrPermissionDenied
fix: Destroying a session that doesn't exist returns status cod… (#<I>) fix #<I>
hashicorp_consul
train
go
0611843dc95e6eb77c33dfeb0ca64a072b90f5fc
diff --git a/src/Noherczeg/Breadcrumb/BreadcrumbServiceProvider.php b/src/Noherczeg/Breadcrumb/BreadcrumbServiceProvider.php index <HASH>..<HASH> 100644 --- a/src/Noherczeg/Breadcrumb/BreadcrumbServiceProvider.php +++ b/src/Noherczeg/Breadcrumb/BreadcrumbServiceProvider.php @@ -8,23 +8,32 @@ * */ -use Illuminate\Support\ServiceProvider; +use \Illuminate\Support\ServiceProvider; class BreadcrumbServiceProvider extends ServiceProvider { + /** + * Boot up the service. + * + * @return void + */ + public function boot() + { + // load configs + $this->app['config']->package('noherczeg/breadcrumb', realpath(__DIR__.'/../config'), 'breadcrumb'); + } - /** - * Register the service provider. - * - * @return void - */ - public function register() - { - $this->app['breadcrumb'] = $this->app->share(function($app) - { - $request = new \Illuminate\Http\Request(); - return new Breadcrumb($request->root()); - }); - } + /** + * Register the service provider. + * + * @return void + */ + public function register() + { + $this->app['breadcrumb'] = $this->app->share(function($app) + { + return new Breadcrumb($this->app['request']->root()); + }); + } }
fix: ServiceProvider for Laravel 4
noherczeg_breadcrumb
train
php
4de18315b909eb89e38c5539b8c157e2f7f883e0
diff --git a/tests/system/Commands/CreateDatabaseTest.php b/tests/system/Commands/CreateDatabaseTest.php index <HASH>..<HASH> 100644 --- a/tests/system/Commands/CreateDatabaseTest.php +++ b/tests/system/Commands/CreateDatabaseTest.php @@ -38,22 +38,17 @@ final class CreateDatabaseTest extends CIUnitTestCase $this->connection = Database::connect(); parent::setUp(); + + $file = WRITEPATH . 'foobar.db'; + if (file_exists($file)) { + unlink($file); + } } protected function tearDown(): void { stream_filter_remove($this->streamFilter); - if ($this->connection instanceof Connection) { - $file = WRITEPATH . 'foobar.db'; - - if (file_exists($file)) { - unlink($file); - } - } else { - Database::forge()->dropDatabase('foobar'); - } - parent::tearDown(); }
test: fix failed test 1) CodeIgniter\Commands\CreateDatabaseTest::testCreateDatabase Failed asserting that 'Database ".../CodeIgniter4/writable/foobar.db" already exists.\n \n ' contains "successfully created.". .../CodeIgniter4/tests/system/Commands/CreateDatabaseTest.php:<I>
codeigniter4_CodeIgniter4
train
php
c507b37dd04cf267a437a579fc3b14063abb2ef8
diff --git a/index.js b/index.js index <HASH>..<HASH> 100644 --- a/index.js +++ b/index.js @@ -159,7 +159,7 @@ function wrapMatcher(matcher, actualPromise, not) { actualPromise.then(function(actual) { var expected = originalArgs[0]; - var expectation = expect(actual); + var expectation = originalExpect(actual); if (not) { expectation = expectation.not; }
fix(index): stop infinite promise resolution
angular_jasminewd
train
js
e424f864bdf3e5a3792c445a560771197b055cfb
diff --git a/build/module-opentest-actor/index.js b/build/module-opentest-actor/index.js index <HASH>..<HASH> 100644 --- a/build/module-opentest-actor/index.js +++ b/build/module-opentest-actor/index.js @@ -16,7 +16,7 @@ function start(options) { const opentestJarsPath = path.join(__dirname, 'jars', '*').replace(/\\/g, '/'); const actorJarsPath = path.join(workDir, 'user-jars', '*').replace(/\\/g, '/'); - const classPath = `${opentestJarsPath}${path.delimiter}${actorJarsPath}`; + const classPath = `${actorJarsPath}${path.delimiter}${opentestJarsPath}`; options.args = options.args || [];
feat(actor): load user jars before core ones
mcdcorp_opentest
train
js
d7d2e992759e7c118f9b84ec7f0efd84956e1871
diff --git a/lib/client/client.js b/lib/client/client.js index <HASH>..<HASH> 100644 --- a/lib/client/client.js +++ b/lib/client/client.js @@ -1150,7 +1150,7 @@ Client.prototype._sendSocket = function _sendSocket (message, var sentEmitter = false function sendResult (event, obj) { - if (event === 'error' && self.listeners('resultError')) { + if (event === 'error') { self.emit('resultError', obj) } if (emitter) {
refactor: resultError always emitted on error
joyent_node-ldapjs
train
js
84e5b075b4214c5432e380840c90091643af07fa
diff --git a/src/client/websocket/handlers/INTERACTION_CREATE.js b/src/client/websocket/handlers/INTERACTION_CREATE.js index <HASH>..<HASH> 100644 --- a/src/client/websocket/handlers/INTERACTION_CREATE.js +++ b/src/client/websocket/handlers/INTERACTION_CREATE.js @@ -1,22 +1,18 @@ 'use strict'; const { Events, InteractionTypes } = require('../../../util/Constants'); -let Structures; +const Structures = require('../../../util/Structures'); module.exports = (client, { d: data }) => { let interaction; switch (data.type) { case InteractionTypes.APPLICATION_COMMAND: { - if (!Structures) Structures = require('../../../util/Structures'); const CommandInteraction = Structures.get('CommandInteraction'); - interaction = new CommandInteraction(client, data); break; } case InteractionTypes.MESSAGE_COMPONENT: { - if (!Structures) Structures = require('../../../util/Structures'); const MessageComponentInteraction = Structures.get('MessageComponentInteraction'); - interaction = new MessageComponentInteraction(client, data); break; }
refactor(Interactions): move Structures import out of switch block (#<I>)
discordjs_discord.js
train
js
8ef52ea521e0e06d95fa5079931fbba96627cbb0
diff --git a/generators/gae/index.js b/generators/gae/index.js index <HASH>..<HASH> 100644 --- a/generators/gae/index.js +++ b/generators/gae/index.js @@ -772,10 +772,8 @@ module.exports = class extends BaseGenerator { if (this.abort) return; if (this.buildTool === 'maven') { - this.log(chalk.bold('\nRun App Engine DevServer Locally: ./mvnw package appengine:run -DskipTests')); this.log(chalk.bold('Deploy to App Engine: ./mvnw package appengine:deploy -DskipTests -Pgae,prod,prod-gae')); } else if (this.buildTool === 'gradle') { - this.log(chalk.bold('\nRun App Engine DevServer Locally: ./gradlew appengineRun')); this.log(chalk.bold('Deploy to App Engine: ./gradlew appengineDeploy -Pgae -Pprod-gae')); } /*
refactor: remove log for printing appengineRun and appengine:run goals This removes the log that prints appengine:run goal for maven and appengineRun goal for gradle. These goals are not available for app.yaml based projects. References: <URL>
jhipster_generator-jhipster
train
js
49adb621a96f11b9898c704bc7c999faa1dff951
diff --git a/lib/init.js b/lib/init.js index <HASH>..<HASH> 100644 --- a/lib/init.js +++ b/lib/init.js @@ -121,7 +121,7 @@ module.exports = function(req, res, next) { socket[config.CLIENT_PORT_HEAD] = clientPort || socket.remotePort; } req.clientPort = clientPort = clientPort || socket[config.CLIENT_PORT_HEAD]; - if (req.headers[config.HTTPS_FIELD] || req.headers[config.HTTPS_PROTO_HEADER] === 'https' || req.socket.isHttps) { + if (req.socket.isHttps || req.headers[config.HTTPS_FIELD] || req.headers[config.HTTPS_PROTO_HEADER] === 'https') { req.isHttps = true; delete req.headers[config.HTTPS_FIELD]; }
feat: support x-forwarded-proto header
avwo_whistle
train
js
3e7dec6ea5afb5d6975effa8f5b5af942cc02601
diff --git a/src/Keboola/GoodData/Datasets.php b/src/Keboola/GoodData/Datasets.php index <HASH>..<HASH> 100644 --- a/src/Keboola/GoodData/Datasets.php +++ b/src/Keboola/GoodData/Datasets.php @@ -211,9 +211,7 @@ class Datasets $manifest['dataSetSLIManifest']['parts'][] = [ 'columnName' => $columnName, 'populates' => [ - sprintf('%s.date.mmddyyyy', $column['identifier'] - . (!empty($column['template'] && strtolower($column['template']) != 'gooddata') - ? '.' . strtolower($column['template']) : null)) + "{$column['identifier']}.date.mmddyyyy" ], 'constraints' => [ 'date' => (string)$column['format']
fix: bug in templated dimension identifier in load manifest
keboola_gooddata-php-client
train
php