Skip to content
This repository was archived by the owner on Oct 9, 2022. It is now read-only.

Commit 8fd8548

Browse files
committed
fix: debug statements causing errors (ig 🤷‍♂️)
1 parent 3cd48aa commit 8fd8548

File tree

6 files changed

+15
-13
lines changed

6 files changed

+15
-13
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This template includes tests, linting, a validation workflow, publishing, and ve
55
## Usage
66

77
```yaml
8-
uses: LEDBrain/branch-protection-action@v1.0.0
8+
uses: LEDBrain/branch-protection-action@v1.0.1
99
with:
1010
# Optional: branch to lift the restriction on; defaults to the current branch
1111
branch: main

dist/index.js

Lines changed: 5 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

index.js

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ async function run() {
2121
const branch = core.getInput('branch', { required: true }),
2222
owner = context.repo.owner,
2323
repo = context.repo.repo;
24-
core.debug(branch, owner, repo);
24+
core.debug(`${branch}, ${owner}, ${repo}`);
2525

2626
const { data: state } =
2727
await octokit.rest.repos.getBranchProtection({
@@ -56,7 +56,7 @@ async function run() {
5656
const branch = core.getInput('branch', { required: true }),
5757
owner = context.repo.owner,
5858
repo = context.repo.repo;
59-
core.debug(branch, owner, repo);
59+
core.debug(`${branch}, ${owner}, ${repo}`);
6060

6161
const initState = JSON.parse(
6262
core.getState('STATE_initial-branch-protection')
@@ -155,15 +155,16 @@ async function run() {
155155
// contexts:
156156
// initState.required_status_checks?.contexts || [],
157157
checks:
158-
initState.required_status_checks?.checks.map(
158+
initState.required_status_checks?.checks?.map(
159159
(c) => ({
160160
context: c?.context,
161161
app_id: c?.app_id,
162162
})
163163
) || undefined,
164164
},
165165
});
166-
core.debug(updatedState);
166+
core.debug(`Status: ${updatedState.status}`);
167+
core.debug(updatedState.data);
167168
}
168169
} catch (error) {
169170
core.debug(error);

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "branch-protection-action",
3-
"version": "1.0.0",
3+
"version": "1.0.1",
44
"description": "A tool to remove branch protection for a workflow run",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)