Skip to content

Commit f195a02

Browse files
committed
Run prettier on code, add trailing whitespace to other files
1 parent 2673261 commit f195a02

File tree

6 files changed

+56
-50
lines changed

6 files changed

+56
-50
lines changed

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,4 @@ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
1616
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
1717
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
1818
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
19-
SOFTWARE.
19+
SOFTWARE.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@ jobs:
2727
uses: pythonistaguild/[email protected]
2828
with:
2929
content: "string to check exists"
30-
```
30+
```

action.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
name: 'Pythonista PR Description Check'
2-
description: 'Ensure certain content conditions are met in the PR body before passing the check.'
1+
name: "Pythonista PR Description Check"
2+
description: "Ensure certain content conditions are met in the PR body before passing the check."
33
inputs:
44
content:
5-
description: 'The content string to check in the PR body.'
5+
description: "The content string to check in the PR body."
66
required: true
77
outputs:
88
passed:
9-
description: 'All PR content checks passed.'
9+
description: "All PR content checks passed."
1010
runs:
11-
using: 'node20'
12-
main: 'dist/index.js'
11+
using: "node20"
12+
main: "dist/index.js"

index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* The entrypoint for the action.
33
*/
4-
import { run } from './main'
4+
import { run } from "./main";
55

66
// eslint-disable-next-line @typescript-eslint/no-floating-promises
7-
run()
7+
run();

main.ts

Lines changed: 23 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,36 @@
1-
import * as core from '@actions/core'
1+
import * as core from "@actions/core";
22
import * as github from "@actions/github";
33
import { PullRequest } from "@octokit/webhooks-types";
44

5-
65
/**
76
* The main function for the action.
87
* @returns {Promise<void>} Resolves when the action is complete.
98
*/
109
export async function run(): Promise<void> {
11-
try {
12-
if (github.context.eventName === "pull_request") {
13-
const pullPayload = github.context.payload.pull_request as PullRequest;
14-
const body: string | null = pullPayload.body;
10+
try {
11+
if (github.context.eventName === "pull_request") {
12+
const pullPayload = github.context.payload.pull_request as PullRequest;
13+
const body: string | null = pullPayload.body;
1514

16-
if (!body) {
17-
core.setFailed("No PR body provided. Please ensure you include the PR template.");
18-
return;
19-
}
15+
if (!body) {
16+
core.setFailed(
17+
"No PR body provided. Please ensure you include the PR template."
18+
);
19+
return;
20+
}
2021

21-
const lower: string = body.toLowerCase();
22-
const content: string = core.getInput("content").toLowerCase();
22+
const lower: string = body.toLowerCase();
23+
const content: string = core.getInput("content").toLowerCase();
2324

24-
if (!lower.includes(content)) {
25-
core.setFailed(`Content check for "${content}" was not successful.`);
26-
return;
27-
}
25+
if (!lower.includes(content)) {
26+
core.setFailed(`Content check for "${content}" was not successful.`);
27+
return;
28+
}
2829

29-
core.setOutput("passed", "All content checks were successful!");
30-
}
31-
} catch (error) {
32-
// Fail the workflow run if an error occurs
33-
if (error instanceof Error) core.setFailed(error.message)
30+
core.setOutput("passed", "All content checks were successful!");
3431
}
35-
}
32+
} catch (error) {
33+
// Fail the workflow run if an error occurs
34+
if (error instanceof Error) core.setFailed(error.message);
35+
}
36+
}

tsconfig.json

Lines changed: 23 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,24 @@
11
{
2-
"$schema": "https://json.schemastore.org/tsconfig",
3-
"compilerOptions": {
4-
"target": "ES2022",
5-
"module": "NodeNext",
6-
"rootDir": ".",
7-
"moduleResolution": "NodeNext",
8-
"baseUrl": "./",
9-
"sourceMap": true,
10-
"outDir": "./dist",
11-
"noImplicitAny": true,
12-
"esModuleInterop": true,
13-
"forceConsistentCasingInFileNames": true,
14-
"strict": true,
15-
"skipLibCheck": true,
16-
"newLine": "lf"
17-
},
18-
"exclude": ["./dist", "./node_modules", "./__tests__", "./coverage"]
19-
}
2+
"$schema": "https://json.schemastore.org/tsconfig",
3+
"compilerOptions": {
4+
"target": "ES2022",
5+
"module": "NodeNext",
6+
"rootDir": ".",
7+
"moduleResolution": "NodeNext",
8+
"baseUrl": "./",
9+
"sourceMap": true,
10+
"outDir": "./dist",
11+
"noImplicitAny": true,
12+
"esModuleInterop": true,
13+
"forceConsistentCasingInFileNames": true,
14+
"strict": true,
15+
"skipLibCheck": true,
16+
"newLine": "lf"
17+
},
18+
"exclude": [
19+
"./dist",
20+
"./node_modules",
21+
"./__tests__",
22+
"./coverage"
23+
]
24+
}

0 commit comments

Comments
 (0)