Squashed 'users/daniel/configs/system/nvim/nvim/' content from commit e088bce
git-subtree-dir: users/daniel/configs/system/nvim/nvim git-subtree-split: e088bce2bd90c0b5c35d13a8615a55455b96294d
This commit is contained in:
35
.github/workflows/updater.yml
vendored
Normal file
35
.github/workflows/updater.yml
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
name: Updater Comment
|
||||
|
||||
on:
|
||||
pull_request_target:
|
||||
paths: ["**.lua"]
|
||||
types: ["opened"]
|
||||
|
||||
jobs:
|
||||
updater-comment:
|
||||
name: Comment updater settings
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/github-script@v6
|
||||
with:
|
||||
script: |
|
||||
const src = context.payload.pull_request.head
|
||||
const user = src.user.login
|
||||
const tab = " "
|
||||
let settings = tab + "updater = {\n" + tab + tab + `channel = "nightly",\n`
|
||||
if (src.ref != "nightly") {
|
||||
settings += tab + tab + `branch = "${src.ref}",\n`
|
||||
}
|
||||
if (user != "AstroNvim") {
|
||||
settings += tab + tab + `remote = "${user}",\n`
|
||||
settings += tab + tab + `remotes = {\n`
|
||||
settings += tab + tab + tab + `["${user}"] = "${user}/${src.repo.name}",\n`
|
||||
settings += tab + tab + `},\n`
|
||||
}
|
||||
settings += tab + "},"
|
||||
github.rest.issues.createComment({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
body: "Use the following `updater` settings in your `user/init.lua` file, restart, and run `:AstroUpdate` to test this pull request:\n```\n" + settings + "\n```",
|
||||
})
|
||||
Reference in New Issue
Block a user