浏览代码

ci(test): add write-permission for prs (#2417)

kylo252 3 年之前
父节点
当前提交
b892b97708
共有 5 个文件被更改,包括 36 次插入19 次删除
  1. 5 0
      .github/workflows/format.yaml
  2. 5 0
      .github/workflows/install.yaml
  3. 5 0
      .github/workflows/lint.yaml
  4. 5 1
      .github/workflows/plugins.yml
  5. 16 18
      lua/lvim/core/info.lua

+ 5 - 0
.github/workflows/format.yaml

@@ -4,6 +4,11 @@ on:
   pull_request:
     branches:
       - "rolling"
+    paths:
+      - 'lua/**'
+      - 'snapshots/**'
+      - 'tests/**'
+      - 'utils/**'
 
 jobs:
   stylua-check:

+ 5 - 0
.github/workflows/install.yaml

@@ -5,6 +5,11 @@ on:
     branches:
       - "master"
       - "rolling"
+    paths:
+      - 'lua/**'
+      - 'snapshots/**'
+      - 'tests/**'
+      - 'utils/**'
 
 jobs:
   unixish:

+ 5 - 0
.github/workflows/lint.yaml

@@ -4,6 +4,11 @@ on:
   pull_request:
     branches:
       - "rolling"
+    paths:
+      - 'lua/**'
+      - 'snapshots/**'
+      - 'tests/**'
+      - 'utils/**'
 
 jobs:
   lua-linter:

+ 5 - 1
.github/workflows/plugins.yml

@@ -13,13 +13,17 @@ on:
         - warning
         - debug
   schedule:
-    - cron: "30 18 * * 1,5"
+    # note: this will keep updating the existing branch
+    - cron: "*/15 10-14 * * 0,6"
+    - cron: "0 14 * * 1-5"
 
 jobs:
   plugins-version-bump:
     runs-on: ubuntu-latest
+    continue-on-error: true
     permissions:
       contents: write
+      pull-requests: write
     steps:
       - uses: actions/checkout@v2
         with:

+ 16 - 18
lua/lvim/core/info.lua

@@ -161,24 +161,22 @@ function M.toggle_popup(ft)
   local content_provider = function(popup)
     local content = {}
 
-    for _, section in
-      ipairs {
-        M.banner,
-        { "" },
-        { "" },
-        header,
-        { "" },
-        lsp_info,
-        { "" },
-        override_info,
-        { "" },
-        formatters_info,
-        { "" },
-        linters_info,
-        { "" },
-        code_actions_info,
-      }
-    do
+    for _, section in ipairs {
+      M.banner,
+      { "" },
+      { "" },
+      header,
+      { "" },
+      lsp_info,
+      { "" },
+      override_info,
+      { "" },
+      formatters_info,
+      { "" },
+      linters_info,
+      { "" },
+      code_actions_info,
+    } do
       vim.list_extend(content, section)
     end