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

Checker for arbitrary issue tracker links #207

Open
koppor opened this issue Jan 25, 2024 · 5 comments
Open

Checker for arbitrary issue tracker links #207

koppor opened this issue Jan 25, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@koppor
Copy link
Contributor

koppor commented Jan 25, 2024

In https://github.com/nbbrd/heylogs/blob/develop/heylogs-api/src/main/java/internal/heylogs/ExtendedRules.java, there is a check for GitHub links. Other links should also work.

Example from https://github.com/openjdk/jtreg/:

[CODETOOLS-7902754](https://bugs.openjdk.org/browse/CODETOOLS-7902754)

I think, JIRA has a similar pattern. Maybe, one can use a kind of regex?

[{tag1}-{number1}]({some-characters}/{tag2}-{number2})

If tag1 and tag2 are equal, number1 and number2 have to be equal.

To support GitHub enterprise, one could even extend

[{prefxi1}{number1}]({some-characters}/{prefix2}{number2})

If prefix1 and prefix2 are equal, number1 and number2 have to be equal.

@charphi
Copy link
Member

charphi commented Mar 27, 2024

Requires #224

@charphi charphi added the enhancement New feature or request label Mar 27, 2024
@koppor
Copy link
Contributor Author

koppor commented Mar 27, 2024

Related solution : docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/managing-repository-settings/configuring-autolinks-to-reference-external-resources#configuring-autolinks-to-reference-external-resources

You mean, heylogs will use GitHub's API to fetch the configuration and then check the links according to it? 😅🤩🤣🤣

My solution was a "simple" pattern matching approach not requiring any configuration.

@charphi
Copy link
Member

charphi commented Mar 27, 2024

You mean, heylogs will use GitHub's API to fetch the configuration and then check the links according to it?

That's a good idea but it would render the check unreliable and a bit slower.

@koppor
Copy link
Contributor Author

koppor commented Mar 27, 2024

You mean, heylogs will use GitHub's API to fetch the configuration and then check the links according to it?

That's a good idea but it would render the check unreliable and a bit slower.

You mean, you will cache the API result? 🤣🤣

(I am in creative mood, don't take too serious 😅)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants