Skip to content

Commit 7b630c9

Browse files
authored
action fixes (mongodb#43)
1 parent 8e02d87 commit 7b630c9

17 files changed

+28
-288
lines changed

.github/workflows/Remove-Function-Name-Prefix.yml

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,31 @@ name: Remove Function Name Prefixes
22

33
on:
44
workflow_call:
5-
pull_request:
5+
push:
66

77
jobs:
88
remove-function-prefix:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v3
1212
- run: |
13-
git pull origin ${{ github.head_ref }} --rebase
13+
git pull origin ${{ github.ref }}
1414
for file in $(find ./snippets/functions/ -type f -name '*.js'); do
1515
if [[ "$file" == *"_"* ]];then
1616
justfile=$(basename -- "$file")
1717
justpath=$(dirname "$file")
18-
# echo $justfile
1918
justfile="${justfile#*_}"
20-
echo $justpath/$justfile
19+
echo "was:" $file
20+
echo "saving as" $justpath/$justfile
2121
mv -n $file $justpath/$justfile
2222
fi
2323
done
24-
git config --global user.email "[email protected]"
25-
git config --global user.name "ActionBot"
26-
git commit --amend --no-edit -m 'remove function name prefix'
27-
git push -f origin HEAD:${{ github.head_ref }}
24+
if [ -z "$(git diff --name-only)" ]; then
25+
git add .
26+
git config --global user.email "[email protected]"
27+
git config --global user.name "ActionBot"
28+
git commit -m 'remove function name prefix'
29+
git push origin ${{ github.ref }}
30+
fi
31+
32+
echo "done"
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Update Commit Hash
22

33
on:
4-
pull_request:
4+
push:
55
workflow_dispatch:
66

77
jobs:
@@ -12,10 +12,10 @@ jobs:
1212
- uses: actions/checkout@v3
1313
- name: Update file with merge commit hash
1414
run: |
15-
# git pull origin main --rebase
16-
# git log -1 --format='%H' > latestCommit.md
17-
# git config --global user.email "[email protected]"
18-
# git config --global user.name "ActionBot"
19-
# git add latestCommit.md
20-
# git commit -m 'update commit hash'
21-
# git push
15+
git pull origin ${{ github.ref }}
16+
git log -1 --format='%H' > latestCommit.md
17+
git config --global user.email "[email protected]"
18+
git config --global user.name "ActionBot"
19+
git add latestCommit.md
20+
git commit -m 'update commit hash'
21+
git push origin ${{ github.ref }}

latestCommit.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
d885c2d39ea8d4996e2fd4023c8d414161c4091f
1+
646f100bcb146f96d41bcb0e032c4053a1d07181

snippets/functions/api-functions/api_callExternalAPI.js

Lines changed: 0 additions & 9 deletions
This file was deleted.

snippets/functions/function-context/context_callFunction.js

Lines changed: 0 additions & 14 deletions
This file was deleted.

snippets/functions/mongodb-crud/crud_DeleteMany.js

Lines changed: 0 additions & 17 deletions
This file was deleted.

snippets/functions/mongodb-crud/crud_DeleteOne.js

Lines changed: 0 additions & 19 deletions
This file was deleted.

snippets/functions/mongodb-crud/crud_Find.js

Lines changed: 0 additions & 21 deletions
This file was deleted.

snippets/functions/mongodb-crud/crud_FindOne.js

Lines changed: 0 additions & 17 deletions
This file was deleted.

snippets/functions/mongodb-crud/crud_InsertMany.js

Lines changed: 0 additions & 23 deletions
This file was deleted.

0 commit comments

Comments
 (0)