Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Output a JIRA key if found. #46

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gscho
Copy link

@gscho gscho commented Nov 2, 2023

No description provided.

@@ -50,6 +50,7 @@ When a PR passes the above check, `jira-description-action` will also add the is

| key | description
| ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `jira-issue-key` | The JIRA issue key. If key is not found the value is an empty string |****
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you also need to add it here, otherwise it won't work
https://github.com/cakeinpanic/jira-description-action/blob/master/action.yml

function setOutputs(isFound: boolean, source: ESource | null): void {
function setOutputs(key: string, source: ESource | null): void {
var isFound = key !== '';
core.setOutput('jira-issue-key', key);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest to pass null instead of an empty string here, it's more straightforward IMHO

Copy link
Author

@gscho gscho Nov 2, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Argument of type 'null' is not assignable to parameter of type 'string'.ts(2345)

I originally had it that way but my text editor is complaining (I'm not a javascript developer).

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it's a typescript error :)

please use key: string | null and it'd work well

Signed-off-by: Gregory Schofield <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants