Skip to content

Commit 3e45a9b

Browse files
committed
✨ create laravel integration for devmoath/jira-php
0 parents  commit 3e45a9b

File tree

20 files changed

+591
-0
lines changed

20 files changed

+591
-0
lines changed

.gitattributes

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/.github export-ignore
2+
/art export-ignore
3+
/tests export-ignore
4+
.gitattributes export-ignore
5+
.gitignore export-ignore
6+
CONTRIBUTING.md export-ignore
7+
LICENSE.md export-ignore
8+
phpstan.neon.dist export-ignore
9+
phpunit.xml.dist export-ignore
10+
README.md export-ignore
11+
rector.php export-ignore

.github/dependabot.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
labels:
8+
- "dependencies"

.github/workflows/formats.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Formats
2+
3+
on: [ 'push', 'pull_request' ]
4+
5+
jobs:
6+
formats:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
fail-fast: true
10+
matrix:
11+
os: [ ubuntu-latest ]
12+
php: [ 8.2 ]
13+
stability: [ prefer-lowest, prefer-stable ]
14+
15+
name: Formats php${{ matrix.php }} - ${{ matrix.os }} - ${{ matrix.stability }}
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v3
20+
21+
- name: Setup PHP
22+
uses: shivammathur/setup-php@v2
23+
with:
24+
php-version: ${{ matrix.php }}
25+
coverage: none
26+
27+
- name: Install Composer dependencies
28+
run: composer update --${{ matrix.stability }} --no-interaction
29+
30+
- name: Coding Style Checks
31+
run: composer test:lint
32+
33+
- name: Refactor Checks
34+
run: composer test:refactor
35+
36+
- name: Type Checks
37+
run: composer test:types

.github/workflows/tests.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Tests
2+
3+
on: [ 'push', 'pull_request' ]
4+
5+
jobs:
6+
tests:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
fail-fast: true
10+
matrix:
11+
os: [ ubuntu-latest ]
12+
php: [ 8.1, 8.2 ]
13+
stability: [ prefer-lowest, prefer-stable ]
14+
15+
name: Tests php${{ matrix.php }} - ${{ matrix.os }} - ${{ matrix.stability }}
16+
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v3
20+
21+
- name: Setup PHP
22+
uses: shivammathur/setup-php@v2
23+
with:
24+
php-version: ${{ matrix.php }}
25+
coverage: pcov
26+
27+
- name: Install Composer dependencies
28+
run: composer update --${{ matrix.stability }} --no-interaction
29+
30+
- name: Unit Tests
31+
run: composer test:unit

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/.idea/
2+
/vendor/
3+
/.phpunit.result.cache
4+
/composer.lock

CONTRIBUTING.md

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
# CONTRIBUTING
2+
3+
Contributions are welcome, and are accepted via pull requests.
4+
Please review these guidelines before submitting any pull requests.
5+
6+
## Process
7+
8+
1. Fork the project
9+
2. Create a new branch
10+
3. Code, test, commit and push
11+
4. Open a pull request detailing your changes.
12+
13+
## Guidelines
14+
15+
* Please ensure the coding style running `composer lint`.
16+
* Send a coherent commit history, making sure each individual commit in your pull request is meaningful.
17+
* You may need to [rebase](https://git-scm.com/book/en/v2/Git-Branching-Rebasing) to avoid merge conflicts.
18+
* Please remember that we follow [SemVer](http://semver.org/).
19+
20+
## Setup
21+
22+
Clone your fork, then install the dev dependencies:
23+
24+
```bash
25+
composer install
26+
```
27+
28+
## Refactor
29+
30+
Refactor your code:
31+
32+
```bash
33+
composer refactor
34+
```
35+
36+
## Lint
37+
38+
Lint your code:
39+
40+
```bash
41+
composer lint
42+
```
43+
44+
## Tests
45+
46+
Run all tests:
47+
48+
```bash
49+
composer test
50+
```
51+
52+
Check code quality:
53+
54+
```bash
55+
composer test:refactor
56+
```
57+
58+
Check types:
59+
60+
```bash
61+
composer test:types
62+
```
63+
64+
Unit tests:
65+
66+
```bash
67+
composer test:unit
68+
```

LICENSE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright (c) Moath Alhajri <moath.alhajrii@gmail.com>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

README.md

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
<p align="center">
2+
<img src="art/example.png" alt="Jira Laravel">
3+
</p>
4+
5+
<p align="center">
6+
<a href="https://github.com/devmoath/jira-laravel/actions"><img alt="GitHub Workflow Status (0.x)" src="https://img.shields.io/github/actions/workflow/status/devmoath/jira-laravel/tests.yml?branch=0.x"></a>
7+
<a href="https://packagist.org/packages/devmoath/jira-laravel"><img alt="Total Downloads" src="https://img.shields.io/packagist/dt/devmoath/jira-laravel"></a>
8+
<a href="https://packagist.org/packages/devmoath/jira-laravel"><img alt="Latest Version" src="https://img.shields.io/packagist/v/devmoath/jira-laravel"></a>
9+
<a href="https://packagist.org/packages/devmoath/jira-laravel"><img alt="License" src="https://img.shields.io/github/license/devmoath/jira-laravel"></a>
10+
</p>
11+
12+
---
13+
14+
**Jira PHP** for Laravel is a supercharged PHP API client that allows you to interact with
15+
the [Jira API](https://docs.atlassian.com/software/jira/docs/api/REST/8.0.0) and
16+
the [Service Desk API](https://docs.atlassian.com/jira-servicedesk/REST/5.2.0/).
17+
18+
> **Note**
19+
>
20+
> This repository contains the integration code of the **Jira PHP** for Laravel. If you want to use the **Jira PHP**
21+
> client in a framework-agnostic way, take a look at the [devmoath/jira-php](https://github.com/devmoath/jira-php)
22+
> repository.
23+
24+
## Get Started
25+
26+
> **Requires [PHP 8.1+](https://php.net/releases/)**
27+
28+
First, install `devmoath/jira-laravel` via the [Composer](https://getcomposer.org/) package manager:
29+
30+
```bash
31+
composer require devmoath/jira-laravel
32+
```
33+
34+
Next, publish the configuration file:
35+
36+
```bash
37+
php artisan vendor:publish --provider="Jira\Laravel\ServiceProvider"
38+
```
39+
40+
This will create a `config/jira.php` configuration file in your project, which you can modify to your needs
41+
using environment variables:
42+
43+
```dotenv
44+
JIRA_USERNAME=USERNAME
45+
JIRA_PASSWORD=PASSWORD
46+
JIRA_HOST=jira.domain.com
47+
```
48+
49+
Finally, you may use the `Jira` facade to access the available functions:
50+
51+
```php
52+
use Jira\Laravel\Facades\Jira;
53+
54+
$result = Jira::issues()->search();
55+
56+
echo $result['issues'][0]['key']; // KEY-1000
57+
```
58+
59+
## Usage
60+
61+
For usage examples, take a look at the [devmoath/jira-php](https://github.com/devmoath/jira-php) repository.
62+
63+
---
64+
65+
Jira PHP for Laravel is an open-sourced software licensed under the **[MIT license](https://opensource.org/licenses/MIT)**.

art/example.png

169 KB
Loading

art/social.png

387 KB
Loading

0 commit comments

Comments
 (0)