Skip to content

Commit 4b11138

Browse files
Add missing ioncube commands (#37)
* adding close stale issues and prs workflow * adding more ioncube options * adding more ioncube options * adding acidentaly removed input * adding acidentaly removed input * adding acidentaly removed input
1 parent 9183435 commit 4b11138

File tree

17 files changed

+464
-11
lines changed

17 files changed

+464
-11
lines changed

.github/workflows/stale.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: 'Close stale issues and PRs'
2+
3+
on:
4+
schedule:
5+
- cron: '30 1 * * *'
6+
7+
permissions:
8+
contents: write
9+
issues: write
10+
pull-requests: write
11+
12+
jobs:
13+
stale:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/stale@v9
17+
with:
18+
stale-issue-message:
19+
'This issue is stale because it has been open 30 days with no
20+
activity. Remove stale label or comment or this will be closed in 5
21+
days.'
22+
stale-pr-message:
23+
'This PR is stale because it has been open 45 days with no activity.
24+
Remove stale label or comment or this will be closed in 10 days.'
25+
close-issue-message:
26+
'This issue was closed because it has been stalled for 5 days with
27+
no activity.'
28+
close-pr-message:
29+
'This PR was closed because it has been stalled for 10 days with no
30+
activity.'
31+
days-before-issue-stale: 30
32+
days-before-pr-stale: 45
33+
days-before-issue-close: 5
34+
days-before-pr-close: 10
35+
stale-issue-label: 'no-issue-activity'
36+
exempt-issue-labels: 'awaiting-approval,work-in-progress'
37+
stale-pr-label: 'no-pr-activity'
38+
exempt-pr-labels: 'awaiting-approval,work-in-progress'
39+
exempt-issue-milestones: 'future,alpha,beta'
40+
exempt-pr-milestones: 'bugfix,improvement'

README.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
![Banner](banner.png)
22

3-
[![Check Transpiled JavaScript](https://github.com/MuriloChianfa/ioncube-encoder-action/actions/workflows/check-dist.yml/badge.svg)](https://github.com/MuriloChianfa/ioncube-encoder-action/actions/workflows/check-dist.yml)
43
[![CI](https://github.com/MuriloChianfa/ioncube-encoder-action/actions/workflows/ci.yml/badge.svg)](https://github.com/MuriloChianfa/ioncube-encoder-action/actions/workflows/ci.yml)
54
[![GitHub Super-Linter](https://github.com/MuriloChianfa/ioncube-encoder-action/actions/workflows/linter.yml/badge.svg)](https://github.com/MuriloChianfa/ioncube-encoder-action/actions/workflows/linter.yml)
65
[![CodeQL](https://github.com/MuriloChianfa/ioncube-encoder-action/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/MuriloChianfa/ioncube-encoder-action/actions/workflows/codeql-analysis.yml)
@@ -139,6 +138,19 @@ jobs:
139138
false)_
140139
- **_callback-file_**: File to validate manually when license is invalid.
141140
_(default: false)_
141+
- **_create-target_**: Mode to create target file/directory if not exists.
142+
_(default: false)_
143+
- **_replace-target_**: Mode to replace target file/directory if not exists.
144+
_(default: false)_
145+
- **_copy_**: Path of files to just copy without encrypt or encode. _(default:
146+
'')_
147+
- **_ignore_**: Path of files to just ignore on ioncube walkthrough. _(default:
148+
'')_
149+
- **_skip_**: Path of files to just skip on ioncube walkthrough. _(default: '')_
150+
- **_obfuscate_**: PHP entities to obfuscate:
151+
all,locals,functions,methods,classes,linenos,none. _(default: 'none')_
152+
- **_obfuscation-key_**: Key to obfuscation method to apply on PHP entities.
153+
_(default: '')_
142154
143155
<hr>
144156

__tests__/main.test.js

Lines changed: 46 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,26 @@ describe('action', () => {
6565
17,
6666
'Using callback file in runtime path: NONE'
6767
)
68+
expect(debugMock).toHaveBeenNthCalledWith(18, 'Adding copy path: NONE')
69+
expect(debugMock).toHaveBeenNthCalledWith(19, 'Adding ignore path: NONE')
70+
expect(debugMock).toHaveBeenNthCalledWith(20, 'Adding a path to skip: NONE')
71+
expect(debugMock).toHaveBeenNthCalledWith(
72+
21,
73+
'Input for obfuscate option is not valid!'
74+
)
75+
expect(debugMock).toHaveBeenNthCalledWith(
76+
22,
77+
'Using obfuscate option: none'
78+
)
79+
expect(debugMock).toHaveBeenNthCalledWith(
80+
23,
81+
'Adding obfuscation-key path: NONE'
82+
)
6883

6984
// No errors
70-
expect(debugMock).toHaveBeenNthCalledWith(18, 0)
71-
expect(debugMock).toHaveBeenNthCalledWith(19, '')
72-
expect(debugMock).toHaveBeenNthCalledWith(20, '')
85+
expect(debugMock).toHaveBeenNthCalledWith(24, 0)
86+
expect(debugMock).toHaveBeenNthCalledWith(25, '')
87+
expect(debugMock).toHaveBeenNthCalledWith(26, '')
7388

7489
expect(setOutputMock).toHaveBeenCalledWith(
7590
'status',
@@ -128,11 +143,36 @@ describe('action', () => {
128143
17,
129144
'Using callback file in runtime path: public/ioncube.php'
130145
)
146+
expect(debugMock).toHaveBeenNthCalledWith(
147+
18,
148+
'Creating target file/directory if not exists'
149+
)
150+
expect(debugMock).toHaveBeenNthCalledWith(
151+
19,
152+
'Replacing target file/directory'
153+
)
154+
expect(debugMock).toHaveBeenNthCalledWith(20, 'Adding copy path: NONE')
155+
expect(debugMock).toHaveBeenNthCalledWith(
156+
21,
157+
'Adding ignore path: */cache/*'
158+
)
159+
expect(debugMock).toHaveBeenNthCalledWith(
160+
22,
161+
'Adding a path to skip: */vendor/*'
162+
)
163+
expect(debugMock).toHaveBeenNthCalledWith(
164+
23,
165+
'Using obfuscate option: classes'
166+
)
167+
expect(debugMock).toHaveBeenNthCalledWith(
168+
24,
169+
'Adding obfuscation-key path: CHANGEME'
170+
)
131171

132172
// No errors
133-
expect(debugMock).toHaveBeenNthCalledWith(18, 0)
134-
expect(debugMock).toHaveBeenNthCalledWith(19, '')
135-
expect(debugMock).toHaveBeenNthCalledWith(20, '')
173+
expect(debugMock).toHaveBeenNthCalledWith(25, 0)
174+
expect(debugMock).toHaveBeenNthCalledWith(26, '')
175+
expect(debugMock).toHaveBeenNthCalledWith(27, '')
136176

137177
expect(setOutputMock).toHaveBeenCalledWith(
138178
'status',

badges/coverage.svg

Lines changed: 1 addition & 1 deletion
Loading

0 commit comments

Comments
 (0)