Skip to content

Commit 3b54c59

Browse files
committed
fixing tests
1 parent 18a6d01 commit 3b54c59

14 files changed

Lines changed: 621 additions & 81 deletions

.github/CODE_OF_CONDUCT.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ reported to the project maintainers at murilo.chianfa@outlook.com.
4949

5050
All complaints will be reviewed and investigated promptly and fairly.
5151

52-
All project maintainers are obligated to respect the privacy and security of
53-
the reporter of any incident.
52+
All project maintainers are obligated to respect the privacy and security of the
53+
reporter of any incident.
5454

5555
## Attribution
5656

.github/CONTRIBUTING.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Contributing to IonCube Encoder Action
22

3-
Thank you for your interest in contributing! We welcome contributions from the community.
3+
Thank you for your interest in contributing! We welcome contributions from the
4+
community.
45

56
## Development Setup
67

@@ -23,6 +24,7 @@ Thank you for your interest in contributing! We welcome contributions from the c
2324
```
2425

2526
This command will:
27+
2628
- Format code with Prettier
2729
- Lint with ESLint
2830
- Run tests with Jest
@@ -64,9 +66,11 @@ This command will:
6466
## Reporting Issues
6567

6668
Use the issue templates provided:
69+
6770
- **Bug Report**: For reporting bugs
6871
- **Feature Request**: For suggesting new features
6972

7073
## Questions?
7174

72-
Feel free to open an issue for questions or reach out to murilo.chianfa@outlook.com.
75+
Feel free to open an issue for questions or reach out to
76+
murilo.chianfa@outlook.com.

.github/ISSUE_TEMPLATE/BUG_REPORT_TEMPLATE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ assignees: ''
3232

3333
## Steps to Reproduce
3434

35-
1.
36-
2.
37-
3.
35+
1.
36+
2.
37+
3.
3838

3939
## Expected Behavior
4040

.github/ISSUE_TEMPLATE/FEATURE_REQUEST_TEMPLATE.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ assignees: ''
2525

2626
```yaml
2727
# Example workflow configuration
28-
2928
```
3029

3130
## Alternatives Considered

.github/PULL_REQUEST_TEMPLATE/BUG_FIX_TEMPLATE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,9 @@ Fixes #(issue)
2929

3030
<!-- How can reviewers verify this fix works? -->
3131

32-
1.
33-
2.
34-
3.
32+
1.
33+
2.
34+
3.
3535

3636
## Checklist
3737

.github/PULL_REQUEST_TEMPLATE/FEATURE_TEMPLATE.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ Closes #(issue)
2424

2525
```yaml
2626
# Example workflow using the new feature
27-
2827
```
2928

3029
## Testing

.github/PULL_REQUEST_TEMPLATE/PULL_REQUEST_TEMPLATE.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88

99
- [ ] Bug fix (non-breaking change which fixes an issue)
1010
- [ ] New feature (non-breaking change which adds functionality)
11-
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
11+
- [ ] Breaking change (fix or feature that would cause existing functionality to
12+
not work as expected)
1213
- [ ] Documentation update
1314
- [ ] Code refactoring
1415
- [ ] Performance improvement

.github/SECURITY.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@ We release patches for security vulnerabilities for the following versions:
1111

1212
## Reporting a Vulnerability
1313

14-
If you discover a security vulnerability within this project, please follow these steps:
14+
If you discover a security vulnerability within this project, please follow
15+
these steps:
1516

1617
1. **Do NOT** open a public issue
1718
2. Email details to: **murilo.chianfa@outlook.com**
@@ -24,15 +25,18 @@ If you discover a security vulnerability within this project, please follow thes
2425
### What to Expect
2526

2627
- **Response Time**: We aim to respond within 48 hours
27-
- **Updates**: You'll receive updates on the progress of fixing the vulnerability
28+
- **Updates**: You'll receive updates on the progress of fixing the
29+
vulnerability
2830
- **Disclosure**: We'll coordinate with you on public disclosure timing
29-
- **Credit**: We'll credit you in the release notes (unless you prefer to remain anonymous)
31+
- **Credit**: We'll credit you in the release notes (unless you prefer to remain
32+
anonymous)
3033

3134
## Security Best Practices
3235

3336
When using this action:
3437

35-
- Keep secrets (like `IONCUBE_DOWNLOAD_URL`, `IONCUBE_PASSPHRASE`) in GitHub Secrets
38+
- Keep secrets (like `IONCUBE_DOWNLOAD_URL`, `IONCUBE_PASSPHRASE`) in GitHub
39+
Secrets
3640
- Never commit sensitive information to your repository
3741
- Use the latest version of the action
3842
- Review encoded output before deployment

.github/workflows/docs.yml

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Documentation Check
22

33
on:
44
push:
5-
branches: [ main, master, develop ]
5+
branches: [main, master, develop]
66
paths:
77
- '*.md'
88
- '.github/workflows/docs.yml'
@@ -16,24 +16,24 @@ jobs:
1616
docs-check:
1717
name: Documentation Check
1818
runs-on: ubuntu-latest
19-
19+
2020
steps:
21-
- name: Checkout code
22-
uses: actions/checkout@v6
23-
24-
- name: Validate documentation
25-
run: |
26-
echo "Checking documentation files..."
27-
test -f README.md
28-
test -f LICENSE
29-
test -f .github/CONTRIBUTING.md
30-
test -f .github/CODE_OF_CONDUCT.md
31-
test -f .github/SECURITY.md
32-
echo "All documentation files present"
33-
34-
- name: Check for broken links
35-
uses: gaurav-nelson/github-action-markdown-link-check@v1
36-
with:
37-
use-quiet-mode: 'yes'
38-
config-file: '.github/markdown-link-check.json'
39-
continue-on-error: true
21+
- name: Checkout code
22+
uses: actions/checkout@v6
23+
24+
- name: Validate documentation
25+
run: |
26+
echo "Checking documentation files..."
27+
test -f README.md
28+
test -f LICENSE
29+
test -f .github/CONTRIBUTING.md
30+
test -f .github/CODE_OF_CONDUCT.md
31+
test -f .github/SECURITY.md
32+
echo "All documentation files present"
33+
34+
- name: Check for broken links
35+
uses: gaurav-nelson/github-action-markdown-link-check@v1
36+
with:
37+
use-quiet-mode: 'yes'
38+
config-file: '.github/markdown-link-check.json'
39+
continue-on-error: true

.github/workflows/greetings.yml

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -14,47 +14,47 @@ jobs:
1414
greeting:
1515
name: Greet New Contributors
1616
runs-on: ubuntu-latest
17-
18-
steps:
19-
- name: Greet on new issue
20-
if: github.event_name == 'issues'
21-
uses: actions/github-script@v7
22-
with:
23-
script: |
24-
const issue = context.payload.issue;
25-
const isFirstIssue = await github.rest.issues.listForRepo({
26-
owner: context.repo.owner,
27-
repo: context.repo.repo,
28-
creator: issue.user.login,
29-
state: 'all'
30-
}).then(issues => issues.data.length === 1);
3117

32-
if (isFirstIssue) {
33-
await github.rest.issues.createComment({
18+
steps:
19+
- name: Greet on new issue
20+
if: github.event_name == 'issues'
21+
uses: actions/github-script@v7
22+
with:
23+
script: |
24+
const issue = context.payload.issue;
25+
const isFirstIssue = await github.rest.issues.listForRepo({
3426
owner: context.repo.owner,
3527
repo: context.repo.repo,
36-
issue_number: issue.number,
37-
body: `👋 Thanks for opening your first issue! We appreciate your contribution to this project. Please be patient while we review your issue.`
38-
});
39-
}
40-
41-
- name: Greet on new pull request
42-
if: github.event_name == 'pull_request_target'
43-
uses: actions/github-script@v7
44-
with:
45-
script: |
46-
const pr = context.payload.pull_request;
47-
const isFirstPR = await github.rest.pulls.list({
48-
owner: context.repo.owner,
49-
repo: context.repo.repo,
50-
state: 'all'
51-
}).then(prs => prs.data.filter(p => p.user.login === pr.user.login).length === 1);
28+
creator: issue.user.login,
29+
state: 'all'
30+
}).then(issues => issues.data.length === 1);
5231
53-
if (isFirstPR) {
54-
await github.rest.issues.createComment({
32+
if (isFirstIssue) {
33+
await github.rest.issues.createComment({
34+
owner: context.repo.owner,
35+
repo: context.repo.repo,
36+
issue_number: issue.number,
37+
body: `👋 Thanks for opening your first issue! We appreciate your contribution to this project. Please be patient while we review your issue.`
38+
});
39+
}
40+
41+
- name: Greet on new pull request
42+
if: github.event_name == 'pull_request_target'
43+
uses: actions/github-script@v7
44+
with:
45+
script: |
46+
const pr = context.payload.pull_request;
47+
const isFirstPR = await github.rest.pulls.list({
5548
owner: context.repo.owner,
5649
repo: context.repo.repo,
57-
issue_number: pr.number,
58-
body: `🎉 Thanks for opening your first pull request! We're excited to review your contribution. Please make sure you've followed our [contributing guidelines](.github/CONTRIBUTING.md).`
59-
});
60-
}
50+
state: 'all'
51+
}).then(prs => prs.data.filter(p => p.user.login === pr.user.login).length === 1);
52+
53+
if (isFirstPR) {
54+
await github.rest.issues.createComment({
55+
owner: context.repo.owner,
56+
repo: context.repo.repo,
57+
issue_number: pr.number,
58+
body: `🎉 Thanks for opening your first pull request! We're excited to review your contribution. Please make sure you've followed our [contributing guidelines](.github/CONTRIBUTING.md).`
59+
});
60+
}

0 commit comments

Comments
 (0)