File tree Expand file tree Collapse file tree 1 file changed +26
-7
lines changed Expand file tree Collapse file tree 1 file changed +26
-7
lines changed Original file line number Diff line number Diff line change @@ -25,28 +25,47 @@ jobs:
2525
2626 - name : Get plugins info
2727 run : |
28- OLD=" $(
28+ OLD_PLUGINS= $(
2929 nix eval 'github:${{ github.repository }}/${{ github.event.before }}#nixvimConfiguration.options.plugins' \
3030 --apply 'builtins.attrNames' \
3131 --json
32- )"
33- NEW=" $(
32+ )
33+ NEW_PLUGINS= $(
3434 nix eval '.#nixvimConfiguration.options.plugins' \
3535 --apply 'builtins.attrNames' \
3636 --json
37- )"
38- # TODO: compare OLD and NEW
37+ )
38+ OLD_COLORSCHEMES=$(
39+ nix eval 'github:${{ github.repository }}/${{ github.event.before }}#nixvimConfiguration.options.colorschemes' \
40+ --apply 'builtins.attrNames' \
41+ --json
42+ )
43+ NEW_COLORSCHEMES=$(
44+ nix eval '.#nixvimConfiguration.options.colorschemes' \
45+ --apply 'builtins.attrNames' \
46+ --json
47+ )
48+ PLUGIN_JSON="{ \"old\": $OLD_PLUGINS, \"new\": $NEW_PLUGINS }"
49+ COLORSCHEME_JSON="{ \"old\": $OLD_COLORSCHEMES, \"new\": $NEW_COLORSCHEMES }"
50+
51+ # Compare OLD and NEW
52+ PLUGINS_ADDED=$(echo "$PLUGIN_JSON" | jq '.new-.old')
53+ PLUGINS_REMOVED=$(echo "$PLUGIN_JSON" | jq '.old-.new')
54+ COLORSCHEMES_ADDED=$(echo "$COLORSCHEME_JSON" | jq '.new-.old')
55+ COLORSCHEMES_REMOVED=$(echo "$COLORSCHEME_JSON" | jq '.old-.new')
56+
57+ # TODO: write to GITHUB_OUTPUT
3958
4059 - name : Get PR info
4160 env :
4261 GH_TOKEN : ${{ github.token }}
4362 run : |
44- if JSON=" $(
63+ if JSON=$(
4564 gh api \
4665 -H "Accept: application/vnd.github+json" \
4766 -H "X-GitHub-Api-Version: 2022-11-28" \
4867 /repos/${{ github.repository }}/commits/${{ github.sha }}/pulls
49- )"
68+ )
5069 then
5170 # TODO: use PR info
5271 else
You can’t perform that action at this time.
0 commit comments