Fixing code and documentation, setting up CI - Sending Pull-Requests
Tags: perl, github, osdc, programming
Published: 2023-03-21 20:26:29

---
title: Fixing code and documentation, setting up CI - Sending Pull-Requests
published: true
description: Contributing to an open source Perl project and to the documentation of another project.
tags: perl, github, osdc, programming
# cover_image: https://direct_url_to_image.jpg
# Use a ratio of 100:42 for best results.
# published_at: 2023-03-21 05:15 +0000
---

This was the 6th session of the the [Open Source Developer Course (OSDC)](https://osdc.code-maven.com/) that I started to teach at the end of January. (We have a weekly session, but we had to skip several weeks in the middle).

This time instead of having a grand presentation we worked on a Perl library (module) that was failing its tests. Here are my notes about what we have accomplished during the session.

The changes we made were not huge, but I believe a little improvement every day by many people can lead to a lot of value to the whole open source ecosystem and through that to the world.

## Pull-Requests

* We sent several pull-requests to [Types-RENEEB](https://github.com/reneeb/Types-RENEEB)
    * [updated files generated by `dist zilla`](https://github.com/reneeb/Types-RENEEB/pull/7)
    * [fixing a test failure](https://github.com/reneeb/Types-RENEEB/pull/8)
    * [Adding GitHub Actions](https://github.com/reneeb/Types-RENEEB/pull/9). We started with the [GitHub Action skeleton](https://code-maven.com/github-actions) for Dist::Zilla.
    * Renee, the author of this project accepted our Pull-Requests within a few minutes. Then we sent another PR
    * [enabling more OSes and versions of Perl in GitHub Actions](https://github.com/reneeb/Types-RENEEB/pull/10)

## The workflow

During the session we first cloned the already forked repository, but I think it is better to clone the original repository and add the forked repository using `git remote add fork URL` so this is what I described here.

* Clone the original repository

```
git clone git@github.com:reneeb/Types-RENEEB.git
```

* Create a fork of the repository via GitHub UI.

* Setup a new git remote to point to the forked repository:

```
git remote add fork git@github.com:yewtc/Types-RENEEB.git
```

* Create a branch to prepare a pull-request

```
git checkout -b BRANCH
  make changes
git add .
git commit -m "..."
git push --set-upstream fork BRANCH
```

* Send the pull-request from the GitHub UI

* Integrate the progress of original repository to our local clone

```
git checkout master
git pull origin master
```

* Once the Pull-request was accepted we could delete the branch locally and remotely

```
git branch -d BRANCH
git push -d origin BRANCH
```

* We created Test coverage report of the Types-RENEEB pacakge. It was not too interesting as everything was 100%.

```
cpanm Dist::Zilla::App::Command::cover

dzil cover
```

## Another Pull-Request

* We also sent a [pull-request](https://github.com/pjcj/Devel--Cover/pull/319) to [Devel::Cover](https://github.com/pjcj/Devel--Cover) with this information.

## Plans

In the upcoming sessions we plan to work on more projects. Set up local development environments and configure GitHub Action workflows for projects require a database or access to some external system.

We will also find packages where the test coverage report is not 100% to understand that better.