Skip to content

Commit

Permalink
updated release files for b02e6e6
Browse files Browse the repository at this point in the history
  • Loading branch information
phish108 committed Dec 22, 2020
1 parent b02e6e6 commit 3bf43e2
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 8 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- id: release
uses: phish108/[email protected].4-main.3
uses: phish108/[email protected].5-main.3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -88,7 +88,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- id: release
uses: phish108/[email protected].4-main.3
uses: phish108/[email protected].5-main.3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
protected-paths: |
Expand Down
15 changes: 11 additions & 4 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5782,7 +5782,7 @@ const protected_defaults = [
function prepareProtectedPaths(extraString) {
let extraPaths = [];

if (extraString) {
if (typeof extraString === "string") {
extraPaths = extraString.split(/[\s\n\r]+/);
}

Expand Down Expand Up @@ -5890,8 +5890,16 @@ async function checkCommits(github, context, extras) {
const files = changeLog.data.files
.map(file => file.filename);

let protectedExtra = "";

if ( extras &&
extras.protected_extra &&
typeof extras.protected_extra === "string" ) {
protectedExtra = extras.protected_extra;
}

const protected_paths = prepareProtectedPaths(protected_defaults,
extras.protected_extra);
protectedExtra);

// check normal protected files
let hold_protected = checkOnlyPaths(files,
Expand Down Expand Up @@ -5949,10 +5957,9 @@ async function action() {
const token = core.getInput("github-token", {required: true});
const protected_extra = core.getInput("protected-paths", {required: false});

const github = new githubAction.getOctokit(token);
const github = githubAction.getOctokit(token);

const result = await checkCommits(github,
core,
githubAction.context,
{protected_extra});

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "release-check",
"version": "1.0.4",
"version": "1.0.5",
"description": "Check if a push or pull request should trigger a release.",
"main": "dist/index.js",
"scripts": {
Expand Down

0 comments on commit 3bf43e2

Please sign in to comment.