-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
59 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,58 @@ | ||
--- | ||
title: 'Renovate Bot Open-source contribution' | ||
pubDate: 2023-11-01 | ||
description: 'This is the first post of my new Astro blog.' | ||
author: 'Tim Jinna' | ||
title: "Renovate Bot: Open-source Contributions" | ||
pubDate: 2022-11-01 | ||
description: "My story of making a contribution to Renovatebot" | ||
author: "Tim Jinna" | ||
image: | ||
url: '/assets/projects/1/image.jpg' | ||
alt: 'Renovatebot logo' | ||
tags: ["astro", "blogging", "learning in public"] | ||
url: "/assets/projects/1/image.jpg" | ||
alt: "Renovatebot logo" | ||
tags: | ||
[ | ||
"open-source", | ||
"renovatebot", | ||
"Github", | ||
"learning in public", | ||
] | ||
--- | ||
# Renovate bot open-source contribution! | ||
|
||
# My Renovate Bot Open-source Contribution Adventure! | ||
|
||
<!-- ![Pic](https://docs.astro.build/assets/full-logo-light.png) --> | ||
|
||
**Published** on: 2023-11-01 | ||
|
||
Welcome to my _new blog_ about learning Astro! Here, I will share my learning journey as I build a new website. | ||
**All My Pull Request**: [Check it out here](https://github.com/renovatebot/renovate/pulls?q=is%3Apr+author%3Acjtim+) | ||
|
||
## TL;DR | ||
|
||
In a nutshell, I managed to enhance Renovatebot's syntax parser within the Scala and Kotlin modules. | ||
|
||
## The Story Unfolds | ||
|
||
It all started back in July 2022 when I first came across Renovatebot. The goal was to enhance the developer experience within our company. After diving into the documentation and conducting thorough tests, I stumbled upon an issue with parsing Scala repositories. Scala allows variable lookup from inside a package definition, which can be seen in an example from IntelliJ [here](https://github.com/JetBrains/intellij-scala/blob/76efc6cfa54909926542d0138492d52a22aa65e3/project/dependencies.scala#L4). | ||
|
||
I tried my hand at configuring it for a while using the [regex Manager](https://docs.renovatebot.com/modules/manager/regex/), but the results weren't as impressive as I'd hoped. So, I made a bold decision – to do something I had never done before: clone the repository and rewrite the parser manager. To be honest, the code was quite a challenge, and testing it required writing some additional scripts. | ||
|
||
## The Technical Side | ||
|
||
The solution I came up with was a new function I named `extractAllPackageFiles`. In the previous version, the Scala manager processed one `.scala` file at a time using `extractPackageFile` function, which had its limitations when it came to looking up variables in other files. | ||
|
||
With the new function, I managed to: | ||
|
||
## What I've accomplished | ||
1. Iterate through all Scala files. | ||
2. Store variables inside a Hashmap. | ||
3. Populate the dependencies object. | ||
|
||
1. **Installing Astro**: First, I created a new Astro project and set up my online accounts. | ||
This enhancement allowed the Renovatebot Scala manager to read variables from other files, making it more powerful and versatile. | ||
|
||
2. **Making Pages**: I then learned how to make pages by creating new `.astro` files and placing them in the `src/pages/` folder. | ||
## My Contribution Highlights | ||
|
||
3. **Making Blog Posts**: This is my first blog post! I now have Astro pages and Markdown posts! | ||
Here are the Pull Requests where you can see the improvements I made: | ||
|
||
## What's next | ||
1. [Fix(manager/sbt): Allow adding Compiler Plugins #17006](https://github.com/renovatebot/renovate/pull/17006) | ||
2. [Fix(manager/sbt): Allow star comments #17005](https://github.com/renovatebot/renovate/pull/17005) | ||
3. [Fix(managers/gradle): Allow dot annotation in version.ref #21820](https://github.com/renovatebot/renovate/pull/21820) | ||
4. [Fix(managers/sbt): SBT Multiple Variable File Lookup #21622](https://github.com/renovatebot/renovate/pull/21622) | ||
5. [Chore(managers/sbt): Remove Unused Types #21570](https://github.com/renovatebot/renovate/pull/21570) | ||
|
||
I will finish the Astro tutorial, and then keep adding more posts. Watch this space for more to come. | ||
These contributions were a significant step in improving Renovatebot and its capabilities. I'm excited to continue my journey in the world of open-source contributions, and I hope this story inspires others to step out of their comfort zones and make a difference in the open-source community. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50dbdf3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
cjtim-github-io – ./
cjtim.vercel.app
cjtim.com
www.cjtim.com
cjtim-github-io-git-master-cjtim.vercel.app
cjtim-github-io-cjtim.vercel.app