Skip to content

Commit

Permalink
GH Action Standards
Browse files Browse the repository at this point in the history
  • Loading branch information
confused-Techie authored and github-actions[bot] committed Mar 27, 2024
1 parent 2d285b9 commit 8c6d2a8
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 23 deletions.
2 changes: 1 addition & 1 deletion docs/reference/Source_Documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -1011,7 +1011,7 @@ if invalid, otherwise returns true. Checking for mixed captilization.
Parses the 'repository' query parameter, returning it if valid, otherwise returning ''.

**Kind**: global function
**Returns**: <code>string</code> - Returning the valid 'repository' query parameter, or '' if invalid.
**Returns**: <code>string</code> - Returning the valid 'repository' query parameter, or false if invalid.

| Param | Type | Description |
| --- | --- | --- |
Expand Down
26 changes: 13 additions & 13 deletions docs/resources/complexity-report.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# Complexity report, 2/19/2024
# Complexity report, 3/27/2024

* Mean per-function logical LOC: 15.036764705882353
* Mean per-function logical LOC: 15.080882352941176
* Mean per-function parameter count: 0.1698529411764706
* Mean per-function cyclomatic complexity: 1.2632352941176472
* Mean per-function Halstead effort: 3195.428995748861
* Mean per-module maintainability index: 67.8207342918712
* Mean per-function Halstead effort: 3226.862745343813
* Mean per-module maintainability index: 67.78765469174402
* First-order density: 0.7136678200692042%
* Change cost: 4.541522491349481%
* Core size: 100%
Expand Down Expand Up @@ -401,13 +401,13 @@

## /home/runner/work/package-backend/package-backend/src/query_parameters/repository.js

* Physical LOC: 30
* Logical LOC: 11
* Physical LOC: 40
* Logical LOC: 12
* Mean parameter count: 0
* Cyclomatic complexity: 1
* Cyclomatic complexity density: 9.090909090909092%
* Maintainability index: 65.36316082704943
* Dependency count: 0
* Cyclomatic complexity density: 8.333333333333332%
* Maintainability index: 63.34319351431579
* Dependency count: 1

## /home/runner/work/package-backend/package-backend/src/query_parameters/service.js

Expand Down Expand Up @@ -681,12 +681,12 @@

## /home/runner/work/package-backend/package-backend/tests/unit/query.test.js

* Physical LOC: 192
* Logical LOC: 108
* Physical LOC: 196
* Logical LOC: 110
* Mean parameter count: 0
* Cyclomatic complexity: 1
* Cyclomatic complexity density: 0.9259259259259258%
* Maintainability index: 33.49221524957683
* Cyclomatic complexity density: 0.9090909090909091%
* Maintainability index: 33.262769753661445
* Dependency count: 1

## /home/runner/work/package-backend/package-backend/tests/vcs/vcs.unit.test.js
Expand Down
10 changes: 2 additions & 8 deletions src/controllers/postPackages.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,7 @@ module.exports = {

// Now we know the package doesn't exist. And we want to check that the user
// has permissions to this package
const gitowner = await context.vcs.ownership(
user.content,
ownerRepo
);
const gitowner = await context.vcs.ownership(user.content, ownerRepo);

callStack.addCall("vcs.ownership", gitowner);

Expand Down Expand Up @@ -197,10 +194,7 @@ module.exports = {
if (isBundled.ok && isBundled.content) {
const sso = new context.sso();

return sso
.notOk()
.addShort("package_exists")
.assignCalls(callStack);
return sso.notOk().addShort("package_exists").assignCalls(callStack);
}

// Now with valid package data, we can insert them into the DB
Expand Down
5 changes: 4 additions & 1 deletion tests/unit/query.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,10 @@ const repositoryCases = [
[{ query: { repository: "owner/repo" } }, "owner/repo"],
[{ query: {} }, false],
[{ query: { repository: "InvalidRepo" } }, false],
[{ query: { repository: "[email protected]:ndr-brt/pulsar-p5js" } }, "[email protected]:ndr-brt/pulsar-p5js"],
[
{ query: { repository: "[email protected]:ndr-brt/pulsar-p5js" } },
"[email protected]:ndr-brt/pulsar-p5js",
],
];

describe("Verify Repo Query Returns", () => {
Expand Down

0 comments on commit 8c6d2a8

Please sign in to comment.