From 24dea049c1615151f3b9abd64108537f08d8f418 Mon Sep 17 00:00:00 2001 From: Tiago d'Almeida Date: May 15 2022 01:38:46 +0000 Subject: [PATCH 1/7] Convert the Readme file to Markdown Why? Because the .md file type is more used for all projects (for Readme, at least). - Added subtitles for commands - Added updated information about hub and cli GitHub tools. - Added a credits section. - Changed the new command symbol to "$". - Added some hidden TODO. Also, this pull request is a firt try of contributing with pagure. Signed-off-by: Tiago d'Almeida --- diff --git a/README.md b/README.md new file mode 100644 index 0000000..4536219 --- /dev/null +++ b/README.md @@ -0,0 +1,97 @@ +# pag + +[`pag`](https://pagure.io/pag) helps you win at [pagure.io](https://pagure.io) ! + +Intended to mimic the [hub](https://github.com/github/hub) and [cli](https://cli.github.com/) tools for [github.com](https://github.com). + +## Usage + +```bash + $ pag --help + Usage: pag [OPTIONS] COMMAND [ARGS]... + + Options: + --help Show this message and exit. + + Commands: + clone Clone an existing repo. + create Create a new repo. + create-issue + default + fork + pull-request Open a new pull request. + remote Create remote for another fork. + review Check out a pull request locally. + upload Upload new file to releases. +``` + +## Commands + +### Clone + +The `clone` command can be used to clone a repo by name without having to find or type out the URL: + +```bash + $ pag clone koji + Cloning into 'koji'... +``` + +Or you can clone a fork: + +```bash + $ pag clone ralph/koji + Cloning into 'koji'... +``` + +### Create + +`pag` provides a convenience command for creating new projects:: + +```bash + $ pag create factory2 "Ostensibly better than factory version 1" +``` + +### Fork + +After you clone a repo, you can `fork` it on [pagure.io](https://pagure.io) and adjust your local `remote` settings: + +```bash + $ pag fork +``` + +### Remote + +If you want to add the `remotes` of other forks, that's easy too. Just do it by username: + +```bash + $ cd koji/ + $ pag remote add ausil + $ git remote -v + ausil ssh://git@pagure.io/forks/ausil/koji.git (fetch) + origin ssh://git@pagure.io/koji.git (fetch) + $ git pull ausil master +``` + +## Perks + +To enable bash completion, add the following to your `.bashrc`: + +```bash + eval "$(_PAG_COMPLETE=source pag)" +``` + + + +## Credits + +*Ralph Bean* as `ralph` +*Tiago d'Almeida* as `tjapro` +© 2022 diff --git a/README.rst b/README.rst deleted file mode 100644 index 12dadd6..0000000 --- a/README.rst +++ /dev/null @@ -1,65 +0,0 @@ -pag -=== - -``pag`` helps you win at `pagure.io `_. - -Intended to mimic the `hub `_ cli tool for `github.com `_. - -Usage ------ - -:: - - $ pag --help - Usage: pag [OPTIONS] COMMAND [ARGS]... - - Options: - --help Show this message and exit. - - Commands: - clone - create - remote - ----- - -The clone command can be used to clone a repo by name without having to find or type out the URL:: - - ❯ pag clone koji - Cloning into 'koji'... - -Or you can clone a fork:: - - ❯ pag clone ralph/koji - Cloning into 'koji'... - ----- - -After you clone a repo, you can fork it on pagure.io and adjust your local `remote` settings:: - - ❯ pag fork - ----- - -If you want to add the remotes of other forks, that's easy too. Just do it by username:: - - ❯ cd koji/ - ❯ pag remote add ausil - ❯ git remote -v - ausil ssh://git@pagure.io/forks/ausil/koji.git (fetch) - origin ssh://git@pagure.io/koji.git (fetch) - ❯ git pull ausil master - ----- - - -``pag`` provides a convenience command for creating new projects:: - - ❯ pag create factory2 "Ostensibly better than factory version 1" - - ----- - -To enable bash completion, add the following to your ``.bashrc``:: - - eval "$(_PAG_COMPLETE=source pag)" From 0bed479d9133f78f85ab5c6e2a157405609dec8e Mon Sep 17 00:00:00 2001 From: Tiago d'Almeida Date: May 15 2022 16:20:48 +0000 Subject: [PATCH 2/7] Added the others commands There were some missing commands from the file. Signed-off-by: Tiago d'Almeida --- diff --git a/README.md b/README.md index 4536219..3fc6d8a 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# pag +# `pag` [`pag`](https://pagure.io/pag) helps you win at [pagure.io](https://pagure.io) ! @@ -25,32 +25,54 @@ Intended to mimic the [hub](https://github.com/github/hub) and [cli](https://cli upload Upload new file to releases. ``` +> You can do `pag --help` to see the command specific help. + ## Commands ### Clone -The `clone` command can be used to clone a repo by name without having to find or type out the URL: +Clone an existing repo by name without having to find or type out the URL: ```bash $ pag clone koji Cloning into 'koji'... ``` -Or you can clone a fork: +You can clone a fork: ```bash $ pag clone ralph/koji Cloning into 'koji'... ``` +Clone a repo in anonymous: + +```bash + $ pag clone -a koji +``` + ### Create -`pag` provides a convenience command for creating new projects:: +`pag` provides a convenience command for creating new projects with description: ```bash $ pag create factory2 "Ostensibly better than factory version 1" ``` +When runned in an existing local git repository, this command will also set up remotes. + +### Create an Issue + +Create an issue from the command line! + +```bash + $ pag create-issue --title "WIP: What about a new command" --description "Ideas for new commands" --private +``` + +### Default + +> TODO + ### Fork After you clone a repo, you can `fork` it on [pagure.io](https://pagure.io) and adjust your local `remote` settings: @@ -59,6 +81,14 @@ After you clone a repo, you can `fork` it on [pagure.io](https://pagure.io) and $ pag fork ``` +### Pull Request + +Create a pull request from the current branch to default upstream branch. + +```bash + $ pag pull-request +``` + ### Remote If you want to add the `remotes` of other forks, that's easy too. Just do it by username: @@ -72,6 +102,28 @@ If you want to add the `remotes` of other forks, that's easy too. Just do it by $ git pull ausil master ``` +### Review + +Check out a pull request locally. + +```bash + $ pag review PR_ID +``` + +You can use this options: + +- `--list` for list opened pull requests on the current repo. +- `--cleanup` for delete the corresponding branches (BE AWARE). +- `--open` to open currently reviewed pull request in the browser. + +### Upload + +Upload a new file to releases. + +```bash + $ pag upload TARBALL +``` + ## Perks To enable bash completion, add the following to your `.bashrc`: @@ -85,7 +137,6 @@ TODO: - Add version output. - Add copy&credits output. -- Add the other commands help and examples. - Add the --help for all commands & cite that in the help output. --> @@ -93,5 +144,6 @@ TODO: ## Credits *Ralph Bean* as `ralph` -*Tiago d'Almeida* as `tjapro` -© 2022 +*Tiago d'Almeida* as `tjapro` + +[License](./LICENSE) GNU GPL 3.0 © 2016-2022 From 9bf58006d2a195da2d0a79bba49e54db8de6078d Mon Sep 17 00:00:00 2001 From: Tiago d'Almeida Date: May 15 2022 17:12:48 +0000 Subject: [PATCH 3/7] Corrected the filename in MANIFEST Signed-off-by: Tiago d'Almeida --- diff --git a/MANIFEST.in b/MANIFEST.in index a5021c6..04f196a 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,2 +1,2 @@ -include README.rst +include README.md include LICENSE From 5a54b74388d8297f09a35ec5a28a3808f9e43102 Mon Sep 17 00:00:00 2001 From: Tiago d'Almeida Date: May 23 2022 19:53:40 +0000 Subject: [PATCH 4/7] Correct the README fiel - Remove the dummy default implementation. - Correct the credits with `git authors`. Signed-off-by: Tiago d'Almeida --- diff --git a/README.md b/README.md index 3fc6d8a..10e505d 100644 --- a/README.md +++ b/README.md @@ -69,10 +69,6 @@ Create an issue from the command line! $ pag create-issue --title "WIP: What about a new command" --description "Ideas for new commands" --private ``` -### Default - -> TODO - ### Fork After you clone a repo, you can `fork` it on [pagure.io](https://pagure.io) and adjust your local `remote` settings: @@ -143,7 +139,9 @@ TODO: ## Credits -*Ralph Bean* as `ralph` -*Tiago d'Almeida* as `tjapro` +Ralph Bean +Lubomír Sedlář +Haikel Guemar +Tiago d'Almeida [License](./LICENSE) GNU GPL 3.0 © 2016-2022 From 0231e5785212c6261ba1e4721052c4edb939bd78 Mon Sep 17 00:00:00 2001 From: Tiago d'Almeida Date: May 25 2022 02:46:24 +0000 Subject: [PATCH 5/7] Correct the README fiel - Remove the dummy default implementation. - Correct the credits with `git authors`. Signed-off-by: Tiago d'Almeida --- diff --git a/README.md b/README.md index 3fc6d8a..10e505d 100644 --- a/README.md +++ b/README.md @@ -69,10 +69,6 @@ Create an issue from the command line! $ pag create-issue --title "WIP: What about a new command" --description "Ideas for new commands" --private ``` -### Default - -> TODO - ### Fork After you clone a repo, you can `fork` it on [pagure.io](https://pagure.io) and adjust your local `remote` settings: @@ -143,7 +139,9 @@ TODO: ## Credits -*Ralph Bean* as `ralph` -*Tiago d'Almeida* as `tjapro` +Ralph Bean +Lubomír Sedlář +Haikel Guemar +Tiago d'Almeida [License](./LICENSE) GNU GPL 3.0 © 2016-2022 From 97367f5adfa61a3f9aaa3556e8bb32714089d2a3 Mon Sep 17 00:00:00 2001 From: Tiago d'Almeida Date: May 25 2022 02:52:58 +0000 Subject: [PATCH 6/7] Correct the README fiel - Remove the dummy default implementation. - Correct the credits with `git authors`. Signed-off-by: Tiago d'Almeida --- diff --git a/README.md b/README.md index 10e505d..31b2fe0 100644 --- a/README.md +++ b/README.md @@ -139,9 +139,9 @@ TODO: ## Credits -Ralph Bean -Lubomír Sedlář -Haikel Guemar +Ralph Bean +Lubomír Sedlář +Haikel Guemar Tiago d'Almeida [License](./LICENSE) GNU GPL 3.0 © 2016-2022