Skip to content

Commit 32cc3fb

Browse files
authored
Merge branch 'main' into add_some_headings
2 parents e156a9b + a354636 commit 32cc3fb

File tree

3 files changed

+36
-22
lines changed

3 files changed

+36
-22
lines changed

modules/indexer/code/bleve.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import (
2727
"github.com/blevesearch/bleve/v2"
2828
analyzer_custom "github.com/blevesearch/bleve/v2/analysis/analyzer/custom"
2929
analyzer_keyword "github.com/blevesearch/bleve/v2/analysis/analyzer/keyword"
30+
"github.com/blevesearch/bleve/v2/analysis/token/camelcase"
3031
"github.com/blevesearch/bleve/v2/analysis/token/lowercase"
3132
"github.com/blevesearch/bleve/v2/analysis/token/unicodenorm"
3233
"github.com/blevesearch/bleve/v2/analysis/tokenizer/unicode"
@@ -107,7 +108,7 @@ func (d *RepoIndexerData) Type() string {
107108
const (
108109
repoIndexerAnalyzer = "repoIndexerAnalyzer"
109110
repoIndexerDocType = "repoIndexerDocType"
110-
repoIndexerLatestVersion = 5
111+
repoIndexerLatestVersion = 6
111112
)
112113

113114
// createBleveIndexer create a bleve repo indexer if one does not already exist
@@ -138,7 +139,7 @@ func createBleveIndexer(path string, latestVersion int) (bleve.Index, error) {
138139
"type": analyzer_custom.Name,
139140
"char_filters": []string{},
140141
"tokenizer": unicode.Name,
141-
"token_filters": []string{unicodeNormalizeName, lowercase.Name},
142+
"token_filters": []string{unicodeNormalizeName, camelcase.Name, lowercase.Name},
142143
}); err != nil {
143144
return nil, err
144145
}

modules/indexer/issues/bleve.go

+3-2
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import (
1515

1616
"github.com/blevesearch/bleve/v2"
1717
"github.com/blevesearch/bleve/v2/analysis/analyzer/custom"
18+
"github.com/blevesearch/bleve/v2/analysis/token/camelcase"
1819
"github.com/blevesearch/bleve/v2/analysis/token/lowercase"
1920
"github.com/blevesearch/bleve/v2/analysis/token/unicodenorm"
2021
"github.com/blevesearch/bleve/v2/analysis/tokenizer/unicode"
@@ -27,7 +28,7 @@ import (
2728
const (
2829
issueIndexerAnalyzer = "issueIndexer"
2930
issueIndexerDocType = "issueIndexerDocType"
30-
issueIndexerLatestVersion = 1
31+
issueIndexerLatestVersion = 2
3132
)
3233

3334
// indexerID a bleve-compatible unique identifier for an integer id
@@ -134,7 +135,7 @@ func createIssueIndexer(path string, latestVersion int) (bleve.Index, error) {
134135
"type": custom.Name,
135136
"char_filters": []string{},
136137
"tokenizer": unicode.Name,
137-
"token_filters": []string{unicodeNormalizeName, lowercase.Name},
138+
"token_filters": []string{unicodeNormalizeName, camelcase.Name, lowercase.Name},
138139
}); err != nil {
139140
return nil, err
140141
}

web_src/js/components/RepoActionView.vue

+30-18
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,20 @@
1212
<div class="action-view-left">
1313
<div class="job-group-section">
1414
<div class="job-brief-list">
15-
<a class="job-brief-item" v-for="(job, index) in run.jobs" :key="job.id" :href="run.link+'/jobs/'+index">
16-
<SvgIcon name="octicon-check-circle-fill" class="green" v-if="job.status === 'success'"/>
17-
<SvgIcon name="octicon-skip" class="ui text grey" v-else-if="job.status === 'skipped'"/>
18-
<SvgIcon name="octicon-clock" class="ui text yellow" v-else-if="job.status === 'waiting'"/>
19-
<SvgIcon name="octicon-blocked" class="ui text yellow" v-else-if="job.status === 'blocked'"/>
20-
<SvgIcon name="octicon-meter" class="ui text yellow" class-name="job-status-rotate" v-else-if="job.status === 'running'"/>
21-
<SvgIcon name="octicon-x-circle-fill" class="red" v-else/>
22-
{{ job.name }}
23-
<!-- TODO: it will be a better idea to move "button" out from "a", and the ".prevent" will not be needed. But it needs some work with CSS -->
24-
<button class="job-brief-rerun" @click.prevent="rerunJob(index)" v-if="job.canRerun">
15+
<div class="job-brief-item" v-for="(job, index) in run.jobs" :key="job.id">
16+
<a class="job-brief-link" :href="run.link+'/jobs/'+index">
17+
<SvgIcon name="octicon-check-circle-fill" class="green" v-if="job.status === 'success'"/>
18+
<SvgIcon name="octicon-skip" class="ui text grey" v-else-if="job.status === 'skipped'"/>
19+
<SvgIcon name="octicon-clock" class="ui text yellow" v-else-if="job.status === 'waiting'"/>
20+
<SvgIcon name="octicon-blocked" class="ui text yellow" v-else-if="job.status === 'blocked'"/>
21+
<SvgIcon name="octicon-meter" class="ui text yellow" class-name="job-status-rotate" v-else-if="job.status === 'running'"/>
22+
<SvgIcon name="octicon-x-circle-fill" class="red" v-else/>
23+
<span class="ui text">{{ job.name }}</span>
24+
</a>
25+
<button class="job-brief-rerun" @click="rerunJob(index)" v-if="job.canRerun">
2526
<SvgIcon name="octicon-sync" class="ui text black"/>
2627
</button>
27-
</a>
28+
</div>
2829
</div>
2930
</div>
3031
</div>
@@ -291,15 +292,15 @@ export function initRepositoryActionView() {
291292
292293
.action-view-header {
293294
margin: 0 20px 20px 20px;
294-
button.run_cancel {
295+
.run_cancel {
295296
border: none;
296297
color: var(--color-red);
297298
background-color: transparent;
298299
outline: none;
299300
cursor: pointer;
300301
transition:transform 0.2s;
301302
};
302-
button.run_cancel:hover{
303+
.run_cancel:hover{
303304
transform:scale(130%);
304305
};
305306
}
@@ -327,26 +328,37 @@ export function initRepositoryActionView() {
327328
}
328329
329330
.job-brief-list {
330-
a.job-brief-item {
331-
display: block;
331+
.job-brief-item {
332332
margin: 5px 0;
333333
padding: 10px;
334334
background: var(--color-info-bg);
335335
border-radius: 5px;
336336
text-decoration: none;
337-
button.job-brief-rerun {
337+
display: flex;
338+
justify-items: center;
339+
flex-wrap: nowrap;
340+
.job-brief-rerun {
338341
float: right;
339342
border: none;
340343
background-color: transparent;
341344
outline: none;
342345
cursor: pointer;
343346
transition:transform 0.2s;
344347
};
345-
button.job-brief-rerun:hover{
348+
.job-brief-rerun:hover{
346349
transform:scale(130%);
347350
};
351+
.job-brief-link {
352+
flex-grow: 1;
353+
display: flex;
354+
span {
355+
margin-right: 8px;
356+
display: flex;
357+
align-items: center;
358+
}
359+
}
348360
}
349-
a.job-brief-item:hover {
361+
.job-brief-item:hover {
350362
background-color: var(--color-secondary);
351363
}
352364
}

0 commit comments

Comments
 (0)