1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-03-13 02:05:40 +08:00

docs(wiki): update following HEAD page

This commit is contained in:
Shidong Wang 2021-10-30 00:45:04 +08:00
parent d4597c97d0
commit 689fafccf1
No known key found for this signature in database
GPG Key ID: 41BB7053E835C848
3 changed files with 117 additions and 172 deletions

View File

@ -10,53 +10,16 @@ let s:AUTODOC = SpaceVim#api#import('dev#autodoc')
let s:AUTODOC.begin = '^<!-- SpaceVim follow HEAD en start -->$'
let s:AUTODOC.end = '^<!-- SpaceVim follow HEAD en end -->$'
function! s:generate_content() abort
let content = s:follow_head_content()
function! s:generate_content(lang) abort
let content = SpaceVim#dev#releases#parser_prs(a:lang)
return content
endfunction
let s:AUTODOC.content_func = function('s:generate_content')
let s:AUTODOC.autoformat = 1
let s:lang = 'en'
function! SpaceVim#dev#followHEAD#update(lang) abort
let s:lang = a:lang
call s:AUTODOC.update()
call s:AUTODOC.update(a:lang)
endfunction
function! s:list_closed_prs(owner, repo, page) abort
return github#api#util#Get('repos/' . a:owner . '/' . a:repo . '/issues?state=closed&page=' . a:page , [])
endfunction
function! s:get_list_of_PRs() abort
let prs = []
for i in range(1, 2)
let issues = s:list_closed_prs('SpaceVim','SpaceVim', i)
call extend(prs,
\ filter(issues,
\ "v:val['number'] > "
\ . SpaceVim#dev#releases#last_release_number()
\ . " && v:val['number'] < "
\ . SpaceVim#dev#releases#current_release_number()
\ . " && index(SpaceVim#dev#releases#unmerged_prs_since_current_release(), v:val['number']) == -1 "
\ ))
endfor
for i in SpaceVim#dev#releases#get_unmerged_prs()
let pr = github#api#issues#Get_issue('SpaceVim', 'SpaceVim', i)
if get(pr, 'state', '') ==# 'closed'
call add(prs, pr)
endif
endfor
return filter(prs, "has_key(v:val, 'pull_request')")
endfunction
let s:prs = []
function! s:follow_head_content() abort
let md = []
if s:prs == []
let s:prs =s:get_list_of_PRs()
endif
let md = md + SpaceVim#dev#releases#parser_prs(s:prs, s:lang)
return md
endfunction

View File

@ -8,52 +8,15 @@
scriptencoding utf-8
" 2017-08-05 v0.4.0 is released at https://github.com/SpaceVim/SpaceVim/pull/768
" 2017-11-16 v0.5.0 is released at https://github.com/SpaceVim/SpaceVim/pull/966
" v0.6.0 is released at https://github.com/SpaceVim/SpaceVim/pull/1205
" v0.7.0 is released at https://github.com/SpaceVim/SpaceVim/pull/1610
" v0.8.0 is released at https://github.com/SpaceVim/SpaceVim/pull/1841
" 2018-09-26 v0.9.0 is released at https://github.com/SpaceVim/SpaceVim/pull/2203
" 2018-12-25 v1.0.0 is released at https://github.com/SpaceVim/SpaceVim/pull/2377
" 2019-04-08 v1.1.0 is released at https://github.com/SpaceVim/SpaceVim/pull/2726
" 2019-07-17 v1.2.0 is released at https://github.com/SpaceVim/SpaceVim/pull/2947
" 2020-04-05 v1.4.0 is released at https://github.com/SpaceVim/SpaceVim/pull/3432
" 2020-08-01 v1.5.0 is released at https://github.com/SpaceVim/SpaceVim/pull/3678
" 2020-12-31 v1.6.0 is released at https://github.com/SpaceVim/SpaceVim/pull/4019
" 2021-06-14 v1.7.0 is released at https://github.com/SpaceVim/SpaceVim/pull/4258
let s:log_pretty = 'tformat:%h%- %s'
" these options can be changed when going to release new tag
let s:last_release_number = 4258
" 这是所有 ID 小于上一次 release ID并且还未被合并的 ID在新的release
" 之后,需要把已经合并了的删除!
let s:unmerged_prs_since_last_release = [
\ 4283, 4272, 4253, 4217, 4211, 4186, 4175, 4158, 4098, 4087, 4059, 3966, 3965, 3869, 3865, 3864, 3810, 3794, 3739, 3713, 3660, 3656, 3650, 3638, 3636, 3529, 3445, 3170, 2984, 2910, 2825, 2407
\ ]
" 当要新建一个 release 时修改为该release 的ID通常为 -1。
let s:current_release_number = -1
" this is a list of pull request number which > last_release_number and <
" current_release_number
" next time when I release v1.1.0, only need to update following option
let s:unmerged_prs_since_current_release = []
" the logic should be from last_release_number to current_release_number,
" include prs in unmerged_prs_since_last_release which is merged.
" exclude prs in unmerged_prs_since_current_release
function! SpaceVim#dev#releases#get_unmerged_prs() abort
return deepcopy(s:unmerged_prs_since_last_release)
function! s:get_logs() abort
let cmd = ['git', 'log', '--graph', '--date=relative', '--pretty=' . s:log_pretty] + ['v1.8.0..HEAD']
return systemlist(cmd)
endfunction
function! SpaceVim#dev#releases#last_release_number() abort
return s:last_release_number
endfunction
function! SpaceVim#dev#releases#current_release_number() abort
return s:current_release_number > 0 ? s:current_release_number : 999999
endfunction
function! SpaceVim#dev#releases#unmerged_prs_since_current_release() abort
return s:unmerged_prs_since_current_release
function! Tget() abort
return s:get_logs()
endfunction
function! s:body() abort
@ -80,97 +43,67 @@ function! SpaceVim#dev#releases#open() abort
endif
endfunction
function! s:list_closed_prs(owner, repo, page) abort
return github#api#util#Get('repos/' . a:owner . '/' . a:repo . '/issues?state=closed&page=' . a:page , [])
endfunction
function! s:get_list_of_PRs() abort
let prs = []
for i in range(1, 20)
let issues = s:list_closed_prs('SpaceVim','SpaceVim', i)
call extend(prs,
\ filter(issues,
\ "v:val['number'] > "
\ . s:last_release_number
\ . " && v:val['number'] < "
\ . s:current_release_number
\ . " && index(s:unmerged_prs_since_current_release, v:val['number']) == -1 "
\ ))
" remove
" !empty(get(v:val, 'merged_at', ''))
" @ todo add a way to check if the pr is merged
endfor
for i in s:unmerged_prs_since_last_release
let pr = github#api#issues#Get_issue('SpaceVim', 'SpaceVim', i)
if get(pr, 'state', '') ==# 'closed'
call add(prs, pr)
endif
endfor
return filter(prs, "has_key(v:val, 'pull_request')")
endfunction
function! s:pr_to_list(pr) abort
return '- ' . a:pr.title . ' [#' . a:pr.number . '](' . a:pr.html_url . ')'
endfunction
let s:prs = []
function! SpaceVim#dev#releases#content() abort
let md = [
\ '### SpaceVim release ' . g:spacevim_version
\ ]
if s:prs == []
let s:prs =s:get_list_of_PRs()
endif
let md = md + SpaceVim#dev#releases#parser_prs(s:prs, 'en')
let md = md + SpaceVim#dev#releases#parser_prs(s:get_logs(), 'en')
return join(md, "\n")
endfunction
" this function is to generate markdown form pull request list
function! SpaceVim#dev#releases#parser_prs(prs, ...) abort
function! SpaceVim#dev#releases#parser_prs(...) abort
let is_cn = get(a:000, 0, '') ==# 'cn'
let g:is_cn = is_cn
let md = []
let adds = []
let changes = []
let fixs = []
let others = []
for pr in a:prs
if pr.title =~? '^ADD'
call add(adds, s:pr_to_list(pr))
elseif pr.title =~? '^CHANGE'
call add(changes, s:pr_to_list(pr))
elseif pr.title =~? '^FIX'
call add(fixs, s:pr_to_list(pr))
else
call add(others, s:pr_to_list(pr))
endif
let feat = []
let fix = []
let docs = []
let doc = []
let style = []
let refactor = []
let pref = []
let test = []
let build = []
let ci = []
let chore = []
let revert = []
for log in s:get_logs()
let type = matchstr(log, '^\*\s\+\S*\s\zs[a-z]*')
try
exe printf('call add(%s, "%s")', type, log)
catch
endtry
endfor
if !empty(adds)
call add(md, '')
call add(md, is_cn ? '#### 新特性' : '#### New Features')
call add(md, '')
call extend(md, adds)
call add(md, '')
endif
if !empty(changes)
call add(md, '')
call add(md, is_cn ? '#### 改变' : '#### Feature Changes')
call add(md, '')
call extend(md, changes)
call add(md, '')
endif
if !empty(fixs)
call add(md, '')
call add(md, is_cn ? '#### 问题修复' : '#### Bug Fixs')
call add(md, '')
call extend(md, fixs)
call add(md, '')
endif
if !empty(others)
call add(md, '')
call add(md, is_cn ? '#### 未知' : '#### Unmarked PRs')
call add(md, '')
call extend(md, others)
call add(md, '')
endif
return md
let md = []
call add(md, is_cn ? '#### 新特性' : '#### New Features')
let md = md + feat
call add(md, is_cn ? '#### 问题修复' : '#### Bug Fixs')
let md = md + fix
"
" - if !empty(adds)
" - call add(md, '')
" - call add(md, '')
" - call extend(md, adds)
" - call add(md, '')
" - endif
" - if !empty(changes)
" - call add(md, '')
" - call add(md, is_cn ? '#### 改变' : '#### Feature Changes')
" - call add(md, '')
" - call extend(md, changes)
" - call add(md, '')
" - endif
" - if !empty(fixs)
" - call add(md, '')
" - call add(md, '')
" - call extend(md, fixs)
" - call add(md, '')
" - endif
" - if !empty(others)
" - call add(md, '')
" - call add(md, is_cn ? '#### 未知' : '#### Unmarked PRs')
" - call add(md, '')
" - call extend(md, others)
" - call add(md, '')
" - endif
return md
endfunction

View File

@ -11,13 +11,62 @@ The next release is v1.9.0:
#### New Features
- be7d6130 feat(logger): add syntax highlighting for runtime log
- 1ff40354 feat(help): add help description for `SPC b d`
- 93d8a153 feat(ssh): change ssh tab name to SSH(user@ip:port)
- cefb3756 feat(mail): add function to view mail context
- 6adb53df feat(mail): improve vim-mail plugin
- 5ec1b3be feat(mail): add login & password option
- 31ab74f8 feat(mail): add mail layer option
- fa43ef20 feat(mail): use bundle vim-mail
- 04e4b3d1 feat(format): add vim-codefmt support
- 83aa15f1 feat(edit): support fullwidth vertical bar
- 3f872452 feat(ssh): add `ssh` layer
- 5c68676c feat(lang#go): add lsp support for golang
- 5f4b6798 feat(git): add omnifunc for git commit buffer
- 2b40c524 feat(lang#julia): add lsp key bindings for julia
- da40455f feat(lang#rust): add more lsp key bindings for rust
- 773aa07b feat(lang#javascript): add more lsp key bindings
- 6ad6022d feat(unicode#box, lsp): improve drawing_box() && workspace viewer
- cc73d9dd feat(lsp): add vim-language-server command
- 5b76a80c feat(lsp): use `unicode#box` api to display workspace list
- 35bdf0da feat(lsp): make SPC e c support to clear diagnostics
- aa3deb1f feat(lang#python): add `g D` to jump type definition
- 309728bc feat(lang#python): add more lsp key bindings
- 55365f64 feat(`checkers`): support lsp diagnostic jumping
- c6156bf7 feat(`lang#vim`): add workspace related key bindings
- e8a75bc7 feat(`lang#vim`): add `SPC l s` key binding
- 9d374eaa feat(`lang#vim`): add `SPC l x` key binding
- 22b663b5 feat(layer): add `treesitter` layer
- da18ba0a feat(lsp): add neovim-lsp (#4319)
- 516e0525 feat(core): update to v1.9.0-dev
### Feature Changes
### Bug Fixs
#### Bug Fixs
- 4a2e19fa fix(windisk): fix `s:open_disk` function
- 5d9a0975 fix(lang#python): fix typo in coverage key bindings
- 41740374 fix(chat): fix message handler
- 7b77ec76 fix(chat): fix close windows key binding
- 18dd27e2 fix(chat): fix server database path
- 7797732b fix(chat): fix chatting server port
- cf1b82ef fix(chat): include test files
- 17aac814 fix(mail): fix date format
- 1cc4282c fix(mail): fix mail logger
- 66b253e9 fix(core): fix neovim-qt welcome page
- 7f0b6651 fix(core): fix parser_argv function
- a41fc80e fix(ssh): fix layer test
- cf9b7c08 fix(flygrep): save previous windows id
- 0d2f9082 fix(lang#c): fix `clang_std` option
- 63c2bbf5 fix(flygrep): fix replace mode of flygrep
- 1127b6aa fix(bundle): fix bundle ident-blacnkline
- 53e2a5cd fix(colorscheme): fix VertSplit highlight of colorscheme `one`
- 4e0f3529 fix(lang#lua): fix unknown variable
- a7bedbc5 fix(flygrep): fix flygrep replace mode with grep command
- 82d36bb8 fix(lsp): avoid unknown function error
- 6767f4da fix(checkers): clear lsp diagnostics for normal buffer
- c32aa6f2 fix(`lsp`): fix lsp support in nvim
- 43fc0e8d fix(lang#vim): fix `lang#vim` layer key bindings
- 57211cc4 fix(treesitter): fix layer test
<!-- SpaceVim follow HEAD en end -->
## Latest Release