Skip to content

Commit

Permalink
style: Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
kroese committed Oct 16, 2023
1 parent a945149 commit 0962156
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ function get_() {

if (push_to_org) return "/orgs/" + owner;
if (repository.includes("/")) return "/repos/" + repository;

return "/repos/" + owner + "/" + repository;

}
Expand Down Expand Up @@ -92,20 +92,20 @@ const bootstrap = async () => {
let old_value = "";

try {

const response = await getVariable(name);

exists = response.status === 200;
if (exists) old_value = response.data.value;

} catch (e) {
// Variable does not exist
}

try {

if (exists) {

let new_value = increment(old_value);
const response = await setVariable(new_value);

Expand All @@ -114,9 +114,9 @@ const bootstrap = async () => {
}

throw new Error("ERROR: Wrong status was returned: " + response.status);

} else {

const response = await createVariable("1");

if (response.status === 201) {
Expand All @@ -125,7 +125,7 @@ const bootstrap = async () => {

throw new Error("ERROR: Wrong status was returned: " + response.status);
}

} catch (e) {
core.setFailed(get_() + ": " + e.message);
console.error(e);
Expand Down

0 comments on commit 0962156

Please sign in to comment.