Skip to content

Commit

Permalink
feat: Add logic to validate subscription (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
varunsh-coder authored Nov 22, 2023
1 parent ca9bf9b commit b7cd9b1
Show file tree
Hide file tree
Showing 12 changed files with 8,039 additions and 147 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ module.exports = {
extends: 'molindo/javascript',
env: {
node: true,
jest: true
jest: true,
es6: true
}
};
1 change: 0 additions & 1 deletion .github/workflows/lint-pr-title-preview-ignoreLabels.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
STEPSECURITY_API_KEY: ${{ secrets.STEPSECURITY_API_KEY }}
ignoreLabels: |
bot
ignore-semantic-pull-request
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ jobs:
id: lint_pr_title
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
STEPSECURITY_API_KEY: ${{ secrets.STEPSECURITY_API_KEY }}
- uses: marocchino/sticky-pull-request-comment@v2
# When the previous steps fails, the workflow would stop. By adding this
# condition you can continue the execution with the populated error message.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,5 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
STEPSECURITY_API_KEY: ${{ secrets.STEPSECURITY_API_KEY }}
validateSingleCommit: true
validateSingleCommitMatchesPrTitle: true
2 changes: 0 additions & 2 deletions .github/workflows/lint-pr-title-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,3 @@ jobs:
- uses: ./
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
STEPSECURITY_API_KEY: ${{ secrets.STEPSECURITY_API_KEY }}
2 changes: 0 additions & 2 deletions .github/workflows/lint-pr-title.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,3 @@ jobs:
- uses: ./
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
STEPSECURITY_API_KEY: ${{ secrets.STEPSECURITY_API_KEY }}
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ jobs:
- uses: step-security/action-semantic-pull-request@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
STEPSECURITY_API_KEY: ${{ secrets.STEPSECURITY_API_KEY }}
```
See the [event triggers documentation](#event-triggers) below to learn more about what `pull_request_target` means.
Expand Down Expand Up @@ -141,7 +139,6 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
STEPSECURITY_API_KEY: ${{ secrets.STEPSECURITY_API_KEY }}
wip: true
```

Expand Down Expand Up @@ -198,8 +195,6 @@ jobs:
id: lint_pr_title
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
STEPSECURITY_API_KEY: ${{ secrets.STEPSECURITY_API_KEY }}

- uses: marocchino/sticky-pull-request-comment@v2
# When the previous steps fails, the workflow would stop. By adding this
Expand Down
3 changes: 0 additions & 3 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,3 @@ inputs:
wip:
description: "For work-in-progress PRs you can typically use draft pull requests from Github. However, private repositories on the free plan don't have this option and therefore this action allows you to opt-in to using the special '[WIP]' prefix to indicate this state. This will avoid the validation of the PR title and the pull request checks remain pending. Note that a second check will be reported if this is enabled."
required: false
STEPSECURITY_API_KEY:
description: "API key for validation"
required: true
Loading

0 comments on commit b7cd9b1

Please sign in to comment.