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

Ability to create custom URL template for types #329

Open
melink14 opened this issue Sep 4, 2020 · 5 comments
Open

Ability to create custom URL template for types #329

melink14 opened this issue Sep 4, 2020 · 5 comments
Assignees

Comments

@melink14
Copy link
Contributor

melink14 commented Sep 4, 2020

Is your feature request related to a problem? Please describe.
I would like to add a label parameter for the Bug Report URL and create a URL for enhancement issues to add to the Ideas type.

Describe the solution you'd like
There's an example of overriding types in the configuration docs but the link just refers to url. It would be good to have an example or description of how to produce that url placeholder. (Or if it's impossible, for it to be made possible.)

I also noticed that the types section of the configuration was only present in the CLI docs so maybe any customization would also be CLI only?

Describe alternatives you've considered
I could manually change them (not too bad for my repo though backfilling is annoying) or I could just not do it and keep the defaults.

Thanks!

@Berkmann18
Copy link
Member

Have you looked at https://github.com/all-contributors/all-contributors-cli/blob/master/src/generate/__tests__/format-contribution-type.js? That shows some examples of how it could be done. But yeah, having examples in the documentation would be more accessible.

I also noticed that the types section of the configuration was only present in the CLI docs so maybe any customization would also be CLI only?

That's also available for the bot (cf. https://allcontributors.org/docs/en/bot/configuration).

@melink14
Copy link
Contributor Author

melink14 commented Sep 4, 2020

Thanks for the reply. I was looking through the repo link generation code (https://github.com/all-contributors/all-contributors-cli/blob/0c7559515698b6e24919d334cd1a3713afd3a200/src/repo/index.js#L13) but those tests are definitely more digestible.

Updating the documentation to be more specfic could be the goal of this FR then since the current documentation isn't just incomplete it's also wrong. The example shows a full markdown syntax for symbol, url, and description but the actual code expects only a HTML anchor tag which it inserts into a predefined template that contains symbol and description!

I'll try to send a PR soonish.

I also learned from the test that contribution can be an object with type and url keys which makes sense but seems to be not documented anywhere. Trial and error says you can pass --url=<url> and I assume the bot will just detect URL in context and pass it correctly. (Might open a separate issue for this since it's a bit tangential)

Thanks!

edit: Don't know how I missed that section of the Bot's configuration. Must have just been in a blind spot...

@tenshiAMD tenshiAMD transferred this issue from all-contributors/all-contributors Sep 21, 2022
@Berkmann18
Copy link
Member

@melink14 Did you get round to looking into implementing that?

@melink14
Copy link
Contributor Author

melink14 commented Nov 2, 2022

Ah, I did not! Life got in the way, apologies for not updating this.

@Berkmann18
Copy link
Member

@melink14 It's fine, I'm in a similar boat.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants