Skip to content

Commit 36e579e

Browse files
modified readme to make it more understandable
1 parent e7f6600 commit 36e579e

1 file changed

Lines changed: 52 additions & 34 deletions

File tree

README.md

Lines changed: 52 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,19 @@
1+
# Create Pull Request Action (Python)
12

2-
3-
# Create Pull Request Action (Python Port)
4-
5-
[![Test](https://github.com/your-org/create-pull-request-python/actions/workflows/test.yml/badge.svg)](https://github.com/your-org/create-pull-request-python/actions/workflows/test.yml)
3+
[![GitHub Marketplace](https://img.shields.io/badge/Marketplace-Create%20Pull%20Request%20(Python)-blue?logo=github)](https://github.com/marketplace/actions/create-pull-request-python)
4+
[![Test](https://github.com/dikshant-devops/create-pull-request/actions/workflows/test.yml/badge.svg)](https://github.com/dikshant-devops/create-pull-request/actions/workflows/test.yml)
65
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
76

87
A Python port of the popular [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub Action. Automatically creates pull requests for changes made during workflow execution.
98

109
## Features
1110

12-
- 🐍 **Pure Python** - Easy to understand and contribute to
13-
- 🔄 **Feature Parity** - All 30+ inputs and 4 outputs from original action
14-
- 🐳 **Docker-based** - Consistent environment across all runners
15-
- 🧪 **Well Tested** - Comprehensive unit and integration test coverage
16-
- 📦 **PyGithub** - Robust GitHub API integration with retry logic
17-
- 🔧 **Robust** - Handles rebasing, cherry-picking, and conflict resolution
11+
- **Pure Python** - Easy to understand and contribute to
12+
- **Feature Parity** - All 23 inputs and 6 outputs from the original action
13+
- **Docker-based** - Consistent environment across all runners
14+
- **Well Tested** - Comprehensive unit and integration test coverage
15+
- **PyGithub** - Robust GitHub API integration with retry logic
16+
- **Robust** - Handles rebasing, cherry-picking, and conflict resolution
1817

1918
## Why Python?
2019

@@ -46,7 +45,7 @@ jobs:
4645
echo "Updated content" > file.txt
4746
4847
- name: Create Pull Request
49-
uses: your-org/create-pull-request-python@v1
48+
uses: dikshant-devops/create-pull-request@v1
5049
with:
5150
token: ${{ secrets.GITHUB_TOKEN }}
5251
commit-message: "Update file.txt"
@@ -63,7 +62,7 @@ jobs:
6362
6463
```yaml
6564
- name: Create Pull Request
66-
uses: your-org/create-pull-request-python@v1
65+
uses: dikshant-devops/create-pull-request@v1
6766
with:
6867
token: ${{ secrets.GITHUB_TOKEN }}
6968
commit-message: "Update dependencies"
@@ -83,7 +82,7 @@ jobs:
8382
8483
```yaml
8584
- name: Create Pull Request
86-
uses: your-org/create-pull-request-python@v1
85+
uses: dikshant-devops/create-pull-request@v1
8786
with:
8887
token: ${{ secrets.GITHUB_TOKEN }}
8988
branch: update-
@@ -95,7 +94,7 @@ jobs:
9594

9695
```yaml
9796
- name: Create Pull Request
98-
uses: your-org/create-pull-request-python@v1
97+
uses: dikshant-devops/create-pull-request@v1
9998
with:
10099
token: ${{ secrets.PAT_TOKEN }} # Needs repo scope
101100
push-to-fork: username/repo-fork
@@ -163,7 +162,7 @@ jobs:
163162
curl -o data.json https://api.example.com/data
164163
165164
- name: Create PR if data changed
166-
uses: your-org/create-pull-request-python@v1
165+
uses: dikshant-devops/create-pull-request@v1
167166
with:
168167
token: ${{ secrets.GITHUB_TOKEN }}
169168
commit-message: "Update data.json"
@@ -198,7 +197,7 @@ jobs:
198197
black .
199198
200199
- name: Create PR for formatting
201-
uses: your-org/create-pull-request-python@v1
200+
uses: dikshant-devops/create-pull-request@v1
202201
with:
203202
token: ${{ secrets.GITHUB_TOKEN }}
204203
commit-message: "style: Format code with black"
@@ -231,7 +230,7 @@ jobs:
231230
pip freeze > requirements.txt
232231
233232
- name: Create PR
234-
uses: your-org/create-pull-request-python@v1
233+
uses: dikshant-devops/create-pull-request@v1
235234
with:
236235
token: ${{ secrets.GITHUB_TOKEN }}
237236
commit-message: "chore: Update dependencies"
@@ -287,8 +286,8 @@ The action executes in 10 phases:
287286
| **Git Operations** | @actions/exec | subprocess wrapper |
288287
| **Docker Image** | ~100MB (Node Alpine) | ~150MB (Python slim) |
289288
| **Startup Time** | ~2-3s | ~3-4s |
290-
| **Inputs** | 30+ | 30+ (identical) |
291-
| **Outputs** | 4 | 4 (identical) |
289+
| **Inputs** | 23 | 23 (identical) |
290+
| **Outputs** | 6 | 6 (identical) |
292291
| **Test Framework** | Jest | pytest |
293292
| **Type Safety** | TypeScript | Python type hints |
294293
@@ -300,7 +299,7 @@ The action executes in 10 phases:
300299
301300
```bash
302301
# Clone repository
303-
git clone https://github.com/your-org/create-pull-request-python.git
302+
git clone https://github.com/dikshant-devops/create-pull-request.git
304303
cd create-pull-request-python
305304
306305
# Install dependencies
@@ -342,10 +341,6 @@ docker run --rm -v $(pwd):/workspace \
342341
create-pull-request-python
343342
```
344343

345-
### Project Structure
346-
347-
See [docs/architecture.md](docs/architecture.md) for detailed architecture documentation.
348-
349344
## Contributing
350345

351346
Contributions welcome! Please:
@@ -356,8 +351,6 @@ Contributions welcome! Please:
356351
4. Ensure all tests pass
357352
5. Submit a pull request
358353

359-
See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed guidelines.
360-
361354
## Migration from TypeScript Version
362355

363356
The Python port is a **drop-in replacement** - simply change the action reference:
@@ -367,11 +360,41 @@ The Python port is a **drop-in replacement** - simply change the action referenc
367360
- uses: peter-evans/create-pull-request@v6
368361

369362
# After (Python)
370-
- uses: your-org/create-pull-request-python@v1
363+
- uses: dikshant-devops/create-pull-request@v1
371364
```
372365
373366
All inputs and outputs are identical. No workflow changes required!
374367
368+
## Publishing to GitHub Marketplace
369+
370+
This action is ready for the [GitHub Actions Marketplace](https://github.com/marketplace?type=actions). The `action.yml` already includes the required `branding` configuration.
371+
372+
### Prerequisites
373+
374+
- The repository must be **public**
375+
- Enable **two-factor authentication** on your GitHub account
376+
- Accept the [GitHub Marketplace Developer Agreement](https://docs.github.com/en/apps/github-marketplace/github-marketplace-overview/about-github-marketplace)
377+
378+
### Steps to Publish
379+
380+
1. Go to the repository on GitHub
381+
2. Click **Releases** > **Draft a new release**
382+
3. Check the **Publish this Action to the GitHub Marketplace** checkbox
383+
4. GitHub will validate your `action.yml` -- fix any reported errors
384+
5. Choose a tag (e.g., `v1.0.0`) and create the release
385+
6. Once published, the action will appear at `https://github.com/marketplace/actions/create-pull-request-python`
386+
387+
### Marketplace Metadata (from action.yml)
388+
389+
| Field | Value |
390+
|-------|-------|
391+
| Name | `Create Pull Request (Python)` |
392+
| Icon | `git-pull-request` |
393+
| Color | `blue` |
394+
| Author | `Create Pull Request Action` |
395+
396+
After publishing, users can find and use your action directly from the marketplace.
397+
375398
## License
376399

377400
[MIT](LICENSE)
@@ -382,10 +405,5 @@ This is a Python port of the excellent [create-pull-request](https://github.com/
382405

383406
## Support
384407

385-
- 📖 [Documentation](https://github.com/your-org/create-pull-request-python/wiki)
386-
- 🐛 [Report Issues](https://github.com/your-org/create-pull-request-python/issues)
387-
- 💬 [Discussions](https://github.com/your-org/create-pull-request-python/discussions)
388-
389-
---
390-
391-
**Made with ❤️ using Python**
408+
- [Report Issues](https://github.com/dikshant-devops/create-pull-request/issues)
409+
- [Discussions](https://github.com/dikshant-devops/create-pull-request/discussions)

0 commit comments

Comments
 (0)