Skip to content

Commit

Permalink
feat(workflows): update workflow, configuration, documentation, and d…
Browse files Browse the repository at this point in the history
…ependencies

- Update `.github/workflows/release-please.yaml` to remove `release-type: node` specification.
- Modify `.release-please-config.json`:
  - Update `packages` path and version.
  - Change `package-name` to `@tsdevau/codewars-kata-archiver`.
  - Update `release-commit-message-pattern` and `pull-request-title-pattern` formats.
  - Refine `changelog-sections` categories and descriptions.
- Update `LICENSE` to reflect copyright change to 2022-2024 @tsdevau.
- Refine `README.md` for clarity and accuracy in descriptions and goals.
- Adjust build target in `build.mjs` from `node18` to `node20`.
- Update package versions in `package.json`:
  - Update `puppeteer` to `^22.1.0`.
  - Modify devDependencies: `@types/node`, `@typescript-eslint/eslint-plugin`, `@typescript-eslint/parser`, and `prettier-plugin-packagejson`.
- Reflect these package updates in `pnpm-lock.yaml`.

These changes enhance the project's automation workflow, update copyright and documentation for better clarity, and keep the dependencies up to date. The modifications in build configuration and dependencies ensure compatibility with the latest technologies and best practices.
  • Loading branch information
tsdevau committed Feb 19, 2024
1 parent 712e21d commit ffb762e
Show file tree
Hide file tree
Showing 10 changed files with 194 additions and 123 deletions.
25 changes: 25 additions & 0 deletions .github/auto-assign.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Set to true to add reviewers to pull requests
addReviewers: true

# Set to true to add assignees to pull requests
addAssignees: true

# A list of reviewers to be added to pull requests (GitHub user name)
reviewers:
- tsdevau

# A number of reviewers added to the pull request
# Set 0 to add all the reviewers (default: 0)
numberOfReviewers: 0
# A list of assignees, overrides reviewers if set
# assignees:
# - tsdevau

# A number of assignees to add to the pull request
# Set to 0 to add all of the assignees.
# Uses numberOfReviewers if unset.
# numberOfAssignees: 2

# A list of keywords to be skipped the process that add reviewers if pull requests include it
# skipKeywords:
# - wip
16 changes: 16 additions & 0 deletions .github/workflows/auto-assign.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
on:
issues:
types: [opened, reopened, unassigned]
pull_request:
types: [opened, reopened, unassigned, ready_for_review, review_requested]

name: Auto Assign

jobs:
add-reviews:
name: Assign Assignee and Reviewers
runs-on: ubuntu-latest
steps:
- uses: kentaro-m/[email protected]
with:
configuration-path: .github/auto-assign.yaml
1 change: 0 additions & 1 deletion .github/workflows/release-please.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,5 @@ jobs:
steps:
- uses: google-github-actions/release-please-action@v4
with:
release-type: node
config-file: ".release-please-config.json"
token: ${{ secrets.GITHUB_TOKEN }}
22 changes: 10 additions & 12 deletions .release-please-config.json
Original file line number Diff line number Diff line change
@@ -1,25 +1,23 @@
{
"packages": {
"path/to/pkg": "."
".": "2.1.1"
},
"package-name": "@tsdevau/codewars-kata-archiver",
"release-type": "node",
"release-commit-message-pattern": "chore${scope}: 🔖 release `@tsdevau/codewars-kata-archiver` -> v${version}",
"pull-request-title-pattern": "chore${scope}: 🔖 `@tsdevau/codewars-kata-archiver` -> v${version}",
"release-commit-message-pattern": "build(${scope}): 🔖 Release ${component} v${version}",
"pull-request-title-pattern": "build(${scope}): 🔖 Release ${component} v${version}",
"pull-request-header": ":robot: PR by release-please bot",
"changelog-sections": [
{ "type": "feat", "section": "Features & Performance Improvements" },
{ "type": "perf", "section": "Features & Performance Improvements" },
{ "type": "style", "section": "Styles & UX Improvements" },
{ "type": "fix", "section": "Bug Fixes" },
{ "type": "revert", "section": "Work in Progress" },
{ "type": "wip", "section": "Work In Progress" },
{ "type": "init", "section": "Work in Progress" },
{ "type": "wip", "section": "Work in Progress" },
{ "type": "docs", "section": "Documentation" },
{ "type": "refactor", "section": "Code & DX Improvements" },
{ "type": "chore", "section": "DX Improvements & Configuration" },
{ "type": "build", "section": "DX Improvements & Configuration" },
{ "type": "test", "section": "DX Improvements & Configuration" },
{ "type": "ci", "section": "DX Improvements & Configuration" }
{ "type": "refactor", "section": "DX Improvements" },
{ "type": "style", "section": "DX Improvements" },
{ "type": "chore", "section": "DX Maintenance & Configuration" },
{ "type": "build", "section": "DX Maintenance & Configuration" },
{ "type": "test", "section": "DX Testing" },
{ "type": "ci", "section": "DX Continuous Integrations" }
]
}
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "2.1.1"
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022 jdold07
Copyright (c) 2022-2024 @tsdevau

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@

## **What it does...**

Designed to to access Kata information and a user's completed Kata information provided through the [Codewars.com](https://www.codewars.com) API. Then, armed with that, produce a detailed Kata description as a markdown file and save this to disk in an organised file structure.
Designed to access Kata information and a user's completed Kata information provided through the [Codewars.com](https://www.codewars.com) API. Then, armed with that, produce a detailed Kata description as a markdown file and save this to disk in an organised file structure.

Well that was the initial intent, however, it evolved to also collect the user's completed solutions, format them and save them to disk as a language file. And then, further extended to also fetch the test code for the kata and format & save that to disk as a test file. Configured correctly, this enables code solutions to be run against tests in your local environment.
Well, that was the initial intent, however, it evolved to also collect the user's completed solutions, format them and save them to disk as a language file. Then, further extended to also fetch the test code for the kata and format & save that to disk as a test file. Configured correctly, this enables code solutions to be run against tests in your local environment.

<br>

## **Why do it...**

I was trying to organise an absolute mess of completed Kata files on my own system that have accumulated over the course of my time on [Codewars.com](https://www.codewars.com). I almost always prefer to code the solutions in my own familiar IDE environment in favour of the online editor. Over time this has amounted to an unordered mess of saved files that I always had intentions of getting sorted.
I was trying to organise an absolute mess of completed Kata files on my system that have accumulated throughout my time on [Codewars.com](https://www.codewars.com). I almost always prefer to code the solutions in my own familiar IDE environment in favour of the online editor. Over time this has amounted to an unordered mess of saved files that I always had intentions of getting sorted.

In another project, I will be organising all my completed solutions into a Github repository in order to:
In another project, I will be organising all my completed solutions into a GitHub repository to:

1. Organise all the mess in a consistent and organised format.
2. Maintain a kind-of place of reference for me (and now others) to refer to.
3. Become more proficient with git and making it part of the normal flow.
4. Finally getting wrapping my head around unit testing by creating tests for each completed Kata.
2. Maintain a kind of place of reference for me (and now others) to refer to.
3. Become more proficient with git and make it part of the normal flow.
4. Finally wrapping my head around unit testing by creating tests for each completed Kata.
5. And now, with this app, writing an app to automate some of the repetitive work.

<br>
Expand All @@ -42,21 +42,21 @@ Now all that was done as a big initial import, I needed a way to keep it up-to-d

## **Where am I up to?**

So, it's _functional_ 🥳 and I think it now does most everything I need it to do. However, there are still several tweaks I know I'd like to make. The main things I'm aware of are:
So, it's _functional_ 🥳 and I think it now does almost everything I need it to do. However, there are still several tweaks I know I'd like to make. The main things I'm aware of are:

1.~~Currently, when grabbing solutions from the profile page, it only reads the first page of the infinite scroll. I just haven't needed anything more than this, so I haven't done it. As I update it frequently, I don't need solutions beyond the first page, as the list is sorted most recent to oldest. For a bulk import, this would not be sufficient, and you would want to be able to collect all solutions.~~ 🥳 This has now been added! Including a config option flag to get all or only the first page.
2.~~While looping what needs updating, it currently calls ~~to make the root kata folder and~~ the markdown description for each completed language of a given Kata. I want to modify this to remove the unnecessary rewrite.~~ 🥳 This has been completed now... _I think_.
3.~~Finish commenting all the code to it's explicit as to what everything is doing (preferably before I have to work it out again 😫)~~ 🥳 This has been completed now... _I think_.
4.~~Create all the types properly to eliminate the tons of any's that I'm currently using 😜~~ 🥳 This has been completed now... _I think_.
1.~~Currently, when grabbing solutions from the profile page, it only reads the first page of the infinite scroll. I just haven't needed anything more than this, so I haven't done it. As I update it frequently, I don't need solutions beyond the first page, as the list is sorted from most recent to oldest. For a bulk import, this would not be sufficient, and you would want to be able to collect all solutions.~~ 🥳 This has now been added! Including a config option flag to get all or only the first page.
2.~~While looping what needs updating, it currently calls ~~to make the root Kata folder and~~ the markdown description for each completed language of a given Kata. I want to modify this to remove the unnecessary rewrite.~~ 🥳 This has been completed now... _I think_.
3.~~Finish commenting all the code so it's explicit as to what everything is doing (preferably before I have to work it out again 😫)~~ 🥳 This has been completed now... _I think_.
4.~~Create all the types properly to eliminate the tons of _any_'s that I'm currently using 😜~~ 🥳 This has been completed now... _I think_.
5. Currently only capable of handling languages I've completed Katas in on [Codewars.com](https://www.codewars.com). I would like to extend the app to handle additional languages.
6. Add to this readme or other similar documentation in regard to installation, configuration and running the app.
7. Currently the app uses the session ID cookie to access the user profile and tests for Kata the user has completed. This is a bit of pain, as it requires grabbing that from Dev Tools to add to the config. I'd like to try and find a more elegant solution to handling authentication.
8. I'm sure there are other things, but the escape me right now
6. Add to this readme or other similar documentation regarding installation, configuration and running the app.
7. Currently, the app uses the session ID cookie to access the user profile and tests for Kata the user has completed. This is a bit of pain, as it requires grabbing that from Dev Tools to add to the config. I'd like to try and find a more elegant solution to handling authentication.
8. I'm sure there are other things, but they escape me right now

But, for the time being, it works! So I'll see where it goes from here.

<br>

## **Thanks to the creators & maintainers of the dependency modules I used to make this app work!**

An little extra credit to [IonicaBizau](https://github.com/IonicaBizau/json2md). Although he/she/they would't know it, while fumbling with the idea of this whole thing, it was stumbling onto this library and going through its repo that finally gave me the push to just have a go and pursue actually creating this little project instead of leaving it as just an idea.
A little extra credit to [IonicaBizau](https://github.com/IonicaBizau/json2md). Although he/she/they wouldn't know it, while fumbling with the idea of this whole thing, it was stumbling onto this library and going through its repo that finally gave me the push to just have a go and pursue creating this little project instead of leaving it as just an idea.
2 changes: 1 addition & 1 deletion build.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ await esbuild.build({
minify: true,
legalComments: "none",
platform: "node",
target: "node18",
target: "node20",
external: [],
outdir: "dist",
format: "esm",
Expand Down
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,17 +45,17 @@
"cheerio": "1.0.0-rc.12",
"json2md": "^2.0.1",
"node-fetch": "^3.3.2",
"puppeteer": "^22.0.0"
"puppeteer": "^22.1.0"
},
"devDependencies": {
"@types/cheerio": "^0.22.35",
"@types/json2md": "^1.5.4",
"@types/node": "^20.11.17",
"@typescript-eslint/eslint-plugin": "^6.21.0",
"@typescript-eslint/parser": "^6.21.0",
"@types/node": "^20.11.19",
"@typescript-eslint/eslint-plugin": "^7.0.1",
"@typescript-eslint/parser": "^7.0.1",
"esbuild": "^0.20.0",
"eslint": "^8.56.0",
"prettier": "^3.2.5",
"prettier-plugin-packagejson": "^2.4.10"
"prettier-plugin-packagejson": "^2.4.11"
}
}
Loading

0 comments on commit ffb762e

Please sign in to comment.