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 |
---|---|---|---|---|---|
dd0c53158f1be446c9be3c9d5996af1a22dec69b
|
diff --git a/superset/cli.py b/superset/cli.py
index <HASH>..<HASH> 100755
--- a/superset/cli.py
+++ b/superset/cli.py
@@ -46,7 +46,12 @@ feature_flags.update(config.FEATURE_FLAGS)
feature_flags_func = config.GET_FEATURE_FLAGS_FUNC
if feature_flags_func:
# pylint: disable=not-callable
- feature_flags = feature_flags_func(feature_flags)
+ try:
+ feature_flags = feature_flags_func(feature_flags)
+ except Exception: # pylint: disable=broad-except
+ # bypass any feature flags that depend on context
+ # that's not available
+ pass
def normalize_token(token_name: str) -> str:
|
fix: handle context-dependent feature flags in CLI (#<I>)
|
apache_incubator-superset
|
train
|
py
|
26ad025705cb0be7ab7ac0429b53f07bb2b3b6fc
|
diff --git a/pkg/metrics/publish.go b/pkg/metrics/publish.go
index <HASH>..<HASH> 100644
--- a/pkg/metrics/publish.go
+++ b/pkg/metrics/publish.go
@@ -4,6 +4,7 @@ import (
"bytes"
"encoding/json"
"net/http"
+ "runtime"
"strings"
"time"
@@ -86,6 +87,8 @@ func sendUsageStats() {
report := map[string]interface{}{
"version": version,
"metrics": metrics,
+ "os": runtime.GOOS,
+ "arch": runtime.GOARCH,
}
statsQuery := m.GetSystemStatsQuery{}
|
feat: added os to stats
|
grafana_grafana
|
train
|
go
|
cfe81dbf97b39b6fd649b098036164a27b56b46e
|
diff --git a/cts/index/settings_test.go b/cts/index/settings_test.go
index <HASH>..<HASH> 100644
--- a/cts/index/settings_test.go
+++ b/cts/index/settings_test.go
@@ -73,6 +73,7 @@ func TestSettings(t *testing.T) {
ResponseFields: opt.ResponseFields("hits", "hitsPerPage"),
MaxFacetHits: opt.MaxFacetHits(100),
IndexLanguages: opt.IndexLanguages("ja"),
+ UserData: opt.UserData(map[string]interface{}{"customUserData": 42.0}),
}
{
|
test: set Settings.UserData field in Settings integration test
|
algolia_algoliasearch-client-go
|
train
|
go
|
fc2ab98cd2678c5b725733f6294acefeaa0c4cc8
|
diff --git a/lib/superapi/api.js b/lib/superapi/api.js
index <HASH>..<HASH> 100644
--- a/lib/superapi/api.js
+++ b/lib/superapi/api.js
@@ -4,14 +4,20 @@ function Api(config) {
this.config = config;
var self = this;
+ // closure
+ var serviceHandler = function (service) {
+ return function (data, fn) {
+ var req = self.request(service, data).end(fn ? fn : function (res) {
+ req.emit(res.ok ? "success" : "error", res);
+ });
+ return req;
+ };
+ };
for (var name in config.services) {
if (!this.hasOwnProperty(name)) {
- this[name] = function (data, fn) {
- var req = self.request(name, data).end(fn ? fn : function (res) {
- req.emit(res.ok ? "success" : "error", res);
- });
- return req;
- };
+ // syntatic sugar: install a service handler available on
+ // the api instance with service name
+ self[name] = serviceHandler(name);
}
}
}
|
fix(api): service handlers are now set in a closure
before closure the *name* variable was the same for each callback. Doh!
|
stephanebachelier_superapi
|
train
|
js
|
667b34c6f41e5dd499c9d74517a19ccdc07f0176
|
diff --git a/test/functional/client_side_encryption/prose.test.js b/test/functional/client_side_encryption/prose.test.js
index <HASH>..<HASH> 100644
--- a/test/functional/client_side_encryption/prose.test.js
+++ b/test/functional/client_side_encryption/prose.test.js
@@ -288,7 +288,7 @@ describe('Client Side Encryption Prose Tests', function() {
algorithm: 'AEAD_AES_256_CBC_HMAC_SHA_512-Deterministic'
})
)
- .then(encrypted => {
+ .then(encrypted =>
this.clientEncrypted
.db(dataDbName)
.collection(dataCollName)
@@ -300,8 +300,8 @@ describe('Client Side Encryption Prose Tests', function() {
err => {
expect(err).to.be.an.instanceOf(Error);
}
- );
- });
+ )
+ );
});
});
|
test: fix failure to return promise in CSFLE prose test
|
mongodb_node-mongodb-native
|
train
|
js
|
aea85aaef62c144d19947f7d4c86e425074a0f26
|
diff --git a/src/http/api/routes/webui.js b/src/http/api/routes/webui.js
index <HASH>..<HASH> 100644
--- a/src/http/api/routes/webui.js
+++ b/src/http/api/routes/webui.js
@@ -20,7 +20,7 @@ module.exports = (server) => {
method: '*',
path: '/webui',
handler: (request, reply) => {
- return reply().redirect().location('/ipfs/QmQLXHs7K98JNQdWrBB2cQLJahPhmupbDjRuH1b9ibmwVa')
+ return reply().redirect().location('/ipfs/QmcXvo6op67G5uC9p1wWoeRY92cPxb5bDxWF8DzYhoYhHY')
}
}
])
|
feat: update to Web UI <I> (#<I>)
License: MIT
|
ipfs_js-ipfs
|
train
|
js
|
2f6e90d748c2d28f7531303b953c40471e12b32d
|
diff --git a/src/blockchain.js b/src/blockchain.js
index <HASH>..<HASH> 100644
--- a/src/blockchain.js
+++ b/src/blockchain.js
@@ -85,6 +85,9 @@ Blockchain.connect = function(connectionList, opts, doneCb) {
if(opts.blockchainClient === 'geth') {
console.warn("%cNote: There is a known issue with Geth that may cause transactions to get stuck when using Metamask. Please log in to the cockpit (http://localhost:8000/embark?enableRegularTxs=true) to enable a workaround. Once logged in, the workaround will automatically be enabled.", "font-size: 2em");
}
+ if(opts.blockchainClient === 'parity') {
+ console.warn("%cNote: Parity blocks the connection from browser extensions like Metamask. To resolve this problem, go to https://embark.status.im/docs/blockchain_configuration.html#Using-Parity-and-Metamask", "font-size: 2em");
+ }
console.warn("%cNote: Embark has detected you are in the development environment and using Metamask, please make sure Metamask is connected to your local node", "font-size: 2em");
}
if (accounts) {
|
fix(blockchain): add warning when using Parity and Metamask
|
embark-framework_EmbarkJS
|
train
|
js
|
497934bee15a25cd309ba3bce4ef3b73f94da513
|
diff --git a/src/Calendar/Calendar.js b/src/Calendar/Calendar.js
index <HASH>..<HASH> 100644
--- a/src/Calendar/Calendar.js
+++ b/src/Calendar/Calendar.js
@@ -192,6 +192,7 @@ export default class Calendar extends Component {
document.activeElement.classList.add(`pe-cal-selected${selectInverse}`);
document.activeElement.setAttribute('aria-selected', true);
this.setState({
+ selectedMonth: this.state.month,
selectedDate: parseInt(document.activeElement.innerText),
selectedDt: new Date(new Date().getFullYear(), new Date().getMonth(), parseInt(document.activeElement.innerText)),
selectedElement: document.activeElement
|
chore: update selectedMonth in state on enter
|
Pearson-Higher-Ed_compounds
|
train
|
js
|
9ea7d95bb6d86bd1dabbe7ab2c20fa11826da1c1
|
diff --git a/lib/core/connection/pool.js b/lib/core/connection/pool.js
index <HASH>..<HASH> 100644
--- a/lib/core/connection/pool.js
+++ b/lib/core/connection/pool.js
@@ -643,10 +643,17 @@ function destroy(self, connections, options, callback) {
return;
}
- // Zero out all connections
+ // clear all pool state
self.inUseConnections = [];
self.availableConnections = [];
self.connectingConnections = 0;
+ self.executing = false;
+ self.queue = [];
+ self.reconnectConnection = null;
+ self.numberOfConsecutiveTimeouts = 0;
+ self.connectionIndex = 0;
+ self.retriesLeft = self.options.reconnectTries;
+ self.reconnectId = null;
// Set state to destroyed
stateTransition(self, DESTROYED);
|
refactor(pool): ensure all pool state is cleared on destroy
|
mongodb_node-mongodb-native
|
train
|
js
|
458f2eb39c3cdbbbeb060d88c48acc987e569f74
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -96,6 +96,7 @@ var deprecatedTargets = [
]
var futureTargets = [
+ {runtime: 'electron', target: '5.0.0-beta.0', abi: '68', lts: false}
]
var allTargets = deprecatedTargets
|
feat: add support for Electron <I>
|
lgeiger_node-abi
|
train
|
js
|
c003e6113ae063660fe52f095abc35d55d3dce52
|
diff --git a/lib/api-client/resources/history.js b/lib/api-client/resources/history.js
index <HASH>..<HASH> 100644
--- a/lib/api-client/resources/history.js
+++ b/lib/api-client/resources/history.js
@@ -107,6 +107,9 @@ History.userOperation = function(params, done) {
* Valid values are instanceId, definitionId, businessKey, startTime, endTime, duration. Must be used in conjunction with the sortOrder parameter.
* @param {String} [params.sortOrder] Sort the results in a given order.
* Values may be asc for ascending order or desc for descending order. Must be used in conjunction with the sortBy parameter.
+ * @param {Number} [params.firstResult] Pagination of results. Specifies the index of the first result to return.
+ * @param {Number} [params.maxResults] Pagination of results. Specifies the maximum number of results to return. Will return less results if there are no more results left.
+
* @param {Function} done
*/
History.processInstance = function(params, done) {
|
chore(history): document pagination params of processInstance method
related to CAM-<I>
|
camunda_camunda-bpm-sdk-js
|
train
|
js
|
b84d0c4167226fcc693f3953916cea8d47ac7538
|
diff --git a/src/cli/commands/name/resolve.js b/src/cli/commands/name/resolve.js
index <HASH>..<HASH> 100644
--- a/src/cli/commands/name/resolve.js
+++ b/src/cli/commands/name/resolve.js
@@ -17,7 +17,7 @@ module.exports = {
recursive: {
type: 'boolean',
alias: 'r',
- describe: 'Resolve until the result is not an IPNS name. Default: false.',
+ describe: 'Resolve until the result is not an IPNS name. Default: true.',
default: true
}
},
|
docs: change recursive IPNS resolve default value (#<I>)
Value was updated but docs were not.
|
ipfs_js-ipfs
|
train
|
js
|
50d80405a90c9c79f2a00b2c22cc6c1fdc333012
|
diff --git a/superset/migrations/versions/18532d70ab98_fix_table_unique_constraint_in_mysql.py b/superset/migrations/versions/18532d70ab98_fix_table_unique_constraint_in_mysql.py
index <HASH>..<HASH> 100644
--- a/superset/migrations/versions/18532d70ab98_fix_table_unique_constraint_in_mysql.py
+++ b/superset/migrations/versions/18532d70ab98_fix_table_unique_constraint_in_mysql.py
@@ -27,15 +27,15 @@ revision = "18532d70ab98"
down_revision = "3fbbc6e8d654"
from alembic import op
+from sqlalchemy.dialects.mysql.base import MySQLDialect
def upgrade():
- try:
+ bind = op.get_bind()
+ if isinstance(bind.dialect, MySQLDialect):
# index only exists in mysql db
with op.get_context().autocommit_block():
op.drop_constraint("table_name", "tables", type_="unique")
- except Exception as ex:
- print(ex)
def downgrade():
|
fix: alembic migration error msg trying to delete constraint on tables (#<I>)
* fix: alembic migration fails by deleting non existent constraint on tables
* Revert "fix: alembic migration fails by deleting non existent constraint on tables"
This reverts commit 3a<I>b<I>f4bf<I>c3de2d<I>e<I>bd3d<I>f.
* mantain migration but just for MySQL and add downgrade procedure
* skip the downgrade
|
apache_incubator-superset
|
train
|
py
|
da9fca296f5ac400e887ad1413f814d9004b635f
|
diff --git a/log.go b/log.go
index <HASH>..<HASH> 100644
--- a/log.go
+++ b/log.go
@@ -82,3 +82,13 @@ func WithStacktrace(l *ZapEventLogger, level LogLevel) *ZapEventLogger {
copyLogger.skipLogger = *copyLogger.SugaredLogger.Desugar().WithOptions(zap.AddCallerSkip(1)).Sugar()
return ©Logger
}
+
+// WithSkip returns a new logger that skips the specified number of stack frames when reporting the
+// line/file.
+func WithSkip(l *ZapEventLogger, skip int) *ZapEventLogger {
+ copyLogger := *l
+ copyLogger.SugaredLogger = *copyLogger.SugaredLogger.Desugar().
+ WithOptions(zap.AddCallerSkip(skip)).Sugar()
+ copyLogger.skipLogger = *copyLogger.SugaredLogger.Desugar().WithOptions(zap.AddCallerSkip(1)).Sugar()
+ return ©Logger
+}
|
feat: add logger option to skip a number of stack frames
This is useful, e.g., when the logger will always be called from some
wrapper.
|
ipfs_go-log
|
train
|
go
|
cc2d02d7de8c43131dfb1ca141ff8be1a5f88acf
|
diff --git a/app/setup.php b/app/setup.php
index <HASH>..<HASH> 100755
--- a/app/setup.php
+++ b/app/setup.php
@@ -92,6 +92,12 @@ add_action('after_setup_theme', function () {
add_theme_support('custom-units', 'rem', 'vw');
/**
+ * Enable support for custom block spacing controls.
+ * @link https://developer.wordpress.org/block-editor/developers/themes/theme-support/#spacing-control
+ */
+ add_theme_support('custom-spacing');
+
+ /**
* Disable custom colors in the editor.
* @link https://developer.wordpress.org/block-editor/developers/themes/theme-support/#disabling-custom-colors-in-block-color-palettes
*/
@@ -116,12 +122,6 @@ add_action('after_setup_theme', function () {
remove_theme_support('core-block-patterns');
/**
- * Enable support for custom block spacing controls.
- * @link https://developer.wordpress.org/block-editor/developers/themes/theme-support/#spacing-control
- */
- add_theme_support('custom-spacing');
-
- /**
* Enable plugins to manage the document title.
* @link https://developer.wordpress.org/reference/functions/add_theme_support/#title-tag
*/
|
chore(theme): Move `custom-spacing` up for visibility
|
roots_sage
|
train
|
php
|
fb0f0d0206ce6f91a66b1e68e646c6ad13d7467e
|
diff --git a/service/handler.go b/service/handler.go
index <HASH>..<HASH> 100644
--- a/service/handler.go
+++ b/service/handler.go
@@ -183,7 +183,10 @@ func (h *HandlerService) Handle(conn acceptor.PlayerConn) {
msg, err := conn.GetNextMessage()
if err != nil {
- logger.Log.Errorf("Error reading next available message: %s", err.Error())
+ if err != constants.ErrConnectionClosed {
+ logger.Log.Errorf("Error reading next available message: %s", err.Error())
+ }
+
return
}
|
refactor(service): do not log message as an error what it is only closed
|
topfreegames_pitaya
|
train
|
go
|
5a4c490c7a408458fc6d4e33bf65d9ecc97f1879
|
diff --git a/test/util.js b/test/util.js
index <HASH>..<HASH> 100644
--- a/test/util.js
+++ b/test/util.js
@@ -189,7 +189,7 @@ describe('utils', function() {
});
describe('dosDateTime(date, utc)', function() {
- it('should convert date to DOS representation', function() {
+ it.skip('should convert date to DOS representation', function() {
assert.deepEqual(utils.dosDateTime(testDate), testDateDos);
});
|
test: skip dosDateTime without UTC for now due to issues with testing timezones.
|
archiverjs_node-archiver
|
train
|
js
|
086a8b82b95fec4484477d18d0c6347a72a33c08
|
diff --git a/app/state.js b/app/state.js
index <HASH>..<HASH> 100644
--- a/app/state.js
+++ b/app/state.js
@@ -47,8 +47,8 @@ const initialState = {
y: 380,
},
},
- 8: {
- id: 8,
+ 5: {
+ id: 5,
typeId: 5,
patchId: 1,
position: {
|
fix(tests): fix tests for merged version
|
xodio_xod
|
train
|
js
|
2472a647a41adfee9bbc591c2ed78bac0244610b
|
diff --git a/src/sku/components/SkuMessages.js b/src/sku/components/SkuMessages.js
index <HASH>..<HASH> 100644
--- a/src/sku/components/SkuMessages.js
+++ b/src/sku/components/SkuMessages.js
@@ -56,11 +56,7 @@ export default createComponent({
const messages = {};
this.messageValues.forEach((item, index) => {
- let { value } = item;
- if (this.messages[index].datetime > 0) {
- value = value.replace(/T/g, ' ');
- }
- messages[`message_${index}`] = value;
+ messages[`message_${index}`] = item.value;
});
return messages;
@@ -70,12 +66,8 @@ export default createComponent({
const messages = {};
this.messageValues.forEach((item, index) => {
- let { value } = item;
const message = this.messages[index];
- if (message.datetime > 0) {
- value = value.replace(/T/g, ' ');
- }
- messages[message.name] = value;
+ messages[message.name] = item.value;
});
return messages;
|
fix(Sku): delete unuse logic
|
youzan_vant
|
train
|
js
|
de51aa9e7deaaf0a3a039b4041225fd0e0513e3b
|
diff --git a/src/mixins/comparable.js b/src/mixins/comparable.js
index <HASH>..<HASH> 100644
--- a/src/mixins/comparable.js
+++ b/src/mixins/comparable.js
@@ -1,6 +1,7 @@
import { deepEqual } from '../util/helpers'
export default {
+ name: 'comparable',
props: {
valueComparator: {
type: Function,
|
chore(api): add name to comparable mixin
|
vuetifyjs_vuetify
|
train
|
js
|
ce56c879544da2ca34c51ce1a03d8f8eef7cb603
|
diff --git a/test/09-vulnerable-dependencies.spec.js b/test/09-vulnerable-dependencies.spec.js
index <HASH>..<HASH> 100644
--- a/test/09-vulnerable-dependencies.spec.js
+++ b/test/09-vulnerable-dependencies.spec.js
@@ -449,7 +449,10 @@ describe('Vulnerability validation', () => {
})
.catch((err) => {
showValidationErrors(err);
- err.message.should.containEql(jsonParseErrorMessage);
+ err.message.should.containEql(jsonParseErrorMessage) ||
+ err.message.should.containEql(
+ 'Command failed: npm audit'
+ );
})
);
});
|
test(vulnerable-dependencies): fix a weird side effect due to removal of 'ban-sensitive-files' and 'globby' dependencies
|
inikulin_publish-please
|
train
|
js
|
4a43ca2a1eeef94691e094e04133377817151043
|
diff --git a/test/connection.test.js b/test/connection.test.js
index <HASH>..<HASH> 100644
--- a/test/connection.test.js
+++ b/test/connection.test.js
@@ -480,6 +480,11 @@ test('transaction', async () => {
result: 31,
},
]);
+ if (!mockRpcEnabled) {
+ // Credit-only account credits are committed at the end of every slot;
+ // this sleep is to ensure a full slot has elapsed
+ await sleep((1000 * DEFAULT_TICKS_PER_SLOT) / NUM_TICKS_PER_SECOND);
+ }
expect(await connection.getBalance(accountTo.publicKey)).toBe(31);
});
|
fix: fix transaction live test for credit-only accounts (#<I>)
|
solana-labs_solana-web3.js
|
train
|
js
|
fb264a4fb90e1199c7003a7c126151589193111c
|
diff --git a/src/arpa/models/simple.py b/src/arpa/models/simple.py
index <HASH>..<HASH> 100644
--- a/src/arpa/models/simple.py
+++ b/src/arpa/models/simple.py
@@ -16,7 +16,7 @@ class ARPAModelSimple(ARPAModel):
def add_entry(self, ngram, p, bo=None, order=None):
key = tuple(ngram)
self._ps[key] = p
- if bo:
+ if bo is not None:
self._bos[key] = bo
def counts(self):
|
fix: explicit 0 and <I> were dropped
|
sfischer13_python-arpa
|
train
|
py
|
1b6a77bdd548a34e4fcd8989d700293b516aea46
|
diff --git a/lib/yml.js b/lib/yml.js
index <HASH>..<HASH> 100644
--- a/lib/yml.js
+++ b/lib/yml.js
@@ -1,8 +1,8 @@
-const debug = require('debug')('metalsmith-metadata-directory');
-const yaml = require('js-yaml');
+var debug = require('debug')('metalsmith-metadata-directory');
+var yaml = require('js-yaml');
function parseYml(text, filename) {
- let yml = '';
+ var yml = '';
try {
// Try to safe load YAML file, will parse to JSON on success;
yml = yaml.safeLoad(text, {
@@ -18,6 +18,6 @@ function parseYml(text, filename) {
debug(e.message || e);
throw new Error(`Malformed YAML in: ${filename}`);
}
-}
+}
-module.exports = parseYml;
\ No newline at end of file
+module.exports = parseYml;
|
refactor(yml): change file to use var/pre es5 code
|
fephil_metalsmith-metadata-directory
|
train
|
js
|
5595ea875d78aa921c4b0fbd714f9383f114a246
|
diff --git a/models/classes/user/GenerisUserService.php b/models/classes/user/GenerisUserService.php
index <HASH>..<HASH> 100644
--- a/models/classes/user/GenerisUserService.php
+++ b/models/classes/user/GenerisUserService.php
@@ -38,7 +38,8 @@ class GenerisUserService extends ConfigurableService implements UserService
{
$searchService = $this->getServiceLocator()->get(Search::SERVICE_ID);
$result = $searchService->query($searchString, TaoOntology::CLASS_URI_TAO_USER);
- return $this->getUsers($result);
+ $users = array_column(iterator_to_array($result), 'id');
+ return $this->getUsers($users);
}
/**
|
fix: restored compatibility with changed return stuctures
|
oat-sa_tao-core
|
train
|
php
|
918b8889134e8f1a5a2644eef8a9e699768fbebd
|
diff --git a/src/Exscript/Interpreter/Code.py b/src/Exscript/Interpreter/Code.py
index <HASH>..<HASH> 100644
--- a/src/Exscript/Interpreter/Code.py
+++ b/src/Exscript/Interpreter/Code.py
@@ -90,7 +90,7 @@ class Code(Scope):
if lexer.next_if('close_curly_bracket'):
if isinstance(parent, Template.Template):
break
- self.add(Exscript.Exscript(lexer, parser, self))
+ self.add(Template.Template(lexer, parser, self))
elif lexer.current_is('keyword', 'append'):
self.add(Append(lexer, parser, self))
elif lexer.current_is('keyword', 'extract'):
|
fix: the exscript cli app broke due to a broken name in the parser.
|
knipknap_exscript
|
train
|
py
|
937f53b0b272c83796c5231baaa0e824209a31f4
|
diff --git a/src/geshi/vbscript.php b/src/geshi/vbscript.php
index <HASH>..<HASH> 100644
--- a/src/geshi/vbscript.php
+++ b/src/geshi/vbscript.php
@@ -88,7 +88,7 @@ $language_data = array (
),
),
'SYMBOLS' => array(
- '-', '&', '*', '/', '\\', '^', '+', '<', '<=', '<>', '=', '=', '>', '>=',
+ '-', '&', '*', '/', '\\', '^', '+', '<', '<=', '<>', '=', '>', '>='
),
'CASE_SENSITIVE' => array(
GESHI_COMMENTS => false,
@@ -144,7 +144,7 @@ $language_data = array (
),
'PARSER_CONTROL' => array(
'ENABLE_FLAGS' => array(
- 'BRACKETS' => GESHI_NEVER,
+ 'BRACKETS' => GESHI_NEVER
)
)
);
|
fix: Some minor fixups for VBScript
|
GeSHi_geshi-1.0
|
train
|
php
|
8f3c7fe27853beead95415c534549f35391aa64f
|
diff --git a/test/test_framework.go b/test/test_framework.go
index <HASH>..<HASH> 100644
--- a/test/test_framework.go
+++ b/test/test_framework.go
@@ -117,13 +117,13 @@ func newServer(t *t, opts ...options) server {
}
priv := "cat /tmp/sshkey | " + base64
privKey, err := exec.Command("bash", "-c", priv).Output()
- if err != nil {
+ if err != nil || len(privKey) = 0 {
panic(string(privKey))
}
pub := "cat /tmp/sshkey.pub | " + base64
pubKey, err := exec.Command("bash", "-c", pub).Output()
- if err != nil {
+ if err != nil || len(pubKey) = 0 {
panic(string(pubKey))
}
cmd = exec.Command("docker", "run", "--name", fname,
|
test: error if no jwt keys present in jwt tests
|
micro_micro
|
train
|
go
|
4b0466a5b3d9160863872159cd8ba12526f9ef4a
|
diff --git a/src/Api/Api.php b/src/Api/Api.php
index <HASH>..<HASH> 100644
--- a/src/Api/Api.php
+++ b/src/Api/Api.php
@@ -189,7 +189,9 @@ abstract class Api implements ApiInterface
$request = $request->withHeader('Idempotency-Key', $idempotencykey);
}
- $request = $request->withHeader('Stripe-Account', $config->getAccountId());
+ if ($accountId = $config->getAccountId()) {
+ $request = $request->withHeader('Stripe-Account', $accountId);
+ }
$request = $request->withHeader('Stripe-Version', $config->getApiVersion());
|
fix: Issue with account id being invalid without being set.
Fixes: #<I>
|
cartalyst_stripe
|
train
|
php
|
a0b0853a8ceee1f95f13de8f6a4aae5af18c00bb
|
diff --git a/src/lory.js b/src/lory.js
index <HASH>..<HASH> 100644
--- a/src/lory.js
+++ b/src/lory.js
@@ -178,7 +178,7 @@ export function lory (slider, opts) {
index = nextIndex;
}
- if (infinite && (Math.abs(nextOffset) === maxOffset || Math.abs(nextOffset) === 0)) {
+ if (infinite && (nextIndex === slides.length - infinite || nextIndex === 0)) {
if (direction) {
index = infinite;
}
|
fix: detect last slide by index instead of by offset
|
loryjs_lory
|
train
|
js
|
67d0de48d9a76e082c0efab2a7fad981bc5f72a3
|
diff --git a/tests/test_presenter.py b/tests/test_presenter.py
index <HASH>..<HASH> 100644
--- a/tests/test_presenter.py
+++ b/tests/test_presenter.py
@@ -1,5 +1,4 @@
import pytest
-from textwrap import dedent
from auto_changelog.domain_model import Changelog, default_issue_pattern
from auto_changelog.presenter import MarkdownPresenter
|
refactor: Remove unused import from test #<I>
|
Michael-F-Bryan_auto-changelog
|
train
|
py
|
1e352658598dec76dc6014a9970953372041e35b
|
diff --git a/src/utils/mergeTree.js b/src/utils/mergeTree.js
index <HASH>..<HASH> 100644
--- a/src/utils/mergeTree.js
+++ b/src/utils/mergeTree.js
@@ -118,7 +118,7 @@ export async function mergeTree({
theirName,
mergeDriver,
}).then(r => {
- cleanMerge = r.cleanMerge
+ cleanMerge = cleanMerge && r.cleanMerge
unmergedFiles.push(filepath)
return r.mergeResult
})
|
fix(merge): ensure correct value of cleanMerge (#<I>)
|
isomorphic-git_isomorphic-git
|
train
|
js
|
704b3eefe848a8f5482d3c069132cf33cfca9ed8
|
diff --git a/src/cli.js b/src/cli.js
index <HASH>..<HASH> 100644
--- a/src/cli.js
+++ b/src/cli.js
@@ -131,7 +131,7 @@ function coverCmd(opts) {
writeFileSync(file, JSON.stringify(cov), 'utf8');
});
- if (config.instrumentation.preloadSources()) {
+ if (config.instrumentation.includeAllSources()) {
matchFn.files.forEach(function (file) {
if (opts.verbose) { console.error('Preload ' + file); }
try {
|
fix: support istanbul@<I> `--include-all-sources` option
|
douglasduteil_isparta
|
train
|
js
|
9bd0650b1c693887e99fbb272d4c9664a8893b2a
|
diff --git a/tests/integration/routes/accounts/patch-accounts-test.js b/tests/integration/routes/accounts/patch-accounts-test.js
index <HASH>..<HASH> 100644
--- a/tests/integration/routes/accounts/patch-accounts-test.js
+++ b/tests/integration/routes/accounts/patch-accounts-test.js
@@ -100,8 +100,18 @@ getServer(function (error, server) {
t.end()
})
- group.test('data.type & data.id don’t match existing document', {todo: true}, function (t) {
- t.end()
+ group.test('data.type & data.id don’t match existing document', function (t) {
+ server.inject(Object.assign({}, routeOptions, {
+ payload: {
+ data: {
+ type: 'not-account',
+ id: 'not-abc456'
+ }
+ }
+ }), function (response) {
+ t.is(response.statusCode, 409, 'returns 409 status')
+ t.end()
+ })
})
group.test('changing password', function (t) {
|
test(routes): PATCH /accounts/<I> with invalid type / id attributes
|
hoodiehq_hoodie-account-server
|
train
|
js
|
299dacc823aafaebd7773bc26bf0deab041c129a
|
diff --git a/src/select.js b/src/select.js
index <HASH>..<HASH> 100644
--- a/src/select.js
+++ b/src/select.js
@@ -321,7 +321,7 @@
// When the user clicks on an item inside the dropdown
ctrl.select = function(item) {
- if (!item._uiSelectChoiceDisabled) {
+ if (item === undefined || !item._uiSelectChoiceDisabled) {
var locals = {};
locals[ctrl.parserResult.itemName] = item;
|
fix(match): prevent exception when resetting value with BACKSPACE
|
angular-ui_ui-select
|
train
|
js
|
753f9e68ea7bf3fd9c3243833c1f27d94300fe04
|
diff --git a/tests/system/CodeIgniterTest.php b/tests/system/CodeIgniterTest.php
index <HASH>..<HASH> 100644
--- a/tests/system/CodeIgniterTest.php
+++ b/tests/system/CodeIgniterTest.php
@@ -424,6 +424,30 @@ final class CodeIgniterTest extends CIUnitTestCase
$this->assertArrayNotHasKey('_ci_previous_url', $_SESSION);
}
+ public function testNotStoresPreviousURLByCheckingContentType()
+ {
+ $_SERVER['argv'] = ['index.php', 'image'];
+ $_SERVER['argc'] = 2;
+
+ $_SERVER['REQUEST_URI'] = '/image';
+
+ // Inject mock router.
+ $routes = Services::routes();
+ $routes->add('image', static function () {
+ $response = Services::response();
+
+ return $response->setContentType('image/jpeg', '');
+ });
+ $router = Services::router($routes, Services::request());
+ Services::injectMock('router', $router);
+
+ ob_start();
+ $this->codeigniter->useSafeOutput(true)->run();
+ ob_get_clean();
+
+ $this->assertArrayNotHasKey('_ci_previous_url', $_SESSION);
+ }
+
/**
* The method after all test, reset Servces:: config
* Can't use static::tearDownAfterClass. This will cause a buffer exception
|
test: add test for storePreviousURL in case of non-HTML response
|
codeigniter4_CodeIgniter4
|
train
|
php
|
c922e2e4866d74f763ebb14b341dc4d710fcd032
|
diff --git a/packages/cli/src/dirCommand.js b/packages/cli/src/dirCommand.js
index <HASH>..<HASH> 100644
--- a/packages/cli/src/dirCommand.js
+++ b/packages/cli/src/dirCommand.js
@@ -4,7 +4,7 @@ import outputFileSync from 'output-file-sync'
import readdir from 'recursive-readdir'
import camelcase from 'camelcase'
import dashify from 'dashify'
-import { stat, convertFile } from './util'
+import { convertFile, stat } from './util'
const CASE = {
KEBAB: 'kebab', // kebab-case
@@ -50,7 +50,7 @@ async function dirCommand(
if (!isCompilable(relative)) return false
relative = rename(relative, ext, filenameCase)
- const dest = path.join(program.outDir, relative)
+ const dest = path.resolve(program.outDir, relative);
const code = await convertFile(src, options)
outputFileSync(dest, code)
|
fix(cli): fix --out-dir usage with absolute path (#<I>)
|
smooth-code_svgr
|
train
|
js
|
2342e1cfb813b6da7b2f6ecf2a5622501eba34b4
|
diff --git a/src/Common/Misc/ConvertProxyProperty/index.js b/src/Common/Misc/ConvertProxyProperty/index.js
index <HASH>..<HASH> 100644
--- a/src/Common/Misc/ConvertProxyProperty/index.js
+++ b/src/Common/Misc/ConvertProxyProperty/index.js
@@ -4,6 +4,7 @@ const typeMapping = {
'list-n': 'Enum',
'list-1': 'Enum',
checkbox: 'Checkbox',
+ textarea: 'Cell',
};
function extractLayout(ui) {
|
fix(ConvertProxyProperty): Add mapping for textarea widget to Cell
Not the best option yet but at least that allow the edior to work
|
Kitware_paraviewweb
|
train
|
js
|
adbc9967d1e3fdc1c3c9d5d50208399cd8ff4067
|
diff --git a/library.js b/library.js
index <HASH>..<HASH> 100644
--- a/library.js
+++ b/library.js
@@ -215,9 +215,10 @@ Widget.renderRecentTopicsWidget = async function (widget) {
};
Widget.renderCategories = async function (widget) {
- const data = await categories.getCategoriesByPrivilege('cid:0:children', widget.uid, 'find');
+ const categoryData = await categories.getCategoriesByPrivilege('categories:cid', widget.uid, 'find');
+ const tree = categories.getTree(categoryData, 0);
widget.html = await app.renderAsync('widgets/categories', {
- categories: data,
+ categories: tree,
relative_path: nconf.get('relative_path'),
});
return widget;
|
feat: load children catories for widget
|
NodeBB_nodebb-widget-essentials
|
train
|
js
|
76b985e60e0ee7a3016b26a3e00288b65894fb82
|
diff --git a/packages/bonde-styleguide/src/cards/Panel/Panel.js b/packages/bonde-styleguide/src/cards/Panel/Panel.js
index <HASH>..<HASH> 100644
--- a/packages/bonde-styleguide/src/cards/Panel/Panel.js
+++ b/packages/bonde-styleguide/src/cards/Panel/Panel.js
@@ -67,7 +67,7 @@ const Panel = ({
<Card title={sectionTitle} minHeight={minHeight}>
<Image src={image} height={185} />
<Flexbox padding={{ x: 16, y: 14 }}>
- <Title.H3>{title}</Title.H3>
+ <Title.H4>{title}</Title.H4>
<Text fontSize={16} lineHeight={1.31} color={textColor} margin={{ y: 8 }}>
{description}
</Text>
|
chore(styleguide): adjust panel title to h4
|
nossas_bonde-client
|
train
|
js
|
f9deefc92b399044957bb2e81cf561447adf3154
|
diff --git a/lib/limits.js b/lib/limits.js
index <HASH>..<HASH> 100644
--- a/lib/limits.js
+++ b/lib/limits.js
@@ -45,9 +45,7 @@ module.exports = function limits(deis) {
return callback(errors.Error('Only cpu and memory limits are valid'));
}
- commons.post(format('/%s/apps/%s/config/', deis.version, appName), {
- values: keyValues
- },function(err, result) {
+ commons.post(format('/%s/apps/%s/config/', deis.version, appName), keyValues, function(err, result) {
callback(err, result ? result.values : null);
});
}
|
fix(js): set limit
|
aledbf_deis-api
|
train
|
js
|
862eea9bafc5394a4dc6b18ab1df68bcf500c481
|
diff --git a/src/widgets/refinement-list/refinement-list.js b/src/widgets/refinement-list/refinement-list.js
index <HASH>..<HASH> 100644
--- a/src/widgets/refinement-list/refinement-list.js
+++ b/src/widgets/refinement-list/refinement-list.js
@@ -141,7 +141,7 @@ refinementList({
* @property {boolean} isRefined True if the value is selected.
* @property {string} label The label to display.
* @property {string} value The value used for refining.
- * @property {string} highlighted The label highlighted (when using search for facet values).
+ * @property {string} highlighted The label highlighted (when using search for facet values). This value is displayed in the default template.
* @property {string} url The url with this refinement selected.
* @property {object} cssClasses Object containing all the classes computed for the item.
*/
|
docs(refinementList): mention that highlight is displayed in the default template (#<I>)
|
algolia_instantsearch.js
|
train
|
js
|
77105aeccfd9d6b923ca80f8ba4bca4aff9d286b
|
diff --git a/lib/schema/iblockschema.php b/lib/schema/iblockschema.php
index <HASH>..<HASH> 100644
--- a/lib/schema/iblockschema.php
+++ b/lib/schema/iblockschema.php
@@ -150,7 +150,9 @@ class IblockSchema extends AbstractSchema
$iblockUid = $this->getUniqIblock($schemaIblock['iblock']);
$this->addToQueue('saveProperties', $iblockUid, $schemaIblock['props']);
$this->addToQueue('saveElementForm', $iblockUid, $schemaIblock['element_form']);
- $this->addToQueue('saveSectionForm', $iblockUid, $schemaIblock['section_form']);
+ if (isset($schemaIblock['section_form'])) {
+ $this->addToQueue('saveSectionForm', $iblockUid, $schemaIblock['section_form']);
+ }
}
foreach ($schemaIblocks as $schemaIblock) {
|
fix: add a check for exists section_form field
|
andreyryabin_sprint.migration
|
train
|
php
|
df84cc445f633882a786541979024d7c0ddf8824
|
diff --git a/assertions/accessibility.js b/assertions/accessibility.js
index <HASH>..<HASH> 100644
--- a/assertions/accessibility.js
+++ b/assertions/accessibility.js
@@ -1,9 +1,11 @@
const script = function (context, options, done) {
if (!window.axe) done({ error: 'aXe not found. Make sure it has been injected' })
- window.axe.run(context, options, function (err, results) {
- done(err ? { error: err.toString() } : { results: results })
- })
+ window
+ .axe
+ .run(context, options)
+ .then((results) => done({ results }))
+ .catch((error) => done({ error: error.toString() }))
}
module.exports.assertion = function (context, options, callback) {
@@ -34,7 +36,7 @@ module.exports.assertion = function (context, options, callback) {
}
for (const violation of result.violations) {
- this.assert.fail(`${violation.help}`)
+ this.assert.fail(`${violation.help} [${violation.nodes[0].html}]`)
}
const success = result.violations.length === 0
|
feat(violations): display first html element in violations on error
|
ahmadnassri_nightwatch-accessibility
|
train
|
js
|
4a3bda9052a73956b70d12d01115283916ecf846
|
diff --git a/src/js/SliderHandler.js b/src/js/SliderHandler.js
index <HASH>..<HASH> 100644
--- a/src/js/SliderHandler.js
+++ b/src/js/SliderHandler.js
@@ -58,10 +58,10 @@ class SliderHandler {
// Adjust the color
if (slider.callLeft) {
- color[slider.callLeft].call(color, left / slider.maxLeft);
+ color[slider.callLeft](left / slider.maxLeft);
}
if (slider.callTop) {
- color[slider.callTop].call(color, top / slider.maxTop);
+ color[slider.callTop](top / slider.maxTop);
}
// Set the new color
|
fix: unnecessary .call() (#<I>)
|
farbelous_bootstrap-colorpicker
|
train
|
js
|
34a5e7ed700fb1ccf97b803bc7d2676c03e23e4b
|
diff --git a/GPy/kern/src/prod.py b/GPy/kern/src/prod.py
index <HASH>..<HASH> 100644
--- a/GPy/kern/src/prod.py
+++ b/GPy/kern/src/prod.py
@@ -31,13 +31,16 @@ class Prod(CombinationKernel):
"""
def __init__(self, kernels, name='mul'):
- for i, kern in enumerate(kernels[:]):
+ _newkerns = []
+ for kern in kernels:
if isinstance(kern, Prod):
- del kernels[i]
- for part in kern.parts[::-1]:
- kern.unlink_parameter(part)
- kernels.insert(i, part)
- super(Prod, self).__init__(kernels, name)
+ for part in kern.parts:
+ #kern.unlink_parameter(part)
+ _newkerns.append(part.copy())
+ else:
+ _newkerns.append(kern.copy())
+
+ super(Prod, self).__init__(_newkerns, name)
def to_dict(self):
input_dict = super(Prod, self)._to_dict()
|
fix: #<I>, product kernel resolution
|
SheffieldML_GPy
|
train
|
py
|
8864ddd276be399c98d95c89ea793fa4938f223d
|
diff --git a/packages/create-instance/create-instance.js b/packages/create-instance/create-instance.js
index <HASH>..<HASH> 100644
--- a/packages/create-instance/create-instance.js
+++ b/packages/create-instance/create-instance.js
@@ -11,7 +11,6 @@ import { throwError } from 'shared/util'
import { compileTemplate } from './compile-template'
import deleteoptions from './delete-mounting-options'
import createFunctionalComponent from './create-functional-component'
-import cloneDeep from 'lodash/cloneDeep'
import { componentNeedsCompiling } from 'shared/validators'
export default function createInstance (
@@ -58,9 +57,6 @@ export default function createInstance (
addAttrs(vm, options.attrs)
addListeners(vm, options.listeners)
- vm.$_mountingOptionsSlots = options.slots
- vm.$_originalSlots = cloneDeep(vm.$slots)
-
if (options.slots) {
addSlots(vm, options.slots)
}
|
refactor: remove unnecessary code (#<I>)
|
vuejs_vue-test-utils
|
train
|
js
|
b3d6c149ba3544733868c5ec797ce7cb77539227
|
diff --git a/acceptance_test.go b/acceptance_test.go
index <HASH>..<HASH> 100644
--- a/acceptance_test.go
+++ b/acceptance_test.go
@@ -21,7 +21,7 @@ import (
// nolint: gochecknoglobals
var formatArchs = map[string][]string{
"apk": {"amd64", "arm64", "386", "ppc64le", "armv6", "armv7", "s390x"},
- "deb": {"amd64", "arm64", "ppc64le", "armv6", "armv7", "s390x"},
+ "deb": {"amd64", "arm64", "ppc64le", "armv7", "s390x"},
"rpm": {"amd64", "arm64", "ppc64le", "armv7"},
}
|
fix: disable debian arm6 tests (#<I>)
|
goreleaser_nfpm
|
train
|
go
|
abc1ad4ff9b181e73fcd9a22d61e08b71a1e1f18
|
diff --git a/superset-frontend/temporary_superset_ui/superset-ui/plugins/superset-ui-plugins/packages/superset-ui-legacy-preset-chart-nvd3/src/ReactNVD3.js b/superset-frontend/temporary_superset_ui/superset-ui/plugins/superset-ui-plugins/packages/superset-ui-legacy-preset-chart-nvd3/src/ReactNVD3.js
index <HASH>..<HASH> 100644
--- a/superset-frontend/temporary_superset_ui/superset-ui/plugins/superset-ui-plugins/packages/superset-ui-legacy-preset-chart-nvd3/src/ReactNVD3.js
+++ b/superset-frontend/temporary_superset_ui/superset-ui/plugins/superset-ui-plugins/packages/superset-ui-legacy-preset-chart-nvd3/src/ReactNVD3.js
@@ -20,8 +20,8 @@ import { reactify } from '@superset-ui/chart';
import Component from './NVD3Vis';
import { hideTooltips } from './utils';
-function willUnmount() {
+function componentWillUnmount() {
hideTooltips(true);
}
-export default reactify(Component, { willUnmount });
+export default reactify(Component, { componentWillUnmount });
|
chore: rename willUnmount hook to match the name in `superset-ui/chart` (#<I>)
|
apache_incubator-superset
|
train
|
js
|
8bdba3ff3c88be729633ea40b8fbdf875ed1e391
|
diff --git a/test/videojs.record.spec.js b/test/videojs.record.spec.js
index <HASH>..<HASH> 100644
--- a/test/videojs.record.spec.js
+++ b/test/videojs.record.spec.js
@@ -267,7 +267,7 @@ describe('Record', () => {
// and https://www.fxsitecompat.dev/en-CA/docs/2019/requesting-notification-permission-and-screen-capture-now-requires-user-interaction/
expect(player.deviceErrorCode.name).toEqual('InvalidStateError');
expect(player.deviceErrorCode.message).toEqual(
- 'getDisplayMedia must be called from a user gesture handler.'
+ 'getDisplayMedia requires transient activation from a user gesture.'
);
}
@@ -320,7 +320,7 @@ describe('Record', () => {
// and https://www.fxsitecompat.dev/en-CA/docs/2019/requesting-notification-permission-and-screen-capture-now-requires-user-interaction/
expect(player.deviceErrorCode.name).toEqual('InvalidStateError');
expect(player.deviceErrorCode.message).toEqual(
- 'getDisplayMedia must be called from a user gesture handler.'
+ 'getDisplayMedia requires transient activation from a user gesture.'
);
}
|
test: error message for getDisplayMedia user gesture changed in Firefox
|
collab-project_videojs-record
|
train
|
js
|
05124e2279269b4630c91843be8120511cdc20b8
|
diff --git a/lib/AnimatedStack.js b/lib/AnimatedStack.js
index <HASH>..<HASH> 100644
--- a/lib/AnimatedStack.js
+++ b/lib/AnimatedStack.js
@@ -143,6 +143,8 @@ export default class AnimatedStack extends React.Component {
);
this.setState({layersStyles: layersStylesStart});
+ // NOTE: maybe we should use animation instead of transition
+ // since here we need timeout for brower to konw the change of style
setTimeout(() => {
const layersStylesEnd = this.layersStylesForAnimation(
defaultStyles, currentIndex, nextIndex, animationObject, 'endStyle'
@@ -151,7 +153,7 @@ export default class AnimatedStack extends React.Component {
isInTransition: true,
layersStyles: layersStylesEnd
});
- });
+ }, 50);
}
}
|
fix: use <I> miliseconds timeout to make sure the style is changed and the animation is applied
|
poetic_react-super-components
|
train
|
js
|
7c02725eb460ff09310c76e453f3dd6cd9ae0408
|
diff --git a/spec/report_spec.rb b/spec/report_spec.rb
index <HASH>..<HASH> 100644
--- a/spec/report_spec.rb
+++ b/spec/report_spec.rb
@@ -761,6 +761,7 @@ describe Bugsnag::Report do
end
it "should handle utf8 encoding errors in exceptions_list" do
+ skip "Irrelevant on newer ruby" if RUBY_VERSION >= '2.3.0'
invalid_data = "\"foo\xEBbar\""
invalid_data = invalid_data.force_encoding("utf-8") if invalid_data.respond_to?(:force_encoding)
|
fix(spec): Skip test made irrelevant by Ruby <I> improvements
Ruby <I> has a number of improvements to encoding listed in the
changelog:
<URL>
|
bugsnag_bugsnag-ruby
|
train
|
rb
|
ff5c4b671e2022e5f8589a79fbec4adf08a05a43
|
diff --git a/qa/integration-tests-webapps/src/test/java/org/camunda/bpm/cockpit/DashboardIT.java b/qa/integration-tests-webapps/src/test/java/org/camunda/bpm/cockpit/DashboardIT.java
index <HASH>..<HASH> 100644
--- a/qa/integration-tests-webapps/src/test/java/org/camunda/bpm/cockpit/DashboardIT.java
+++ b/qa/integration-tests-webapps/src/test/java/org/camunda/bpm/cockpit/DashboardIT.java
@@ -33,7 +33,7 @@ public class DashboardIT extends AbstractWebappUiIntegrationTest {
WebElement submit = wait.until(ExpectedConditions.presenceOfElementLocated(By.cssSelector("button[type=\"submit\"]")));
submit.submit();
- wait.until(ExpectedConditions.textToBePresentInElementLocated(By.tagName("h3"), "1 process definition deployed"));
+ wait.until(ExpectedConditions.textToBePresentInElementLocated(By.cssSelector("[ng-repeat=\"propName in procDefStatsKeys\"]:first-child"), "1 process definition"));
wait.until(currentURIIs(new URI(appUrl + "/default/#/dashboard")));
}
|
fix(webapps-IT): adapt webapps-IT-test to new cockpit dashboard
related to CAM-<I>
|
camunda_camunda-bpm-platform
|
train
|
java
|
c203462d8b8f8b9e12a1b7927120db5db06e09d1
|
diff --git a/lib/inspectors/log.js b/lib/inspectors/log.js
index <HASH>..<HASH> 100644
--- a/lib/inspectors/log.js
+++ b/lib/inspectors/log.js
@@ -9,7 +9,7 @@ var logHtmlScript, logHttpsHtmlScript, logHttpsScript;
function wrapScript(script, isHtml) {
- return isHtml ? '\r\n<script>' + script + '</script>\r\n' : script;
+ return isHtml ? '\r\n<script>' + script + '</script>\r\n' : '\r\n' + script;
}
module.exports = function(req, res, next) {
|
refactor: Add crlf before log script
|
avwo_whistle
|
train
|
js
|
5fb4f4951073c2f2ce3f9aec840f1e94eb1ba007
|
diff --git a/src/main/java/com/conveyal/gtfs/loader/ReferenceTracker.java b/src/main/java/com/conveyal/gtfs/loader/ReferenceTracker.java
index <HASH>..<HASH> 100644
--- a/src/main/java/com/conveyal/gtfs/loader/ReferenceTracker.java
+++ b/src/main/java/com/conveyal/gtfs/loader/ReferenceTracker.java
@@ -10,7 +10,7 @@ import static com.conveyal.gtfs.error.NewGTFSErrorType.DUPLICATE_ID;
import static com.conveyal.gtfs.error.NewGTFSErrorType.REFERENTIAL_INTEGRITY;
/**
- * This class is used during feed loads to track the unique keys that are encountered in a GTFS
+ * This class is used while loading GTFS to track the unique keys that are encountered in a GTFS
* feed. It has two sets of strings that it tracks, one for single field keys (e.g., route_id or
* stop_id) and one for keys that are compound, usually made up of a string ID with a sequence field
* (e.g., trip_id + stop_sequence for tracking unique stop times).
|
fix(reference-tracker): fix wording; trigger patch with #<I>
|
conveyal_gtfs-lib
|
train
|
java
|
9befb321aaafca9998c69a9b1ea51c7be30fcde0
|
diff --git a/examples/app.js b/examples/app.js
index <HASH>..<HASH> 100644
--- a/examples/app.js
+++ b/examples/app.js
@@ -4,6 +4,8 @@ var express = require('express');
var app = module.exports = express();
var MongoQS = require('../index');
+
+// Create a new Mongo QueryString parser
var qs = new MongoQS({
custom: {
bbox: 'geojson',
@@ -14,6 +16,7 @@ var qs = new MongoQS({
app.get('/api/places', function(req, res) {
res.set('Content-Type', 'application/json');
+ // Parse the request query parameters
var query = qs.parse(req.query);
var collection = require('./db').db.collection('places');
var cursor = collection.find(query).limit(3);
|
docs(examples): add comments to example application
|
Turistforeningen_node-mongo-querystring
|
train
|
js
|
8922f64e923ea97231953997e8b12b186761b35d
|
diff --git a/lib/components/app/responsive-webapp.js b/lib/components/app/responsive-webapp.js
index <HASH>..<HASH> 100644
--- a/lib/components/app/responsive-webapp.js
+++ b/lib/components/app/responsive-webapp.js
@@ -118,7 +118,7 @@ class ResponsiveWebapp extends Component {
componentWillUnmount () {
// Remove on back button press listener.
- window.removeEventListener('popstate', () => {})
+ window.removeEventListener('popstate')
}
render () {
|
refactor(webapp): remove no-op function arg
This was added in an attempt to silence an error/warning during debugging the upgrade to React <I>,
but the fix was a red herring (something else was the matter).
|
opentripplanner_otp-react-redux
|
train
|
js
|
4f9adfe208b20121bd653bfddd269be658ff9699
|
diff --git a/packages/app-frontend/src/features/apps/index.js b/packages/app-frontend/src/features/apps/index.js
index <HASH>..<HASH> 100644
--- a/packages/app-frontend/src/features/apps/index.js
+++ b/packages/app-frontend/src/features/apps/index.js
@@ -26,6 +26,8 @@ export function useApps () {
watch(currentAppId, value => {
bridge.send(BridgeEvents.TO_BACK_APP_SELECT, value)
+ }, {
+ immediate: true
})
return {
|
fix(app): not selecting on initial mount
|
vuejs_vue-devtools
|
train
|
js
|
f26e2b93a1ee67f7cfbcaf8ae90496c83e3e746e
|
diff --git a/src/actions/hits.js b/src/actions/hits.js
index <HASH>..<HASH> 100644
--- a/src/actions/hits.js
+++ b/src/actions/hits.js
@@ -1,5 +1,6 @@
import { UPDATE_HITS, UPDATE_AGGS, UPDATE_COMPOSITE_AGGS } from '../constants';
import { SET_QUERY_TO_HITS } from '../../lib/constants';
+import { setError } from './misc';
export function updateAggs(component, aggregations, append = false) {
return {
@@ -42,6 +43,9 @@ export function saveQueryToHits(component, query) {
export function mockDataForTesting(component, data) {
return (dispatch) => {
+ if (data.error) {
+ dispatch(setError(component, data.error));
+ }
if (data.hasOwnProperty('aggregations')) {
// set aggs
dispatch(updateAggs(component, data.aggregations));
|
feat: add support for errors in mocking
|
appbaseio_reactivecore
|
train
|
js
|
eb36c85f3d5703ad20dc6f4dc523aa324842d416
|
diff --git a/src/client/utils/ipcAdapter.js b/src/client/utils/ipcAdapter.js
index <HASH>..<HASH> 100644
--- a/src/client/utils/ipcAdapter.js
+++ b/src/client/utils/ipcAdapter.js
@@ -22,7 +22,7 @@ class ClientIPCAdapter extends IPCAdapter {
const currentActivityId = results[1].activityId
return activities.map((activity) => {
- if (activity.id === currentActivityId) {
+ if (activity.id !== '-1' && activity.id === currentActivityId) {
activity.activityStatus = ACTIVITIY_STATUS.STARTED
} else {
activity.activityStatus = ACTIVITIY_STATUS.OFF
|
fix(ipc): Set default activity state better when load activities
|
swissmanu_orchestra
|
train
|
js
|
df92322d90ff4813fc5f655fe0e56e891835c61b
|
diff --git a/bin.js b/bin.js
index <HASH>..<HASH> 100755
--- a/bin.js
+++ b/bin.js
@@ -16,7 +16,7 @@
'use strict';
-const cli = require('./dist/cli');
+const cli = require('./lib/cli');
cli({
stdout: process.stdout,
|
fix(cli): Fix showstopper bug in bin.js
Forgot to change this from dist/cli to lib/cli after removing Babel.
|
markcornick_passwoid
|
train
|
js
|
f7bdbaadc6a4a3db155c20954256940ceb2cfa83
|
diff --git a/src/Command/BaseMaker.php b/src/Command/BaseMaker.php
index <HASH>..<HASH> 100644
--- a/src/Command/BaseMaker.php
+++ b/src/Command/BaseMaker.php
@@ -322,8 +322,8 @@ class BaseMaker extends Base
}
// Look for the generator token
- $this->fServicesHandle = fopen(static::SERVICE_PATH, "r+");;
- $bFound = false;
+ $this->fServicesHandle = fopen(static::SERVICE_PATH, 'r+');;
+ $bFound = false;
if ($this->fServicesHandle) {
$iLocation = 0;
while (($sLine = fgets($this->fServicesHandle)) !== false) {
@@ -338,12 +338,11 @@ class BaseMaker extends Base
if (!$bFound) {
fclose($this->fServicesHandle);
throw new ConsoleException(
- 'Services file does not contain the generator token (i.e // GENERATOR[' . $sToken . '])',
+ 'Services file does not contain the generator token (i.e // GENERATOR[' . $sToken . ']) ' .
'This token is required so that the tool can safely insert new definitions'
);
}
} else {
- fclose($this->fServicesHandle);
throw new ConsoleException(
'Failed to open the services file for reading and writing: ' . static::SERVICE_PATH
);
|
chore: Resolving exception throw and removing redundant call to fclose()
|
nails_module-console
|
train
|
php
|
23eb7b5fcba1cc5fba0efd56daeb200a6a352a51
|
diff --git a/tasks/helpers/publish-helper.js b/tasks/helpers/publish-helper.js
index <HASH>..<HASH> 100644
--- a/tasks/helpers/publish-helper.js
+++ b/tasks/helpers/publish-helper.js
@@ -58,7 +58,7 @@ export function publishPackages() {
if (packageInfo && packageInfo.name) {
await npmPublish([packageInfo.dir]);
- const owners = ['mattroyal', 'gpleiss', 'stubbornella', 'ctaymor', 'atomanyih', 'kennyw1019', 'd-reinhold'];
+ const owners = ['stubbornella', 'ctaymor', 'atomanyih', 'kennyw1019', 'd-reinhold', 'cthompson'];
for (const owner of owners) {
await npmOwner(['add', owner, packageInfo.name]);
}
|
chore(gulp): update npm owners in publish packages
|
pivotal-cf_pivotal-ui
|
train
|
js
|
fae03dc073aa83231847334b8d49aa7496b714bb
|
diff --git a/lib/scoped/index.js b/lib/scoped/index.js
index <HASH>..<HASH> 100644
--- a/lib/scoped/index.js
+++ b/lib/scoped/index.js
@@ -3,6 +3,10 @@ module.exports = scoped
var EventEmitter = require('events').EventEmitter
function scoped (state, api, type) {
+ if (typeof type === 'undefined') {
+ throw new TypeError('type must be set for scoped stores')
+ }
+
var emitter = new EventEmitter()
var scopedApi = {
|
fix: throw TypeError for store() without passing type
Calling store().add(...) without a type throws a TypeError: type must be set for scoped stores.
|
hoodiehq_hoodie-store-client
|
train
|
js
|
5aa4df86ef92e738113973a898938f24b6c5c612
|
diff --git a/src/cookies-eu-banner.js b/src/cookies-eu-banner.js
index <HASH>..<HASH> 100644
--- a/src/cookies-eu-banner.js
+++ b/src/cookies-eu-banner.js
@@ -170,7 +170,7 @@
*/
removeBanner: function (wait) {
var banner = document.getElementById('cookies-eu-banner');
- banner.classList.add('before-remove');
+ banner.classList.add('cookies-eu-banner--before-remove');
setTimeout (function() {
if (banner && banner.parentNode) {
banner.parentNode.removeChild(banner);
|
feat: Update to BEM modifier-class
Updating new class before DOM-removal to `cookies-eu-banner--before-remove`
|
Alex-D_Cookies-EU-banner
|
train
|
js
|
2c2588badf0910824058cbc1bb54889251836251
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -280,7 +280,29 @@
var args = arguments;
var returnValue;
this.each(function () {
- var value = $(this).data(DATA_ID)[optionOverrides].apply(null, [].slice.call(args, 1));
+ var obj = $.data(this, DATA_ID);
+ var value;
+ if (!obj) {
+ console.warn('Scrollable ' + optionOverrides + ' should not be called before initialization');
+ switch (optionOverrides) {
+ case 'scrollLeft':
+ case 'scrollTop':
+ value = 0;
+ break;
+ case 'scrollPadding':
+ value = { top: 0, left: 0, right: 0, bottom: 0 };
+ break;
+ case 'scrollBy':
+ case 'scrollTo':
+ case 'scrollByPage':
+ case 'scrollToPage':
+ case 'scrollToElement':
+ value = Promise.resolve();
+ break;
+ }
+ } else {
+ value = obj[optionOverrides].apply(null, [].slice.call(args, 1));
+ }
if (value !== undefined) {
returnValue = value;
return false;
|
fix: prevent exception when calling method on uninitialized element
|
misonou_jquery-scrollable
|
train
|
js
|
de372bb6b006e5156144acd4c8d01b96abfe7ac9
|
diff --git a/cli/index.js b/cli/index.js
index <HASH>..<HASH> 100755
--- a/cli/index.js
+++ b/cli/index.js
@@ -38,11 +38,11 @@ function main() {
var data = '';
- process.stdin.on('data', function(chunk) {
+ process.stdin.on('data', function (chunk) {
data += chunk;
});
- process.stdin.on('end', function() {
+ process.stdin.on('end', function () {
resolve(data);
});
});
|
chore: fix linting issues
|
remy_inliner
|
train
|
js
|
04c0a94d09d6f5d03010dde7c1fa5cbe281ea34d
|
diff --git a/tests/test_pipreqs.py b/tests/test_pipreqs.py
index <HASH>..<HASH> 100755
--- a/tests/test_pipreqs.py
+++ b/tests/test_pipreqs.py
@@ -24,6 +24,10 @@ class TestPipreqs(unittest.TestCase):
self.assertEqual(len(imports),4, "Incorrect Imports array length")
for item in imports:
self.assertTrue(item in self.modules, "Import is missing")
+ self.assertFalse("time" in imports)
+ self.assertFalse("logging" in imports)
+ self.assertFalse("curses" in imports)
+ self.assertFalse("__future__" in imports)
def test_get_imports_info(self):
path = os.path.join(os.path.dirname(__file__),"_data")
|
fix(tests): Add more assertions
|
bndr_pipreqs
|
train
|
py
|
460528cf942b412fb0078de9c7deca2e6bd966ff
|
diff --git a/pysecure/adapters/ssha.py b/pysecure/adapters/ssha.py
index <HASH>..<HASH> 100644
--- a/pysecure/adapters/ssha.py
+++ b/pysecure/adapters/ssha.py
@@ -373,7 +373,7 @@ def ssh_threads_set_callbacks(cb):
raise SshError("Could not set callbacks.")
def ssh_set_blocking(ssh_session, blocking):
- c_ssh_set_blocking(c_void_p(ssh_session), c_long(blocking))
+ c_ssh_set_blocking(c_void_p(ssh_session), c_int(blocking))
class SshSystem(object):
|
fix: invalid second argument type to ssh_set_blocking
|
dsoprea_PySecure
|
train
|
py
|
e68d4975fad0edd9e46808b055436e82e635f0c4
|
diff --git a/pyvips/vimage.py b/pyvips/vimage.py
index <HASH>..<HASH> 100644
--- a/pyvips/vimage.py
+++ b/pyvips/vimage.py
@@ -126,7 +126,7 @@ def _deprecated(note):
return _dep
-# Rules for the mapping betweeen numpy typestrings and libvips formats
+# Rules for the mapping between numpy typestrings and libvips formats
# b1: bool. Above u1 so that rev. map is uchar->u1
TYPESTR_TO_FORMAT = {'|b1': 'uchar',
'|u1': 'uchar',
|
docs: fix simple typo, betweeen -> between (#<I>)
There is a small typo in pyvips/vimage.py.
Should read `between` rather than `betweeen`.
|
libvips_pyvips
|
train
|
py
|
b2087d194b164cabe6022500b9a9335168d7bbf8
|
diff --git a/packages/radio/src/react/button.js b/packages/radio/src/react/button.js
index <HASH>..<HASH> 100644
--- a/packages/radio/src/react/button.js
+++ b/packages/radio/src/react/button.js
@@ -5,7 +5,6 @@ import { defaultName as themeDefaultName } from '@pluralsight/ps-design-system-t
import * as propsUtil from '@pluralsight/ps-design-system-util/props'
import css from '../css'
-import * as vars from '../vars'
const radioButtonHtmlPropsWhitelist = [
'type',
diff --git a/packages/radio/src/react/group.js b/packages/radio/src/react/group.js
index <HASH>..<HASH> 100644
--- a/packages/radio/src/react/group.js
+++ b/packages/radio/src/react/group.js
@@ -3,7 +3,6 @@ import PropTypes from 'prop-types'
import React from 'react'
import css from '../css'
-import * as vars from '../vars'
const styles = {
buttonContainer: _ => glamor.css(css['.psds-radio-group__button-container']),
|
fix(radio): fix build error
|
pluralsight_design-system
|
train
|
js,js
|
b5e51ff39a78dd7286c4f6e8c884de2f015f3b5e
|
diff --git a/lib/graphql.rb b/lib/graphql.rb
index <HASH>..<HASH> 100644
--- a/lib/graphql.rb
+++ b/lib/graphql.rb
@@ -55,31 +55,6 @@ module GraphQL
def self.scan_with_ragel(graphql_string)
GraphQL::Language::Lexer.tokenize(graphql_string)
end
-
- # Support Ruby 2.2 by implementing `-"str"`. If we drop 2.2 support, we can remove this backport.
- if !String.method_defined?(:-@)
- module StringDedupBackport
- refine String do
- def -@
- if frozen?
- self
- else
- self.dup.freeze
- end
- end
- end
- end
- end
-
- if !String.method_defined?(:match?)
- module StringMatchBackport
- refine String do
- def match?(pattern)
- self =~ pattern
- end
- end
- end
- end
end
# Order matters for these:
|
refactor: remove unsupported String refinements
|
rmosolgo_graphql-ruby
|
train
|
rb
|
53757c570c506fe7ec3f40d34bdad4844f1b3f46
|
diff --git a/packages/karma.conf.js b/packages/karma.conf.js
index <HASH>..<HASH> 100644
--- a/packages/karma.conf.js
+++ b/packages/karma.conf.js
@@ -18,7 +18,7 @@ module.exports = function (config) {
jasmine: {
random: false,
},
- clearContext: true // leave Jasmine Spec Runner output visible in browser
+ clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageReporter: {
subdir: '.',
|
chore: set `clearContext` is `false` (#<I>)
|
ng-alain_delon
|
train
|
js
|
2d19dd99aa534d41a60667a14f9d8db10e6cb083
|
diff --git a/pipe.go b/pipe.go
index <HASH>..<HASH> 100644
--- a/pipe.go
+++ b/pipe.go
@@ -28,13 +28,18 @@ func (p *PipeReader) Close() error {
// NewPipeReader creates a new in-memory reader that reads from all loggers
// The caller must call Close on the returned reader when done.
+//
+// By default, it:
+//
+// 1. Logs JSON.
+// 2. Logs at the Debug level. However, unless SetLogLevel is called on a
+// subsystem logger to decrease the default log level, for that subsystem,
+// only error messages will be logged.
func NewPipeReader(opts ...PipeReaderOption) *PipeReader {
- loggerMutex.Lock()
opt := pipeReaderOptions{
- format: defaultFormat,
+ format: JSONOutput,
level: LevelDebug,
}
- loggerMutex.Unlock()
for _, o := range opts {
o.setOption(&opt)
|
fix: log with the JSON format by default and avoid taking a lock.
This seems like the most reasonable default. We no longer need to take a lock to
read the global log level, so we might as well drop the lock entirely.
|
ipfs_go-log
|
train
|
go
|
06d9c12c169b09ce473630f1205004231a423071
|
diff --git a/packages/react/src/components/DataTable/TableToolbarSearch.js b/packages/react/src/components/DataTable/TableToolbarSearch.js
index <HASH>..<HASH> 100644
--- a/packages/react/src/components/DataTable/TableToolbarSearch.js
+++ b/packages/react/src/components/DataTable/TableToolbarSearch.js
@@ -80,7 +80,7 @@ const TableToolbarSearch = ({
const handleExpand = (event, value = !expanded) => {
if (!controlled && (!persistent || (!persistent && !persistant))) {
setExpandedState(value);
- if (value) {
+ if (value && !expanded) {
setFocusTarget(searchRef);
}
}
|
fix(TableToolbarSearch): fix focus management (#<I>)
This change checks if there was actual change in the expanded state of
`<TableToolbarSearch>`, to set the focus upon expanding.
Fixes #<I>.
|
carbon-design-system_carbon-components
|
train
|
js
|
d6ce6f31e8993475322ab8aef2b26471e53e6332
|
diff --git a/test/test-openssh.js b/test/test-openssh.js
index <HASH>..<HASH> 100644
--- a/test/test-openssh.js
+++ b/test/test-openssh.js
@@ -178,9 +178,11 @@ const serverCfg = { hostKeys: [ fixture('ssh_host_rsa_key') ] };
`Wrong info: ${inspect(info)}`
);
- accept().on('close', mustCall(() => {
+ const stream = accept();
+ stream.on('close', mustCall(() => {
client.end();
})).end(response);
+ stream.resume();
}));
}));
}));
|
test: fix OpenSSH test timing out
|
mscdex_ssh2
|
train
|
js
|
b41c4045387d9caf5429d3c86b858125f54f3b32
|
diff --git a/index.js b/index.js
index <HASH>..<HASH> 100644
--- a/index.js
+++ b/index.js
@@ -85,6 +85,7 @@ var processJSONencodedBody = function (body) {
var key, value;
var result = {
+ properties: {},
mp: {},
};
@@ -99,6 +100,14 @@ var processJSONencodedBody = function (body) {
}
}
+
+ for (key in body.properties) {
+ if (['url'].indexOf(key) !== -1) {
+ result[key] = result[key] || [].concat(body.properties[key])[0];
+ delete body.properties[key];
+ }
+ }
+
cleanEmptyKeys(result);
return result;
diff --git a/test/micropub.spec.js b/test/micropub.spec.js
index <HASH>..<HASH> 100644
--- a/test/micropub.spec.js
+++ b/test/micropub.spec.js
@@ -67,6 +67,22 @@ describe('Micropub Parse', function () {
});
});
+ it('should convert URL-property to top-level property', function () {
+ micropub.processJSONencodedBody({
+ type: ['h-entry'],
+ properties: {
+ content: ['hello world'],
+ url: ['http://example.com/'],
+ },
+ }).should.deep.equal({
+ type: ['h-entry'],
+ url: 'http://example.com/',
+ properties: {
+ content: ['hello world'],
+ },
+ });
+ });
+
});
});
|
fix(main): ensure URL is always top level property
|
voxpelli_node-micropub-express
|
train
|
js,js
|
54501425959cf18b48ad6e5f035ab9ba61d01ff6
|
diff --git a/nodes/fire-event/ui-fire-event.js b/nodes/fire-event/ui-fire-event.js
index <HASH>..<HASH> 100644
--- a/nodes/fire-event/ui-fire-event.js
+++ b/nodes/fire-event/ui-fire-event.js
@@ -15,7 +15,7 @@ RED.nodes.registerType('ha-fire-event', {
server: { value: '', type: 'server', required: true },
event: { value: '' },
data: { value: '' },
- dataType: { value: 'json' },
+ dataType: { value: 'jsonata' },
},
oneditprepare: function () {
const node = this;
|
refactor(fire-event): Change default type of the data field to JSONata
|
zachowj_node-red-contrib-home-assistant-websocket
|
train
|
js
|
6289188091f032526617a3071accce0ab9ddb1d1
|
diff --git a/controller/api/models.py b/controller/api/models.py
index <HASH>..<HASH> 100644
--- a/controller/api/models.py
+++ b/controller/api/models.py
@@ -863,7 +863,12 @@ def _etcd_publish_domains(**kwargs):
def _etcd_purge_domains(**kwargs):
app = kwargs['instance'].app
- _etcd_client.delete('/deis/domains/{}'.format(app))
+ app_domains = app.domain_set.all()
+ if app_domains:
+ _etcd_client.write('/deis/domains/{}'.format(app),
+ ' '.join(str(d.domain) for d in app_domains))
+ else:
+ _etcd_client.delete('/deis/domains/{}'.format(app))
# Log significant app-related events
|
fix(controller): handle partial deletion of domains
|
deis_deis
|
train
|
py
|
e0f2478ef431cccb1d30d92d2d0c47d6f195675b
|
diff --git a/lib/plugins/filter/post_permalink.js b/lib/plugins/filter/post_permalink.js
index <HASH>..<HASH> 100644
--- a/lib/plugins/filter/post_permalink.js
+++ b/lib/plugins/filter/post_permalink.js
@@ -1,6 +1,5 @@
'use strict';
-const defaults = require('lodash/defaults');
const { Permalink, slugize } = require('hexo-util');
const { basename } = require('path');
let permalink;
@@ -33,8 +32,7 @@ function postPermalinkFilter(data) {
const keys = Object.keys(data);
- for (let i = 0, len = keys.length; i < len; i++) {
- const key = keys[i];
+ for (const key of keys) {
if (Object.prototype.hasOwnProperty.call(meta, key)) continue;
// Use Object.getOwnPropertyDescriptor to copy getters to avoid "Maximum call
@@ -42,7 +40,7 @@ function postPermalinkFilter(data) {
Object.defineProperty(meta, key, Object.getOwnPropertyDescriptor(data, key));
}
- return permalink.stringify(defaults(meta, config.permalink_defaults));
+ return permalink.stringify(Object.assign(meta, config.permalink_defaults));
}
module.exports = postPermalinkFilter;
|
refactor: drop lodash for post_permalink filter (#<I>)
|
hexojs_hexo
|
train
|
js
|
338a3e3bc0c3d84fd3fff7db59793a550b02fd04
|
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index <HASH>..<HASH> 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -11,6 +11,7 @@ require_relative "helpers/fakefs_helper"
require_relative "helpers/social_snippet_helper"
require "social_snippet/rspec/test_document"
require "social_snippet/rspec/test_storage"
+require "social_snippet/rspec/test_driver"
RSpec.configure do |config|
config.before(:example, :without_fakefs => true) do
|
test: load rspec/test_driver
|
social-snippet_social-snippet
|
train
|
rb
|
8f36891996d1fc623cb284e7b3c6f787197fd7f9
|
diff --git a/packages/ui-link/src/Link/styles.js b/packages/ui-link/src/Link/styles.js
index <HASH>..<HASH> 100644
--- a/packages/ui-link/src/Link/styles.js
+++ b/packages/ui-link/src/Link/styles.js
@@ -79,7 +79,8 @@ const generateStyle = (componentTheme, props, state) => {
? componentTheme.textDecorationWithinText
: componentTheme.textDecorationOutsideText,
'&:focus': {
- color: componentTheme.color
+ color: componentTheme.color,
+ outlineColor: componentTheme.focusOutlineColor
},
'&:hover, &:active': {
color: componentTheme.hoverColor,
|
fix(ui-link): fix link not displaying outline on focus
|
instructure_instructure-ui
|
train
|
js
|
c01dcfc2b63e82bf8d94fbdd46518ceddf3d4b00
|
diff --git a/src/Console/Command/SeederCommand.php b/src/Console/Command/SeederCommand.php
index <HASH>..<HASH> 100644
--- a/src/Console/Command/SeederCommand.php
+++ b/src/Console/Command/SeederCommand.php
@@ -97,6 +97,12 @@ class SeederCommand extends AbstractCommand
try {
foreach ($seed_collection as $table => $seed) {
+ if (class_exists($table, true)) {
+ $instance = app($table);
+ if ($instance instanceof \Bow\Database\Barry\Model) {
+ $table = $instance->getTable();
+ }
+ }
$n = Database::table($table)->insert($seed);
echo Color::green("$n seed".($n > 1 ? 's' : '')." on $table table\n");
diff --git a/src/Support/helper.php b/src/Support/helper.php
index <HASH>..<HASH> 100644
--- a/src/Support/helper.php
+++ b/src/Support/helper.php
@@ -1550,6 +1550,12 @@ if (!function_exists('seed')) {
}
foreach ($collection as $table => $seed) {
+ if (class_exists($table, true)) {
+ $instance = app($table);
+ if ($instance instanceof \Bow\Database\Barry\Model) {
+ $table = $instance->getTable();
+ }
+ }
DB::table($table)->insert($seed);
}
}
|
feat: add model reference to seeder
|
bowphp_framework
|
train
|
php,php
|
77b9897bc951d260d2e1b8bd27536b34d4c73914
|
diff --git a/routes/account.js b/routes/account.js
index <HASH>..<HASH> 100644
--- a/routes/account.js
+++ b/routes/account.js
@@ -114,6 +114,7 @@ function accountRoutes (server, options, next) {
validate: {
headers: validations.bearerTokenHeader,
payload: validations.accountPayload,
+ query: validations.accountQuery,
failAction: joiFailAction
}
},
|
fix(routes): PATCH /session/account?include=foobar
* * *
This commit was sponsored by Neighbourhoodie
You can hire Neighbourhoodie for all your
Hoodie / CouchDB / Offline First needs
<URL>
|
hoodiehq_hoodie-account-server
|
train
|
js
|
f58a3a18977586d27fca0e44776ab5f975c91a0c
|
diff --git a/lib/Bacon/App.php b/lib/Bacon/App.php
index <HASH>..<HASH> 100644
--- a/lib/Bacon/App.php
+++ b/lib/Bacon/App.php
@@ -96,11 +96,15 @@ class App
return $this->use_root_controller();
} else {
$this->controller_name = 'Controllers\\' . $this->router->route->join('\\');
+
+ if (!class_exists($this->controller_name)) {
+ throw new Exceptions\RouterException;
+ }
}
} catch (Exceptions\RouterException $e) {
$this->log->debug($e->getMessage());
-
+
if (!empty($this->config->spa)) {
# Route all not found controllers to root, if single page application
return $this->use_root_controller();
|
fix(router): throwing exception for route not found
|
Brainsware_bacon
|
train
|
php
|
ce5a460d8bd76134b10ae198f6ee3c8968e68289
|
diff --git a/commands/delete.go b/commands/delete.go
index <HASH>..<HASH> 100644
--- a/commands/delete.go
+++ b/commands/delete.go
@@ -86,7 +86,7 @@ func (c *DeleteCommand) deleteByPath(path string, quiet bool) ([]DeleteFailedCre
if !quiet {
succeeded := index + 1 - len(failedCredentials)
- fmt.Printf("\033[2K\r%v out of %v credentials under the provided path are successfully deleted.", succeeded, totalCount)
+ fmt.Printf("\033[2K\r%v out of %v credentials under the provided path are successfully deleted.\n", succeeded, totalCount)
}
}
return failedCredentials, totalCount, nil
|
feat: command finishes with newline
* otherwise the prompt comes back at the end of the message.
|
cloudfoundry-incubator_credhub-cli
|
train
|
go
|
e75297ca4d4f10d5656d120b0d5dd1abe94d7b25
|
diff --git a/src/foremast/utils/templates.py b/src/foremast/utils/templates.py
index <HASH>..<HASH> 100644
--- a/src/foremast/utils/templates.py
+++ b/src/foremast/utils/templates.py
@@ -52,9 +52,10 @@ def get_template_object(template_file=''):
try:
template = jinjaenv.get_template(template_file)
except jinja2.TemplateNotFound:
- LOG.debug("Unable to find template %s in specified template path %s", template_file, TEMPLATES_PATH)
- raise ForemastTemplateNotFound("Unable to find template %s in specified template path %s", template_file,
- TEMPLATES_PATH)
+ message = 'Unable to find template "{template_file}" in paths {paths}'.format(
+ template_file=template_file, paths=jinjaenv.loader.searchpath)
+ LOG.error(message)
+ raise ForemastTemplateNotFound(message)
return template
|
fix: Better ERROR when template not found
|
foremast_foremast
|
train
|
py
|
702931877b8a1cc41ccd89530d128d30785e8f04
|
diff --git a/src/View.js b/src/View.js
index <HASH>..<HASH> 100644
--- a/src/View.js
+++ b/src/View.js
@@ -17,7 +17,7 @@ var Cursor = require('./Cursor');
var CollectionBinder = require('./CollectionBinder');
var BinderMap = require('./BinderMap');
-var bindingRegex = /(?:([_.a-zA-Z0-9*-]+))(?:\(([@.a-zA-Z0-9*,\s-]+)*\))?((?::[a-zA-Z0-9]+(?:\((?:[^()]*)\))?)*)/g;
+var bindingRegex = /(?:([_\.a-zA-Z0-9*-]+))(?:\(([@\/.a-zA-Z0-9*,\s-]+)*\))?((?::[a-zA-Z0-9]+(?:\((?:[^()]*)\))?)*)/g;
var operatorsRegex = /:([a-zA-Z0-9]+)(?:\(([^()]*)\))?/g;
|
fix(View): allow / character in bindings computed function params
|
karfcz_kff
|
train
|
js
|
4e18a2d6ef15d66cd994339457ebd29601c0c322
|
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
@@ -154,6 +154,7 @@ function readFile(url, callback) {
}
done = true;
data.mtime = time;
+ stream.close();
triggerChange(data, body);
};
stream.on('data', function(text) {
|
feat: support to load rules from local file by @localFilePath
|
avwo_whistle
|
train
|
js
|
ade000cee41a2779e8e2aceee62e13c3c501cd4b
|
diff --git a/packages/generator-bolt/generators/component/templates/component.js b/packages/generator-bolt/generators/component/templates/component.js
index <HASH>..<HASH> 100644
--- a/packages/generator-bolt/generators/component/templates/component.js
+++ b/packages/generator-bolt/generators/component/templates/component.js
@@ -1,8 +1,8 @@
import { props, define, hasNativeShadowDomSupport } from '@bolt/core/utils';
-import { withLitHtml } from '@bolt/core/renderers/renderer-lit-html';
+import { withLitHtml, html } from '@bolt/core/renderers/renderer-lit-html';
import classNames from 'classnames/bind';
import styles from './<%= props.name.kebabCase %>.scss';
-import schema from '../<%= props.name.kebabCase %>.schema.yml';
+//import schema from '../<%= props.name.kebabCase %>.schema.yml'; //Todo: Uncomment when you will need schema
let cx = classNames.bind(styles);
@@ -25,7 +25,6 @@ class Bolt<%= props.name.pascalCase %> extends withLitHtml() {
constructor(self) {
self = super(self);
self.useShadow = hasNativeShadowDomSupport;
- self.schema = this.getModifiedSchema(schema);
return self;
}
|
fix: update component generator to be working as expected
|
bolt-design-system_bolt
|
train
|
js
|
dde69d82b39feb853b9aa93976d312b9daf1c0c2
|
diff --git a/superset/models/dashboard.py b/superset/models/dashboard.py
index <HASH>..<HASH> 100644
--- a/superset/models/dashboard.py
+++ b/superset/models/dashboard.py
@@ -156,7 +156,7 @@ class Dashboard( # pylint: disable=too-many-instance-attributes
]
def __repr__(self) -> str:
- return f"Dashboard<{self.slug or self.id}>"
+ return f"Dashboard<{self.id or self.slug}>"
@property
def table_names(self) -> str:
@@ -253,7 +253,7 @@ class Dashboard( # pylint: disable=too-many-instance-attributes
@cache.memoize(
# manage cache version manually
- make_name=lambda fname: f"{fname}-v2",
+ make_name=lambda fname: f"{fname}-v2.1",
timeout=config["DASHBOARD_CACHE_TIMEOUT"],
unless=lambda: not is_feature_enabled("DASHBOARD_CACHE"),
)
|
fix: use dashboard id for stable cache key (#<I>)
|
apache_incubator-superset
|
train
|
py
|
367599909ca268c412298bd80fcd283b516b8dd8
|
diff --git a/anyconfig/inputs.py b/anyconfig/inputs.py
index <HASH>..<HASH> 100644
--- a/anyconfig/inputs.py
+++ b/anyconfig/inputs.py
@@ -28,14 +28,14 @@ def is_input_obj(obj):
"""
:return: True if given something `obj` is a 'Input' namedtuple object.
- >>> assert is_input_obj(1) == False
- >>> assert is_input_obj("aaa") == False
- >>> assert is_input_obj({}) == False
+ >>> assert not is_input_obj(1)
+ >>> assert not is_input_obj("aaa")
+ >>> assert not is_input_obj({})
+ >>> assert not is_input_obj(('a', 1, {}))
>>> inp = Input("/etc/hosts", PATH_STR, "/etc/hosts", None, open)
>>> assert is_input_obj(inp)
"""
if isinstance(obj, tuple) and getattr(obj, "_asdict", False):
- # I don't think there is another way to do that.
return all(k in obj._asdict() for k in _INPUT_KEYS)
return False
|
refactor: simplify doctest cases and add one more to .inputs.is_input_obj
|
ssato_python-anyconfig
|
train
|
py
|
b9220994a6ca62a97a1e53dab2e1617663bc34a2
|
diff --git a/taskqueue/aws_queue_api.py b/taskqueue/aws_queue_api.py
index <HASH>..<HASH> 100644
--- a/taskqueue/aws_queue_api.py
+++ b/taskqueue/aws_queue_api.py
@@ -33,10 +33,14 @@ class AWSTaskQueueAPI(object):
@property
def enqueued(self):
- return int(self.status()['ApproximateNumberOfMessages'])
+ status = self.status()
+ return int(status['ApproximateNumberOfMessages']) + int(status['ApproximateNumberOfMessagesNotVisible'])
def status(self):
- resp = self._sqs.get_queue_attributes(QueueUrl=self._qurl, AttributeNames=['ApproximateNumberOfMessages'])
+ resp = self._sqs.get_queue_attributes(
+ QueueUrl=self._qurl,
+ AttributeNames=['ApproximateNumberOfMessages', 'ApproximateNumberOfMessagesNotVisible']
+ )
return resp['Attributes']
def insert(self, task):
|
fix: enqueued measures both visible and non-visible messages on aws
|
seung-lab_python-task-queue
|
train
|
py
|
ed1cdd230b7dbd1a9089c3e13eb7d55827b79d90
|
diff --git a/lib/engine_http.js b/lib/engine_http.js
index <HASH>..<HASH> 100644
--- a/lib/engine_http.js
+++ b/lib/engine_http.js
@@ -435,13 +435,20 @@ HttpEngine.prototype.compile = function compile(tasks, scenarioSpec, ee) {
initialContext._successCount = 0;
initialContext._jar = request.jar();
-
+ let keepAliveMsec = 30 * 1000;
+ if (self.config.http && self.config.http.keepAlive) {
+ keepAliveMsec = self.config.http.keepAlive * 1000;
+ }
+ let maxSockets = 1;
+ if (self.config.http && self.config.http.maxSockets) {
+ maxSockets = self.config.http.maxSockets;
+ }
if (!self.pool) {
let agentOpts = {
keepAlive: true,
- keepAliveMsecs: 1000,
- maxSockets: 1,
- maxFreeSockets: 1
+ keepAliveMsecs: keepAliveMsec,
+ maxSockets: maxSockets,
+ maxFreeSockets: maxSockets
};
// FIXME: This won't work if we have a pool - needs to be set in agentOptions
|
feat(http): Increase default keep alive timeout; allow agent config
- Default keep alive timeout is now <I>s
- Keep alive timeout may be configured via config.http.keepAlive
- Max number of sockets may be configured via config.http.maxSockets
|
artilleryio_artillery
|
train
|
js
|
0dc5d53ba38f1cce0d91cf87c695dd4e22d3c309
|
diff --git a/src/InfoViz/Core/SelectionProvider/histogram2d.js b/src/InfoViz/Core/SelectionProvider/histogram2d.js
index <HASH>..<HASH> 100644
--- a/src/InfoViz/Core/SelectionProvider/histogram2d.js
+++ b/src/InfoViz/Core/SelectionProvider/histogram2d.js
@@ -235,6 +235,7 @@ function get(model, query) {
function getNotificationData(model, request) {
const result = {};
let missingData = false;
+ const generationNumbers = [];
request.variables.forEach(axes => {
const histograms = get(model, { axes });
@@ -243,11 +244,21 @@ function getNotificationData(model, request) {
result[axes[0]] = {};
}
result[axes[0]][axes[1]] = histograms;
+ histograms.forEach(hist => generationNumbers.push(hist.annotationInfo.annotationGeneration));
} else {
missingData = true;
}
});
+ // Prevent generation mix in result
+ generationNumbers.sort();
+ const generation = generationNumbers.shift();
+ if (generationNumbers.length && generation !== generationNumbers.pop()) {
+ return null;
+ }
+
+ result['##annotationGeneration##'] = generation;
+
return missingData ? null : result;
}
|
fix(SelectionProvider): send notification only when histogram 2D have consistent annotation generati
|
Kitware_paraviewweb
|
train
|
js
|
a63add501a3b0271c323cea9c091a7ef79d38ed5
|
diff --git a/test/k8sT/DatapathConfiguration.go b/test/k8sT/DatapathConfiguration.go
index <HASH>..<HASH> 100644
--- a/test/k8sT/DatapathConfiguration.go
+++ b/test/k8sT/DatapathConfiguration.go
@@ -581,6 +581,19 @@ var _ = Describe("K8sDatapathConfig", func() {
testWireguard("cilium_vxlan")
})
+
+ It("Pod2pod is encrypted in tunneling mode with per-endpoint routes", func() {
+ deploymentManager.DeployCilium(map[string]string{
+ "tunnel": "vxlan",
+ "endpointRoutes.enabled": "true",
+ "encryption.enabled": "true",
+ "encryption.type": "wireguard",
+ "l7Proxy": "false",
+ }, DeployCiliumOptionsAndDNS)
+
+ testWireguard("cilium_vxlan")
+ })
+
})
Context("Sockops performance", func() {
|
test: Run WG with per-endpoint routes
Just to have confidence that nothing is broken with this setup.
|
cilium_cilium
|
train
|
go
|
13a6dd0e5423ffd4150f3c93800f74ea3f32a8a9
|
diff --git a/commitizen/commands/init.py b/commitizen/commands/init.py
index <HASH>..<HASH> 100644
--- a/commitizen/commands/init.py
+++ b/commitizen/commands/init.py
@@ -35,7 +35,6 @@ class Init:
out.info("cz bump --changelog")
out.success("The configuration are all set.")
else:
- # TODO: handle the case that config file exist but no value
out.line(f"Config file {self.config.path} already exists")
def _ask_config_path(self) -> str:
|
docs(init): remove unneeded TODO (the feature has been implemented)
|
Woile_commitizen
|
train
|
py
|
96eca1bdd7fe56c201ea83030154dd8bea6d3e3c
|
diff --git a/webapps/ui/tasklist/client/scripts/task/directives/cam-tasklist-task.js b/webapps/ui/tasklist/client/scripts/task/directives/cam-tasklist-task.js
index <HASH>..<HASH> 100644
--- a/webapps/ui/tasklist/client/scripts/task/directives/cam-tasklist-task.js
+++ b/webapps/ui/tasklist/client/scripts/task/directives/cam-tasklist-task.js
@@ -289,7 +289,7 @@ module.exports = [ function() {
if (!$scope.task || !$scope.taskExists) return;
taskResource.get($scope.task.id, function(err) {
- if (err) {
+ if (err && err.status === 404) {
$scope.taskExists = false;
$scope.$broadcast('taskremoved');
}
|
fix(task): keep task open when connection is disrupted
related to CAM-<I>
|
camunda_camunda-bpm-platform
|
train
|
js
|
6bb85bbbee2a4cd7e725728fc33b5f4cca3484a6
|
diff --git a/package.json b/package.json
index <HASH>..<HASH> 100644
--- a/package.json
+++ b/package.json
@@ -1,6 +1,6 @@
{
"name": "quasar-framework",
- "version": "0.12.1",
+ "version": "0.13.0",
"description": "Simultaneously build desktop/mobile SPA websites & phone/tablet apps with VueJS",
"main": "dist/quasar.common.js",
"jsnext:main": "dist/quasar.es6.js",
diff --git a/src/index.es6.js b/src/index.es6.js
index <HASH>..<HASH> 100644
--- a/src/index.es6.js
+++ b/src/index.es6.js
@@ -23,7 +23,7 @@ import Utils from './utils'
import { LocalStorage, SessionStorage } from './features/web-storage'
let Quasar = {
- version: '0.12.1',
+ version: '0.13.0',
install,
start,
theme
diff --git a/src/index.js b/src/index.js
index <HASH>..<HASH> 100644
--- a/src/index.js
+++ b/src/index.js
@@ -23,7 +23,7 @@ import Utils from './utils'
import { LocalStorage, SessionStorage } from './features/web-storage'
let Quasar = {
- version: '0.12.1',
+ version: '0.13.0',
install,
start,
theme,
|
chore: Bump future version to <I> (instead of <I>) due to so many novelties
|
quasarframework_quasar
|
train
|
json,js,js
|
68952efc5b59618b5d660f34f834aa2a2ff533df
|
diff --git a/test/repository.spec.js b/test/repository.spec.js
index <HASH>..<HASH> 100644
--- a/test/repository.spec.js
+++ b/test/repository.spec.js
@@ -255,7 +255,7 @@ describe('Repository', function() {
it('should show repo collaborators', function(done) {
remoteRepo.getCollaborators(assertSuccessful(done, function(err, collaborators) {
if (!(collaborators instanceof Array)) {
- console.log(collaborator); // eslint-disable-line
+ console.log(collaborators); // eslint-disable-line
}
expect(collaborators).to.be.an.array();
expect(collaborators).to.have.length(1);
|
chore: fix loggining to determine why collaborators test fails sometimes
|
github-tools_github
|
train
|
js
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.