mirror of
https://github.com/ditkrg/todo-to-issue-action.git
synced 2026-01-25 07:16:42 +00:00
Update input names
This commit is contained in:
parent
223e23516d
commit
eb4306a705
16
.github/workflows/workflow.yml
vendored
16
.github/workflows/workflow.yml
vendored
@ -3,11 +3,11 @@ on:
|
|||||||
push:
|
push:
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
inputs:
|
inputs:
|
||||||
BASE_MANUAL:
|
MANUAL_COMMIT_REF:
|
||||||
description: "The base SHA"
|
description: "The SHA of the commit to get the diff for"
|
||||||
required: true
|
required: true
|
||||||
HEAD_MANUAL:
|
MANUAL_BASE_REF:
|
||||||
description: "The head SHA"
|
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
|
required: false
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@ -18,9 +18,9 @@ jobs:
|
|||||||
uses: "alstr/todo-to-issue-action@master"
|
uses: "alstr/todo-to-issue-action@master"
|
||||||
id: "todo"
|
id: "todo"
|
||||||
env:
|
env:
|
||||||
BASE_MANUAL:
|
MANUAL_COMMIT_REF:
|
||||||
${{ inputs.BASE_MANUAL }}
|
${{ inputs.MANUAL_COMMIT_REF }}
|
||||||
HEAD_MANUAL:
|
MANUAL_BASE_REF:
|
||||||
${{ inputs.HEAD_MANUAL }}
|
${{ inputs.MANUAL_BASE_REF }}
|
||||||
with:
|
with:
|
||||||
PROJECTS_SECRET: ${{ secrets.PROJECTS_SECRET }}
|
PROJECTS_SECRET: ${{ secrets.PROJECTS_SECRET }}
|
||||||
|
|||||||
16
main.py
16
main.py
@ -646,14 +646,14 @@ class TodoParser(object):
|
|||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
# Create a basic client for communicating with GitHub, automatically initialised with environment variables.
|
# Create a basic client for communicating with GitHub, automatically initialised with environment variables.
|
||||||
client = GitHubClient()
|
client = GitHubClient()
|
||||||
base_manual = os.getenv('BASE_MANUAL')
|
manual_commit_ref = os.getenv('MANUAL_COMMIT_REF')
|
||||||
head_manual = os.getenv('HEAD_MANUAL')
|
manual_base_ref = os.getenv('MANUAL_BASE_REF')
|
||||||
if base_manual and head_manual:
|
if manual_commit_ref and manual_base_ref:
|
||||||
print(f'Manually comparing {base_manual}...{head_manual}')
|
print(f'Manually comparing {manual_base_ref}...{manual_commit_ref}')
|
||||||
client.diff_url = f'{client.repos_url}{client.repo}/compare/{base_manual}...{head_manual}'
|
client.diff_url = f'{client.repos_url}{client.repo}/compare/{manual_base_ref}...{manual_commit_ref}'
|
||||||
elif base_manual:
|
elif manual_commit_ref:
|
||||||
print(f'Manual checking {base_manual}')
|
print(f'Manual checking {manual_commit_ref}')
|
||||||
client.diff_url = f'{client.repos_url}{client.repo}/commits/{base_manual}'
|
client.diff_url = f'{client.repos_url}{client.repo}/commits/{manual_commit_ref}'
|
||||||
if client.diff_url or len(client.commits) != 0:
|
if client.diff_url or len(client.commits) != 0:
|
||||||
# Get the diff from the last pushed commit.
|
# Get the diff from the last pushed commit.
|
||||||
last_diff = StringIO(client.get_last_diff())
|
last_diff = StringIO(client.get_last_diff())
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user