Skip to content

Commit

Permalink
Update input names
Browse files Browse the repository at this point in the history
  • Loading branch information
alstr committed Oct 27, 2022
1 parent 223e235 commit eb4306a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ on:
push:
workflow_dispatch:
inputs:
BASE_MANUAL:
description: "The base SHA"
MANUAL_COMMIT_REF:
description: "The SHA of the commit to get the diff for"
required: true
HEAD_MANUAL:
description: "The head SHA"
MANUAL_BASE_REF:
description: "By default, the commit entered above is compared to the one directly before it; to go back further, enter an earlier SHA here"
required: false
jobs:
build:
Expand All @@ -18,9 +18,9 @@ jobs:
uses: "alstr/todo-to-issue-action@master"
id: "todo"
env:
BASE_MANUAL:
${{ inputs.BASE_MANUAL }}
HEAD_MANUAL:
${{ inputs.HEAD_MANUAL }}
MANUAL_COMMIT_REF:
${{ inputs.MANUAL_COMMIT_REF }}
MANUAL_BASE_REF:
${{ inputs.MANUAL_BASE_REF }}
with:
PROJECTS_SECRET: ${{ secrets.PROJECTS_SECRET }}
16 changes: 8 additions & 8 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -646,14 +646,14 @@ def _should_ignore(self, file):
if __name__ == "__main__":
# Create a basic client for communicating with GitHub, automatically initialised with environment variables.
client = GitHubClient()
base_manual = os.getenv('BASE_MANUAL')
head_manual = os.getenv('HEAD_MANUAL')
if base_manual and head_manual:
print(f'Manually comparing {base_manual}...{head_manual}')
client.diff_url = f'{client.repos_url}{client.repo}/compare/{base_manual}...{head_manual}'
elif base_manual:
print(f'Manual checking {base_manual}')
client.diff_url = f'{client.repos_url}{client.repo}/commits/{base_manual}'
manual_commit_ref = os.getenv('MANUAL_COMMIT_REF')
manual_base_ref = os.getenv('MANUAL_BASE_REF')
if manual_commit_ref and manual_base_ref:
print(f'Manually comparing {manual_base_ref}...{manual_commit_ref}')
client.diff_url = f'{client.repos_url}{client.repo}/compare/{manual_base_ref}...{manual_commit_ref}'
elif manual_commit_ref:
print(f'Manual checking {manual_commit_ref}')
client.diff_url = f'{client.repos_url}{client.repo}/commits/{manual_commit_ref}'
if client.diff_url or len(client.commits) != 0:
# Get the diff from the last pushed commit.
last_diff = StringIO(client.get_last_diff())
Expand Down

0 comments on commit eb4306a

Please sign in to comment.