Skip to content

Change regex to accept both issue formats #515

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

Merged
merged 1 commit into from
May 13, 2024

Conversation

alt-13
Copy link
Contributor

@alt-13 alt-13 commented Apr 18, 2024

Closes #514

Maybe not the most elegant way but my regex knowledge is limited.

Change regex to accept both issue formats:
closes https://github.com/org-name/repo/issues/123
closes org-name/repo#123

Copy link
Member

@simoneb simoneb left a comment

Choose a reason for hiding this comment

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

Can you please describe what format this supports? Also, please include unit tests

@alt-13 alt-13 changed the title Change regex to accept both issue formats: Change regex to accept both issue formats Apr 18, 2024
@alt-13
Copy link
Contributor Author

alt-13 commented Apr 18, 2024

PR body is:
image

How else do you want to test this?
Unit test is already in place for getLinkedIssues

@alt-13
Copy link
Contributor Author

alt-13 commented Apr 18, 2024

Sry for the prettier changes. Will revert

@alt-13 alt-13 force-pushed the patch-2 branch 2 times, most recently from 247cf6e to 0a64925 Compare April 18, 2024 12:51
@simoneb
Copy link
Member

simoneb commented Apr 18, 2024

check out the unit tests in the codebase, they can serve as a blueprint about what we are testing and want to test

@simoneb
Copy link
Member

simoneb commented Apr 24, 2024

@alt-13 just a reminder to update/add tests please

@alt-13
Copy link
Contributor Author

alt-13 commented Apr 29, 2024

@alt-13 just a reminder to update/add tests, please

I am sorry. I was unavailable last week. Please clarify if the output of the action should be seen as an external issue (owner/repo#123) as this format also can link to an external issue.
Therefore the tests were modified/created to accept issue links in the format "owner/repo#123" as external issues.

@simoneb
Copy link
Member

simoneb commented Apr 29, 2024

Thanks for the follow up. Based on the documentation, the current output seems to be in the form "some/repo#123". In hindsight maybe that should have been a url, but since this format supports both internal and external issues, I'd say we can easily keep this format to link any issue, whether internal or extenal. What do you think?

@alt-13
Copy link
Contributor Author

alt-13 commented Apr 30, 2024

Yes, I think so too. As the documentation also states two different owner/repo combinations it is clear that it not only is linking internal but also external issues.

So for me, it is ok as it is. I hope there is no codestyle issue anywhere.

@simoneb
Copy link
Member

simoneb commented May 1, 2024

please fix the linting error. you can run linting locally before pushing. can you also please undo the formatting changes to the documentation?

@alt-13
Copy link
Contributor Author

alt-13 commented May 13, 2024

All requested changes applied. Is there anything else to fix?

@simoneb simoneb merged commit 60ee2d2 into nearform-actions:main May 13, 2024
2 checks passed
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.

Does not recognize issues contained in outputs.issues
2 participants