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:
25
25
26
26
- name : Get plugins info
27
27
run : |
28
- OLD=" $(
28
+ OLD_PLUGINS= $(
29
29
nix eval 'github:${{ github.repository }}/${{ github.event.before }}#nixvimConfiguration.options.plugins' \
30
30
--apply 'builtins.attrNames' \
31
31
--json
32
- )"
33
- NEW=" $(
32
+ )
33
+ NEW_PLUGINS= $(
34
34
nix eval '.#nixvimConfiguration.options.plugins' \
35
35
--apply 'builtins.attrNames' \
36
36
--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
39
58
40
59
- name : Get PR info
41
60
env :
42
61
GH_TOKEN : ${{ github.token }}
43
62
run : |
44
- if JSON=" $(
63
+ if JSON=$(
45
64
gh api \
46
65
-H "Accept: application/vnd.github+json" \
47
66
-H "X-GitHub-Api-Version: 2022-11-28" \
48
67
/repos/${{ github.repository }}/commits/${{ github.sha }}/pulls
49
- )"
68
+ )
50
69
then
51
70
# TODO: use PR info
52
71
else
You can’t perform that action at this time.
0 commit comments