Skip to content

Commit

Permalink
fix: add debug logging of diff (#46)
Browse files Browse the repository at this point in the history
* fix: add debug logging of diff

Fixes #29

* ci: reset action integration to use PAT
  • Loading branch information
andrewthetechie authored May 25, 2023
1 parent 47063fe commit ad86b78
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/action-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
# test with the local checkout of the action
uses: ./
with:
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.THIS_PAT }}
action: "check"
- name: Check outputs
run: |
Expand Down
6 changes: 4 additions & 2 deletions repo_manager/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ def main(): # noqa: C901
actions_toolkit.debug(f"Inputs: {inputs}")
if inputs["action"] == "validate":
actions_toolkit.set_output("result", f"Validated {inputs['settings_file']}")
actions_toolkit.set_output("diff", json.dumps({}))
actions_toolkit.debug(json_diff := json.dumps({}))
actions_toolkit.set_output("diff", json_diff)
sys.exit(0)
actions_toolkit.info(f"Config from {inputs['settings_file']} validated.")

Expand All @@ -50,7 +51,8 @@ def main(): # noqa: C901
check_result &= this_check
diffs[check_name] = this_diffs

actions_toolkit.set_output("diff", json.dumps(diffs))
actions_toolkit.debug(json_diff := json.dumps({}))
actions_toolkit.set_output("diff", json_diff)

if inputs["action"] == "check":
if not check_result:
Expand Down

0 comments on commit ad86b78

Please sign in to comment.