Skip to content

Commit

Permalink
Version 2.14.0
Browse files Browse the repository at this point in the history
Signed-off-by: Pierre-Yves Lapersonne <pierreyves.lapersonne@orange.com>
  • Loading branch information
pylapp committed Mar 1, 2024
2 parents 1270968 + 939734f commit 361b0e5
Show file tree
Hide file tree
Showing 10 changed files with 484 additions and 91 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
toolbox/github/data
toolbox/diver/data
toolbox/gitlab/data
toolbox/utils/_templates/new-GitHub-repository-contributors.fr.template.txt.result
172 changes: 90 additions & 82 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,147 +1,155 @@
# CHANGELOG
# Changelog

## Version 2.13.0
All notable changes to this project will be documented in this file.

### Features
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

- [#98](https://github.com/Orange-OpenSource/floss-toolbox/issues/98) Diver - Compute metrics with in parameter URL to clone repo
## Unreleased

### Bugs
## [2.14.0] - 2024-03-01

- [#96](https://github.com/Orange-OpenSource/floss-toolbox/issues/96) Project - Broken links in README
- Generate template-based text using variables ([#84](https://github.com/Orange-OpenSource/floss-toolbox/issues/84))
- Make CHANGELOG more compliant ([#103](https://github.com/Orange-OpenSource/floss-toolbox/issues/103))

## Version 2.12.0
## [2.13.0] - 2023-07-19

### Features
### Added

- [#28](https://github.com/Orange-OpenSource/floss-toolbox/issues/28) Diver - Lines of codes and useful metrics
- Diver - Compute metrics with in parameter URL to clone repo ([#98](https://github.com/Orange-OpenSource/floss-toolbox/issues/98))

### Changes
### Fixed

- [#87](https://github.com/Orange-OpenSource/floss-toolbox/issues/87) Project - Add DCO
- [#90](https://github.com/Orange-OpenSource/floss-toolbox/issues/90) Project - Add security policy file
- [#85](https://github.com/Orange-OpenSource/floss-toolbox/issues/85) Project - Split README files
- [#86](https://github.com/Orange-OpenSource/floss-toolbox/issues/86) Licenses Inventory - Move HTML test files to archives of release
- [#93](https://github.com/Orange-OpenSource/floss-toolbox/issues/93) GitHub - Add in dry-run Gemfiles
- Project - Broken links in README ([#96](https://github.com/Orange-OpenSource/floss-toolbox/issues/96))

## Version 2.11.0
## [2.12.0] - 2023-07-18

### Features
### Added

- [#82](https://github.com/Orange-OpenSource/floss-toolbox/issues/82) GitHub - Set teams permissions to read
- Diver - Lines of codes and useful metrics ([#28](https://github.com/Orange-OpenSource/floss-toolbox/issues/28))

## Version 2.10.1
### Changed

### Bugs
- Project - Add DCO ([#87](https://github.com/Orange-OpenSource/floss-toolbox/issues/87))
- Project - Add security policy file ([#90](https://github.com/Orange-OpenSource/floss-toolbox/issues/90))
- Project - Split README files ([#85](https://github.com/Orange-OpenSource/floss-toolbox/issues/85))
- Licenses Inventory - Move HTML test files to archives of release ([#86](https://github.com/Orange-OpenSource/floss-toolbox/issues/86))
- GitHub - Add in dry-run Gemfiles ([#93](https://github.com/Orange-OpenSource/floss-toolbox/issues/93))

- [#80](https://github.com/Orange-OpenSource/floss-toolbox/issues/80) Diver - Path variables not protected
## [2.11.0] - 2023-06-28

## Version 2.10.0
### Added

### Features
- GitHub - Set teams permissions to read ([#82](https://github.com/Orange-OpenSource/floss-toolbox/issues/82))

- [#77](https://github.com/Orange-OpenSource/floss-toolbox/issues/77) Licenses Inventory - New release
## [2.10.1] - 2023-05-31

## Version 2.9.0
### Fixed

### Features
- Diver - Path variables not protected ([#80](https://github.com/Orange-OpenSource/floss-toolbox/issues/80))

- [#64](https://github.com/Orange-OpenSource/floss-toolbox/issues/64) Licenses Inventory - New release
## [2.10.0] - 2023-05-30

## Version 2.8.0
### Added

### Features
- Licenses Inventory - New release ([#77](https://github.com/Orange-OpenSource/floss-toolbox/issues/77))

- [#68](https://github.com/Orange-OpenSource/floss-toolbox/issues/68) Project - Split dry run
## [2.9.0] - 2023-03-31

### Changes
### Added

- [#70](https://github.com/Orange-OpenSource/floss-toolbox/issues/70) Project - Update copyright
- [#69](https://github.com/Orange-OpenSource/floss-toolbox/issues/69) Project - Improve README
- Licenses Inventory - New release ([#64](https://github.com/Orange-OpenSource/floss-toolbox/issues/64))

## Version 2.7.1
## [2.8.0] - 2023-03-10

### Changes
### Added

- [#63](https://github.com/Orange-OpenSource/floss-toolbox/issues/63) Add missing files
- Project - Split dry run ([#68](https://github.com/Orange-OpenSource/floss-toolbox/issues/68))

## Version 2.7.0
### Changed

### Features
- Project - Update copyright ([#70](https://github.com/Orange-OpenSource/floss-toolbox/issues/70))
- Project - Improve README ([#69](https://github.com/Orange-OpenSource/floss-toolbox/issues/69))

- [#2](https://github.com/Orange-OpenSource/floss-toolbox/issues/2) Package manager - Extract from files downloaded dependencies
## [2.7.1]

## Version 2.6.0
### Changed

### Features
- Add missing files ([#63](https://github.com/Orange-OpenSource/floss-toolbox/issues/63))

- [#57](https://github.com/Orange-OpenSource/floss-toolbox/issues/57) Look for leaks and vulnerabilities with exclusion of projects
## [2.7.0] - 2023-01-18

## Version 2.5.0
### Added

### Features
- Package manager - Extract from files downloaded dependencies ([#2](https://github.com/Orange-OpenSource/floss-toolbox/issues/2))

- [#32](https://github.com/Orange-OpenSource/floss-toolbox/issues/32) GitLab Auto Backup
- [#49](https://github.com/Orange-OpenSource/floss-toolbox/issues/49) Look for leaks (GitLab)
## [2.6.0] - 2022-05-05

### Bugs
### Added

- [#52](https://github.com/Orange-OpenSource/floss-toolbox/issues/52) Failure of git log if no commits
- Look for leaks and vulnerabilities with exclusion of projects ([#57](https://github.com/Orange-OpenSource/floss-toolbox/issues/57))

## Version 2.4.0
## [2.5.0] - 2022-03-09

### Features
### Added

- [#44](https://github.com/Orange-OpenSource/floss-toolbox/issues/44) Look for leaks (GitHub)
- [#29](https://github.com/Orange-OpenSource/floss-toolbox/issues/29) Dry run
- GitLab Auto Backup ([#32](https://github.com/Orange-OpenSource/floss-toolbox/issues/32))
- Look for leaks (GitLab) ([#49](https://github.com/Orange-OpenSource/floss-toolbox/issues/49))

### Refactoring
### Fixed

- [#37](https://github.com/Orange-OpenSource/floss-toolbox/issues/37) Check of vulnerabilities #37
- [#40](https://github.com/Orange-OpenSource/floss-toolbox/issues/40) Fix typo in doc and files
- Failure of git log if no commits ([#52](https://github.com/Orange-OpenSource/floss-toolbox/issues/52))

## Version 2.3.0
## [2.4.0] - 2022-03-08

### Features
### Added

- [#20](https://github.com/Orange-OpenSource/floss-toolbox/issues/20) Find repositories with vulnerabilities (Dependabot)
- Look for leaks (GitHub) ([#44](https://github.com/Orange-OpenSource/floss-toolbox/issues/44))
- Dry run ([#29](https://github.com/Orange-OpenSource/floss-toolbox/issues/29))

## Version 2.2.0
### Changed

### Features
- Check of vulnerabilities ([#37](https://github.com/Orange-OpenSource/floss-toolbox/issues/37))
- Fix typo in doc and files ([#40](https://github.com/Orange-OpenSource/floss-toolbox/issues/40))

- [#19](https://github.com/Orange-OpenSource/floss-toolbox/issues/19) Backup of repositories
- [#27](https://github.com/Orange-OpenSource/floss-toolbox/issues/27) Extract email addresses
## [2.3.0] - 2022-02-25

### Features (diver)
### Added

- [#27](https://github.com/Orange-OpenSource/floss-toolbox/issues/27) Extract email addresses
- Find repositories with vulnerabilities (Dependabot) ([#20](https://github.com/Orange-OpenSource/floss-toolbox/issues/20))

## Version 2.1.0
## [2.2.0] 2022-02-24

### Features
### Added

- [#13](https://github.com/Orange-OpenSource/floss-toolbox/issues/13) List all contributors of a Git repository using Git history
- Backup of repositories ([#19](https://github.com/Orange-OpenSource/floss-toolbox/issues/19))
- Extract email addresses ([#27](https://github.com/Orange-OpenSource/floss-toolbox/issues/27))

## Version 2.0.0
## [2.1.0] - 2021-10-06

### Features
### Added

- [#4](https://github.com/Orange-OpenSource/floss-toolbox/issues/4) Get all members of GitHub organization
- [#4](https://github.com/Orange-OpenSource/floss-toolbox/issues/4) Get members who don't have 2FA enabled
- [#4](https://github.com/Orange-OpenSource/floss-toolbox/issues/4) Get members of organization with "company" field undefined
- [#4](https://github.com/Orange-OpenSource/floss-toolbox/issues/4) Get projects which don't have any assigned GitHub team
- [#4](https://github.com/Orange-OpenSource/floss-toolbox/issues/4) Get users which have undefined or hidden email
- [#4](https://github.com/Orange-OpenSource/floss-toolbox/issues/4) Get users which may have not suitable fullname
- [#4](https://github.com/Orange-OpenSource/floss-toolbox/issues/4) Get repositories with undefined licenses
- [#4](https://github.com/Orange-OpenSource/floss-toolbox/issues/4) Get repositories which seems to be unconform (i.e. missing files)
- [#4](https://github.com/Orange-OpenSource/floss-toolbox/issues/4) Get repositories which seems to be empty or have not enough files
- [#4](https://github.com/Orange-OpenSource/floss-toolbox/issues/4) Define permissions (push / write) for all contributors of all projects (except teams and organization owners)
- [#4](https://github.com/Orange-OpenSource/floss-toolbox/issues/4) Define permissions (push / write) for all teams of all projects
- List all contributors of a Git repository using Git history ([#13](https://github.com/Orange-OpenSource/floss-toolbox/issues/13))

## Version 1.0.0
## [2.0.0] - 2021-06-05

### Features
## Added

- Get all members of GitHub organization ([#4](https://github.com/Orange-OpenSource/floss-toolbox/issues/4))
- Get members who don't have 2FA enabled ([#4](https://github.com/Orange-OpenSource/floss-toolbox/issues/4))
- Get members of organization with "company" field undefined ([#4](https://github.com/Orange-OpenSource/floss-toolbox/issues/4))
- Get projects which don't have any assigned GitHub team ([#4](https://github.com/Orange-OpenSource/floss-toolbox/issues/4))
- Get users which have undefined or hidden email ([#4](https://github.com/Orange-OpenSource/floss-toolbox/issues/4))
- Get users which may have not suitable fullname ([#4](https://github.com/Orange-OpenSource/floss-toolbox/issues/4))
- Get repositories with undefined licenses ([#4](https://github.com/Orange-OpenSource/floss-toolbox/issues/4))
- Get repositories which seems to be unconform (i.e. missing files) ([#4](https://github.com/Orange-OpenSource/floss-toolbox/issues/4))
- Get repositories which seems to be empty or have not enough files ([#4](https://github.com/Orange-OpenSource/floss-toolbox/issues/4))
- Define permissions (push / write) for all contributors of all projects (except teams and organization owners) ([#4](https://github.com/Orange-OpenSource/floss-toolbox/issues/4))
- Define permissions (push / write) for all teams of all projects ([#4](https://github.com/Orange-OpenSource/floss-toolbox/issues/4))

## [1.0.0]

### Added

- Find contributors in files using a base of words and producing logs
- Find contributors in git logs
Expand Down
3 changes: 3 additions & 0 deletions CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,14 @@ CODE_OF_CONFLICT.md @pylapp
CONTRIBUTORS.txt @pylapp
LICENSE.txt @pylapp
README.md @pylapp
DCO.txt @pylapp
SECURITY.md @pylapp

# Toolbox

/toolbox/LicensesInventory/ @pylapp @laurentora
/toolbox/diver/ @pylapp
/toolbox/github/ @pylapp
/toolbox/gitlab/ @pylapp
/toolbox/utils/ @pylapp
/toolbox/dry-run.sh @pylapp
21 changes: 13 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,34 @@
[![Shell](https://img.shields.io/badge/-Shell-89e051?style=for-the-badge)](https://github.com/Orange-OpenSource/floss-toolbox/search?l=shell)
[![Python](https://img.shields.io/badge/-Python-3572A5?style=for-the-badge)](https://github.com/Orange-OpenSource/floss-toolbox/search?l=python)
[![Ruby](https://img.shields.io/badge/-Ruby-701516?style=for-the-badge)](https://github.com/Orange-OpenSource/floss-toolbox/search?l=ruby)
[![PHP](https://img.shields.io/badge/-PHP-4F5B93?style=for-the-badge)](https://github.com/Orange-OpenSource/floss-toolbox/search?l=php)

# FLOSS Toolbox

Toolbox to help developers and open source referents to have cleaner projects in _GitHub_ organizations, and more.

Toolbox is mainly written in _Shell_ because this language is very efficient for files processing and provides a strong and rich standard API with cool primitives. It helps also to call system primitives easily. Contains also _Ruby_ scripts. _Ruby_ are shiny gems, I love them. _Python_ is also used.
Toolbox is mainly written in _Shell_ because this language is very efficient for files processing and provides a strong and rich standard API with cool primitives and nice performances due to system calls. It helps also to call system primitives easily.
Contains also _Ruby_ scripts. _Ruby_ are shiny gems, I love them.
_Python_ is also used.
And a bit of _PHP_ because it is nice to use several languages we are not used to (stop the routine!).
For these needs scripting is enough.

# Environment

You must have a _BASH_ ready environment and also _Ruby_.
Environment:
You should have mainly the following environments bellow, but have a look on each folder README:
- _Bash_ version **3.2.5**
- _Ruby_ version **2.7.1**
- _Python_ version **3.7**

# Project tree

There are four folders containing scripts and programs to make your life a bit easier:
There are 5 folders containing scripts and programs to make your life a bit easier:

1. _toolbox/diver_ contains scripts to scrap data in Git logs and histories, look for sensitive data in sources, etc.
2. _toolbox/github_ contains scripts and programs to make requests to GitHub API so as to automate some actions
3. _toolbox/gitlab_ contains scripts and programs to make requests to GitLab API so as to automate some actions
4. _toobox/LicensesInventory_ contains program to get licenses of third party components thanks to dependency manager files
1. _toolbox/diver_ contains scripts to scrap data in Git logs and histories, look for sensitive data in sources, etc ;
2. _toolbox/github_ contains scripts and programs to make requests to GitHub API so as to automate some actions ;
3. _toolbox/gitlab_ contains scripts and programs to make requests to GitLab API so as to automate some actions ;
4. _toolbox/LicensesInventory_ contains program to get licenses of third party components thanks to dependency manager files ;
5. _toolbox/utils_ contains scripts to generate texts and stuff like that.

Feel free to read each README available in all of the subdirectories listed above.

Expand Down
14 changes: 13 additions & 1 deletion toolbox/dry-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

# Since...............: 08/03/2021
# Description.........: Make a dry-run of the project to check if everything is ready to use
# Version.............: 3.0.0
# Version.............: 3.1.0

set -eu

Expand Down Expand Up @@ -84,6 +84,18 @@ echo "----------------------------------"

RunDryRunInFolder "gitlab"

# Utils features
# --------------

echo -e "\n"
read -p "✋ Press any key to dry run utils features"

echo -e "\n---------------------------------"
echo "Assertions for the Utils features"
echo "---------------------------------"

RunDryRunInFolder "utils"

# Licenses Inventory tool
# -----------------------

Expand Down
35 changes: 35 additions & 0 deletions toolbox/utils/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Utils

# Generate text from template

## Prerequisites

- PHP

## Install prerequisites

```shell
brew install php
```

## Description

Sometimes as open source reference or software forges administrator, we need so send emails to people.
These emails can be big with lot of details and hyperlinks to resources, and writing them is time expansive.
Because these emails are almost the same (except with some details), we can generate them using a template and variables.

```shell
php text-generator.php "_templates/new-GitHub-repository-contributors.fr.template.txt" "_templates/values.ini"
```

Here we give to the `text-generator.php` PHP script a template to process (first argument) and also an .ini file containing values (second argument). The script will check if all variables are filled, then will replace each entry in the text by the values.

For example, if we have such .ini file:

```text
[some_section_which_is_ignored]
; Some comment
VARIABLE_NAME = "Foo-Bar"
```

the script will replace all occurences of **%VARIABLE_NAME%** by "Foo-Bar" in the text. Then a file with the new version will be created with quite the same name but _.result_ at the end.
Loading

0 comments on commit 361b0e5

Please sign in to comment.