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

🤖 Add file patterns to config.json #360

Merged
merged 2 commits into from
Feb 18, 2021

Conversation

ErikSchierboom
Copy link
Member

âš  This PR requires you to make a simple change before merging. âš 


To save maintainers from having to manually specify the files key in their exercises' .meta/config.json files, we are providing support for track-level patterns. See this PR for details.

This PR adds (purposefully wrong) file patterns to the config.json file. It is up to you, the track maintainers, to change these patterns to their correct value.

You can use the following placeholders:

  • %{kebab_slug}: the kebab-case exercise slug (e.g. bit-manipulation)
  • %{snake_slug}: the snake_case exercise slug (e.g. bit_manipulation)
  • %{camel_slug}: the camelCase exercise slug (e.g. bitManipulation)
  • %{pascal_slug}: the PascalCase exercise slug (e.g. BitManipulation)

We will soon update configlet to enable it to automatically populate the .meta/config.json file's files property, at which point we will then batch-PR updates to all tracks that have merged this PR.

Tracking

exercism/v3-launch#19

@ErikSchierboom ErikSchierboom added the v3-migration 🤖 Preparing for Exercism v3 label Feb 17, 2021
@verdammelt
Copy link
Member

@ErikSchierboom So just to be clear - these patterns are not replacing the fields in <exercise>/.meta/config.json but will be used by configlet to generate the value for those exercise-specific fields?

@ErikSchierboom
Copy link
Member Author

@verdammelt That is 💯% correct.

Copy link
Member

@verdammelt verdammelt left a comment

Choose a reason for hiding this comment

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

I've update the pattern to be correct for the common lisp track.

@verdammelt verdammelt merged commit ed0858d into exercism:main Feb 18, 2021
@verdammelt
Copy link
Member

@ErikSchierboom thanks again to you and your mad-github-pr-scripting-skills.

@ErikSchierboom ErikSchierboom deleted the add-files-pattern branch February 19, 2021 13:46
@ErikSchierboom
Copy link
Member Author

I've created a script that will automatically populate the files property based on the pattern specified in the config.json (which was added in this PR). If you'd like, I could run the script for your track, which would result in a PR that looks like this: exercism/csharp#1507

In the future, we'll update configlet to include this functionality. For now, I can thus do this for you by running a script. Let me know if you'd like me to run the script for your track.

@TheLostLambda
Copy link
Member

I think that might be useful for our practice exercises! Sounds good to me!

@ErikSchierboom
Copy link
Member Author

Ah, it turns out that you had already done the work yourselves! Hurray for you!

@ErikSchierboom ErikSchierboom added the x:size/tiny Tiny amount of work label Oct 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
v3-migration 🤖 Preparing for Exercism v3 x:size/tiny Tiny amount of work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants