Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/multi-labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
version: v1

# This file adds labels based on the scopes in
# keymanapp/keyman:resources/scopes/commit-types.json
# Currently it must be manually kept up to date. Not all labels are added, only
# common ones. The others are commented out.


labels:
#
# conventional commit / semantic PR styles
#

- label: 'auto'
matcher:
title: '^auto(\(|:)'
- label: 'change'
matcher:
title: '^change(\(|:)'
- label: 'chore'
matcher:
title: '^chore(\(|:)'
- label: 'docs'
matcher:
title: '^docs(\(|:)'
- label: 'feat'
matcher:
title: '^feat(\(|:)'
- label: 'fix'
matcher:
title: '^fix(\(|:)'
- label: 'maint'
matcher:
title: '^maint(\(|:)'
- label: 'refactor'
matcher:
title: '^refactor(\(|:)'
- label: 'style'
matcher:
title: '^style(\(|:)'
- label: 'test'
matcher:
title: '^test(\(|:)'
15 changes: 15 additions & 0 deletions .github/workflows/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: "Pull Request Labeler"
on:
- pull_request

jobs:
triage:
if: github.repository == 'keymanapp/api.keyman.com'
runs-on: ubuntu-latest
steps:
- name: Update labels based on PR title
id: labeler
uses: fuxingloh/multi-labeler@f5bd7323b53b0833c1e4ed8d7b797ae995ef75b4 # v2.0.1
with:
github-token: ${{secrets.GITHUB_TOKEN}}
config-path: .github/multi-labeler.yml
37 changes: 37 additions & 0 deletions tools/db/build/build.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ function BuildDatabase($DBDataSources, $schema, $do_force) {
$this->sqlrun(dirname(__FILE__)."/full-text-indexes.sql", false, false);
$this->sqlrun(dirname(__FILE__)."/search-queries.sql");

$this->waitForFullTextIndexing();

// Run scripts for all views automatically
$scripts = glob(__DIR__ . '/v_*.sql');
foreach($scripts as $script) {
Expand All @@ -107,6 +109,41 @@ function BuildDatabase($DBDataSources, $schema, $do_force) {
return true;
}

private function waitForFullTextIndexing() {
$dci = new DatabaseConnectionInfo();

try {
$mssql = new PDO(
$dci->getConnectionString(),
$this->schema,
$dci->getPassword(),
[ "CharacterSet" => "UTF-8" ]);
$mssql->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );
$mssql->setAttribute( PDO::SQLSRV_ATTR_DIRECT_QUERY, true);
$mssql->setAttribute( PDO::SQLSRV_ATTR_ENCODING, PDO::SQLSRV_ENCODING_UTF8 );
}
catch( PDOException $e ) {
die( "Error connecting to SQL Server: " . $e->getMessage() );
}

$stmt = $mssql->prepare("select * from sys.fulltext_indexes where has_crawl_completed=0");
if(!$stmt->execute()) {
die( "Error checking Full Text Indexing status" );
}
$data = $stmt->fetchAll();

while(count($data) > 0) {
echo "Full Text Indexing not complete, waiting 3 seconds\n";
sleep(3);
if(!$stmt->execute()) {
die( "Error checking Full Text Indexing status" );
}
$data = $stmt->fetchAll();
}

echo "Full Text Indexing is now complete\n";
}

function buildDBDataSources($data_path, DBDataSources $DBDataSources) {
$sql = '';

Expand Down