Download the PHP package shawnhooper/outdated-to-jira without Composer
On this page you can find all versions of the php package shawnhooper/outdated-to-jira. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download shawnhooper/outdated-to-jira
More information about shawnhooper/outdated-to-jira
Files in shawnhooper/outdated-to-jira
Package outdated-to-jira
Short Description Creates JIRA tickets for outdated Composer and npm dependencies.
License MIT
Informations about the package outdated-to-jira
Outdated Dependency Jira Ticket Creator
This application automates the process of tracking outdated Composer and npm dependencies by creating JIRA tickets for each outdated package.
Features
- Composer & NPM Support: Checks for outdated dependencies using
composer outdated
ornpm outdated
. - JIRA Integration: Creates JIRA tickets in a specified project for each identified outdated dependency. Automatically sets ticket priority based on SemVer update level (MAJOR/MINOR/PATCH).
- Configurable: Accepts JIRA connection details (URL, API token, project key, issue type) via configuration array.
- Filtering: Allows processing only specific packages.
- Duplicate Prevention: Checks for existing JIRA tickets for the same dependency and version before creating a new one.
- PSR-3 Logging: Uses a PSR-3 compliant logger for output.
- GitHub Action: Provides a ready-to-use GitHub Action for automated checks in CI/CD pipelines.
Requirements
- PHP 8.2 or higher
- Composer (if checking composer.json)
- npm (if checking package.json)
- Access to a JIRA Cloud instance with API access.
- An API token for JIRA Cloud authentication.
Installation (as a Library)
Add this package as a development dependency to your project using Composer:
Library Usage
Instantiate the DependencyCheckerService
and call its process
method.
Return Values
The process
method returns an associative array where keys are dependency names. Each value is another array containing:
DependencyCheckerService::RESULT_STATUS_KEY
: A string indicating the outcome (e.g.,STATUS_TICKET_CREATED
,STATUS_EXISTING_TICKET
,STATUS_DRY_RUN_WOULD_CREATE
,STATUS_FILTERED_OUT
,STATUS_PROCESSING_ERROR
).DependencyCheckerService::RESULT_JIRA_KEY
: The created or found JIRA issue key (string), ornull
if not applicable.
Testing
This project includes unit tests written using PHPUnit to verify the core components.
-
Install Dependencies: Ensure you have installed the development dependencies:
- Run Tests: Execute the test suite using the following command from the project root:
Continuous Integration
This project uses GitHub Actions for Continuous Integration (CI). The workflow is defined in .github/workflows/ci.yml
and includes the following:
- Triggers: Runs automatically on pushes to the
main
andstaging
branches, and on any pull request targeting these branches. - Jobs:
- Testing: Runs the PHPUnit test suite across multiple PHP versions (defined in the workflow matrix) to ensure compatibility.
- Caching: Caches Composer dependencies to speed up build times.
This helps ensure that code changes maintain functionality and compatibility.
Using as a GitHub Action
This tool can also be run as a GitHub Action within your own workflows.
Example Workflow:
Action Inputs:
dependency-file
(Required): Path tocomposer.json
orpackage.json
relative to the root of the repository where the workflow runs.dry-run
(Optional): Set to'true'
to simulate without creating tickets. Defaults to'false'
.packages
(Optional): A space-separated string of package names to filter for.jira-url
(Required): Base URL of your JIRA instance.jira-user-email
(Required): Email address for JIRA API authentication.jira-api-token
(Required): JIRA API token for authentication (Use GitHub Secrets).jira-project-key
(Required): JIRA project key.jira-issue-type
(Required): JIRA issue type name (e.g.,Task
,Bug
).
Important: Store sensitive values like JIRA_API_TOKEN
, JIRA_USER_EMAIL
, and potentially JIRA_URL
as encrypted GitHub Secrets in the repository that uses this action.
All versions of outdated-to-jira with dependencies
guzzlehttp/guzzle Version ^7.0
symfony/console Version ^6.0|^7.0
psr/log Version ^1.1 || ^2.0 || ^3.0
symfony/process Version ^6.0|^7.0
monolog/monolog Version ^2.0 || ^3.0
vlucas/phpdotenv Version ^5.4