Skip to content

Commit 220eb47

Browse files
committed
docs(readme): Update the readme with reviewed text
1 parent 05fee97 commit 220eb47

File tree

2 files changed

+15
-16
lines changed

2 files changed

+15
-16
lines changed

README.md

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ Use the PHP Prefixer CLI in your Github Actions
66

77
The **PHP Prefixer Build Action** integrates the [PHP-Prefixer](https://php-prefixer.com/) service with GitHub Actions.
88

9-
**PHP-Prefixer** is a service to apply PHP prefixes to namespaces, functions, helpers, traits, interfaces, etc. Start with a Composer project and a set of dependencies, and prefix all library files at once to generate a consistent prefixed codebase.
9+
**PHP-Prefixer** is a service to apply PHP prefixes to namespaces, functions, helpers, traits, interfaces, etc. You start with with a Composer project and a set of dependencies, and prefix all library files at once to generate a consistent prefixed codebase.
1010

11-
PHP-Prefixer abstracts the complexity of manually applying prefixes to PHP files. The service **automates and streamlines the process of prefixing** with the scalability and simplicity of serverless computing.
11+
PHP-Prefixer abstracts the complexity of manually applying prefixes to PHP files. The service **automates and streamlines the process of prefixing** while providing the scalability and simplicity of serverless computing.
1212

1313
PHP-Prefixer is a **rule-based expert system** that processes the project and dependencies iteratively to prefix every project file.
1414

15-
Given this sample class declaration:
15+
Here is a sample class declaration:
1616

1717
```php
1818
namespace ACME\Carbon;
@@ -42,13 +42,13 @@ class Carbon extends DateTime
4242
...
4343
```
4444

45-
An example repository has been created at https://github.com/PHP-Prefixer/hello-wp-world to show how to use this action in a real project. The repository also depends on a private dependency and uses GitHub PAT/Personal Access Tokens for authentication.
45+
An example repository has been created at https://github.com/PHP-Prefixer/hello-wp-world to show how to use this Action in a real project. The repository depends on a private dependency and uses GitHub PAT/Personal Access Tokens for authentication.
4646

4747
## Usage
4848

49-
To use the Action, you must create an account on [PHP-Prefixer](https://php-prefixer.com/) and prepare your projects with the prefix defined in the `composer.json` schema. Before using the Action and the command-line, we recommend checking the documentation and guides here: <https://php-prefixer.com/docs/>. You can also prefix your firsts projects on the service web interface, and in a second step, integrate Action in your repositories.
49+
To use the Action, you must create an account on [PHP-Prefixer](https://php-prefixer.com/) and prepare your projects with the prefix defined in the `composer.json` schema. Before using the Action and the command-line, we recommend checking the documentation and guides here: <https://php-prefixer.com/docs/>. You can first prefix your project on the service web interface, and then integrate Action in your repositories.
5050

51-
Create your Github Workflow configuration in `.github/workflows/prefixer.yml` or similar.
51+
Create your Github Workflow configuration in `.github/workflows/prefixer.yml`.
5252

5353
```yaml
5454
name: Prefixer
@@ -81,19 +81,18 @@ Parameter | Description | Required | Example
8181
---------|----------| ---------|----------
8282
PERSONAL_ACCESS_TOKEN | The PHP-Prefixer PAT/Personal Access Token. The token must be configured in the PHP-Prefixer account. | Yes | `789\|123456789...`
8383
PROJECT_ID | The project ID to process the source code. The project must be configured in your account in the PHP-Prefixer account. | Yes | `5432`
84-
SOURCE_DIR_PATH | The relative path to the source project directory. It must contain a .git repository and composer.json file. If not, set the base repository directory will be used as the value. Example: `foo/bar`. | No | `./`
84+
SOURCE_DIR_PATH | The relative path to the source project directory. It must contain a .git repository and composer.json file. If not, the base repository directory will be used as the value. Example: `foo/bar`. | No | `./`
8585
TARGET_BRANCH | The branch in the repository where PHP-Prefixer will store the prefixed files after processing. Default value: `prefixed`. | No |
8686
GH_PERSONAL_ACCESS_TOKEN | The GitHub PAT/Personal Access Token to access private repositories. It is only required if the project, the library or the dependencies are private. | No | `ghp_F4fZ9Cq7QF...`
8787

8888
## Prefixing Private Repositories
8989

90-
To prefix from a private repository, GitHub PAT/Personal Access Tokens must be used. Generate a **Personal Access Token** for this purpose and add it to your private repository's configuration.
90+
Follow these steps to prefix private repositories:
9191

92-
Create a [Personal Access Token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) for the Github account you wish to authenticate with.
92+
- Step 1: Create a GitHub [Personal Access Token](https://docs.github.com/en/github/authenticating-to-github/creating-a-personal-access-token) for the Github account you wish to authenticate with.
93+
- Step 2: Next, add the GitHub Personal Access Token to your project using [Github Secrets](https://docs.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets), and pass it into the Action using the input.
9394

94-
Add the GitHub PAT/Personal Access Tokens to your project using [Github Secrets][secrets], and pass them into the `PHP-Prefixer/php-prefixer-build-action` action by using the `gh_personal_access_token` input.
95-
96-
Example yaml, showing how to pass secrets:
95+
Example `yaml`, showing how to pass secrets:
9796

9897
```yaml
9998
jobs:
@@ -111,13 +110,13 @@ jobs:
111110
gh_personal_access_token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
112111
```
113112
114-
There is an example repository available for reference at https://github.com/PHP-Prefixer/hello-wp-world that uses a private dependency. Check it out for a live working project.
113+
There is an example repository available for reference at https://github.com/PHP-Prefixer/hello-wp-world that uses a private dependency. Check it out for a live project.
115114
116115
## Version Numbers
117116
118-
This action is released with semantic version numbers and tagged, so the latest major release's tag always points to the latest release within the matching major version.
117+
This Action is released with semantic version numbers and tags. The latest major release's tag always points to the latest release within the matching major version.
119118
120-
Please feel free to use `uses: PHP-Prefixer/php-prefixer-build-action@v1` to always run the latest version of v1, or `uses: PHP-Prefixer/php-prefixer-build-action@v1.0.0` to specify the exact release.
119+
Please feel free to use `uses: PHP-Prefixer/php-prefixer-build-action@v1` to run the latest version of v1, or `uses: PHP-Prefixer/php-prefixer-build-action@v1.0.0` to specify the exact Action’s version.
121120

122121
***
123122

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ inputs:
1212
required: true
1313

1414
source_dir_path:
15-
description: 'The relative path to the source project directory. It must contain a .git repository and composer.json file. If not, set the base repository directory will be used as the value. Example: `foo/bar`.'
15+
description: 'The relative path to the source project directory. It must contain a .git repository and composer.json file. If not, the base repository directory will be used as the value. Example: `foo/bar`.'
1616
required: false
1717

1818
target_branch:

0 commit comments

Comments
 (0)