Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/prestashop/presthubot
PrestaShop maintainer's best friend
https://github.com/prestashop/presthubot
cli hacktoberfest prestashop
Last synced: about 1 month ago
JSON representation
PrestaShop maintainer's best friend
- Host: GitHub
- URL: https://github.com/prestashop/presthubot
- Owner: PrestaShop
- License: mit
- Created: 2019-11-07T13:13:57.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-10-07T06:30:00.000Z (about 1 month ago)
- Last Synced: 2024-10-07T10:57:56.401Z (about 1 month ago)
- Topics: cli, hacktoberfest, prestashop
- Language: PHP
- Homepage:
- Size: 791 KB
- Stars: 5
- Watchers: 14
- Forks: 7
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# PrestHubot
## Installation
* Install dependencies
```bash
composer install
```
* Fetch a Github Token : https://github.com/settings/tokens/new?description=PrestHubot&scopes=repo,read:org## Configuration
You can using parameters :
* `--ghtoken=`
* `--username= `**OR**
You can use .env file :
* Copy .env.dist to .env
* Define your token & username from Github
```
GH_TOKEN=
GH_USERNAME=
```## Usage
### Check PR
Permits to check PrestaShop PR (and their status)```bash
php bin/console github:check:pr
```#### Parameters
| Parameter | Required | Notes |
| ------------- | ------------- | ------------- |
| `--ghtoken=` | Yes/No | Use it or use .env |
| `--request=` | No | Use the title of a search request or create your specific request |
| `--exclude:author=` | No | Exclude for displaying PR created by |
| `--exclude:reviewer=` | No | Exclude for displaying PR approved by |
| `--filter:file=` | No | Filter on extensions file (one or many separated by comma) |
| `--filter:numapproved=` | No | Filter on number of approved reviews (one or many separated by comma) |
| `--orderBy=` | No | Order by columns (one or many separated by comma : projectName, id, createdAt) |#### Samples
* Fetch PR to review with 1 or 2 approved reviews, excluding Progi1984's PR and PR that Progi1984 has approved
`php bin/console github:check:pr --request "PR Waiting for Review" --filter:numapproved=2,1 --exclude:reviewer=Progi1984 --exclude:author=Progi1984`
### Check Module
Permits to check PrestaShop Modules```bash
php bin/console github:check:module
```#### Parameters
| Parameter | Required | Notes |
| ------------- | ------------- | ------------- |
| `--ghtoken=` | Yes/No | Use it or use .env |
| `--limit=` | Yes/No | Limit search (from offset and length of all repositories) |
| `--module=` | No | Filter only one module |
| `--branch=` | No | Branch for searching files (default: master) |#### Informations
| Column | | Notes|
| ------------- | ------------- | ------------- |
| Files | .travis.yml | Check if .travis.yml is present
Check if `before_deploy` & `deploy` are present in the file |### Check Repositories
Permits to check PrestaShop Repositories```bash
php bin/console github:check:repository
```#### Parameters
| Parameter | Required | Notes |
| ------------- | ------------- | ------------- |
| `--ghtoken=` | Yes/No | Use it or use .env |
| `--public` | No | Filter only on public repositories |
| `--private` | No | Filter only on private repositories |### Get Notifications
Get Github Notifications```bash
php bin/console github:notifications
```#### Parameters
| Parameter | Required | Notes |
| ------------- | ------------- | ------------- |
| `--ghtoken=` | Yes/No | Use it or use .env |### Get Stats
Get some stats```bash
php bin/console github:stats
```#### Parameters
| Parameter | Required | Notes |
| ------------- | ------------- | ------------- |
| `--ghtoken=` | Yes/No | Use it or use .env |
| `--username=` | Yes/No | Use it or use .env |### Get Stats from repository
Get some stats```bash
php bin/console github:stats:repository
```#### Parameters
| Parameter | Required | Notes |
| ------------- | ------------- | ------------- |
| `--ghtoken=` | Yes/No | Use it or use .env |
| `--repository=` | No | Just a repository in PS Organization or all the org if it is not defined |
| `--pr:date:created=` | No | Filter on creation date for PR |
| `--pr:date:merged=` | No | Filter on merge date for PR |### Generate Issues Report
Permits to track all issues created in the last month (4 weeks) for the PrestaShop project```bash
php bin/console github:issues:report
```#### Parameters
| Parameter | Required | Notes |
| ------------- | ------------- | ------------- |
| `--ghtoken=` | Yes/No | Use it or use .env |
| `--dateStart=` | Yes | Format date: `yyyy-mm-dd` |
| `--dateEnd=` | No | Format date: `yyyy-mm-dd`)` (default: dateStart + 28 days) |
| `--outputDir=` | No | Output directory (default: `var/report`) |### Generate Reviewers Report
Permits to track all reviews```bash
php bin/console github:review:report
```#### Parameters
| Parameter | Required | Notes |
| ------------- | ------------- | ------------- |
| `--ghtoken=` | Yes/No | Use it or use .env |
| `--dateStart=` | Yes | Format date: `yyyy-mm-dd` |
| `--dateEnd=` | No | Format date: `yyyy-mm-dd`)` (default: today) |
| `--byDate=<0|1>` | No | Report by date or author |### Export contributors
```bash
php bin/console github:contributors:export --contributorsFile contributors.csv --outputFile output.csv
```#### Parameters
| Parameter | Required | Notes |
| ------------- | ------------- | ------------- |
| `--ghtoken=` | Yes/No | Use it or use .env |
| `--contributorsFile=` | Yes | Contributors file |
| `--outputFile=` | Yes | Output file |### Export contributors Stats
```bash
php bin/console github:contributors:stats --contributorsFile contributors.csv --outputFile output.csv
```#### Parameters
| Parameter | Required | Notes |
| ------------- | ------------- | ------------- |
| `--ghtoken=` | Yes/No | Use it or use .env |
| `--contributorsFile=` | Yes | Contributors file |
| `--outputFile=` | Yes | Output file |### Slack Notifier for Core Team
Notify on Slack :
- Nightly Build Status
- If PR are needed to merge
- PR to review
- Modules releases
- Modules improvements```bash
php bin/console slack:notifier
```#### Parameters
| Parameter | Required | Notes |
| ------------- | ------------- | ------------- |
| `--ghtoken=` | Yes/No | Use it or use .env |
| `--slacktoken=` | Yes/No | Use it or use .env |
| `--slackchannel=` | Yes/No | Use it or use .env |### Release Note helper
Generate the list of resolved issues in a milestone```bash
php bin/console github:release:note
```#### Parameters
| Type | Name | Required | Notes | Default |
|---------------------------------|------------|----------|--------------------------------------|------------|
| Argument | milestone | No | milestone selected for search | none |
| Option | output | No | output between 'table' or 'markdown' | table |
| Option | repository | No | repository to explore | PrestaShop |Note that if the milestone is not defined, It will be asked to the user.
#### Example
```bash
php bin/console github:release:note 1.7.8.2 --repository=PrestaShop --output=table
or
php bin/console github:release:note 1.7.8.2 --repository=PrestaShop
or
php bin/console github:release:note 1.7.8.2 --output=table
or
php bin/console github:release:note 1.7.8.2
```
```
provide:
```bash
├─────────────────┼───────────────────────────────────────────────────────┼───────────────────────────────────────────────────────┤
│ Issues involved in the milestone 1.7.8.2 (3) │
├─────────────────┼───────────────────────────────────────────────────────┼───────────────────────────────────────────────────────┤
│ Issue N° │ url │ Title │
│ 26623 │ https://github.com/PrestaShop/PrestaShop/issues/26623 │ Release 1.7.8.2 │
│ 26327 │ https://github.com/PrestaShop/PrestaShop/issues/26327 │ Wishlist button disappears while using Faceted Search │
│ 23394 │ https://github.com/PrestaShop/PrestaShop/issues/23394 │ Missing Alias CustomerQueryBuilder.php │
└─────────────────┴───────────────────────────────────────────────────────┴───────────────────────────────────────────────────────┘Output generated in 0s for 3 rows.
```and
```bash
php bin/console github:release:note 1.7.8.2 --output=markdown
or
php bin/console github:release:note 1.7.8.2 --repository=PrestaShop --output=markdown
```provide:
```bash
Issues involved in the milestone 1.7.8.2
========================================- [Release 1.7.8.2](https://github.com/PrestaShop/PrestaShop/issues/26623)
- [Wishlist button disappears while using Faceted Search](https://github.com/PrestaShop/PrestaShop/issues/26327)
- [Missing Alias CustomerQueryBuilder.php](https://github.com/PrestaShop/PrestaShop/issues/23394)Output generated in 0s for 3 rows.
```### CQRS Endpoints
Get Commands and Queries developed as CQRS endpoints```bash
php bin/console github:cqrs:endpoints
```#### Parameters
| Parameter | Required | Notes |
| ------------- | ------------- | ------------- |
| `--ghtoken=` | Yes/No | Use it or use .env |