Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs/packaging: Create a section on using github-cli to make a pull request #517

Merged
merged 1 commit into from
Apr 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/packaging/creating-a-new-package.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,4 +196,4 @@ For more information on suitable commit messages, please check the [tooling cent
- If you want to link this pull request to an existing package request, simply mention it in your commit message (use the full URL): `The inclusion of <somepackage> resolves https://github.com/getsolus/packages/issues/123`
- If you need a change to depend on another change, mention it in the commit message too (use the full URL): `Depends on https://github.com/getsolus/packages/issues/234`

Next, you'll [submit a pull request for review](submitting-a-pull-request.md).
Next, you'll [submit a pull request for review](submitting-a-pull-request.mdx).
2 changes: 1 addition & 1 deletion docs/packaging/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
Please check the following:

- Search [open package requests](https://github.com/getsolus/packages/issues?q=label%3A%22Package+Request%22) to see if there is one for the package. If there isn't an existing issue, go ahead and submit your pull request. If there is already a pull request, please check its status to avoid duplicating work.
- If you are submitting a pull request for the inclusion of software in the repo, the package has a corresponding package request that is **accepted for inclusion** or is a dependency of a package that has been accepted into the repository.

Check warning on line 22 in docs/packaging/index.md

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (repo)

## Building Packages

Expand All @@ -30,4 +30,4 @@
- For updating a package that already is in the repos see [Updating an Existing Package](updating-an-existing-package.md)

3. [Test the Package](testing-a-package.md)
4. [Submit a Pull Request for Review](submitting-a-pull-request.md)
4. [Submit a Pull Request for Review](submitting-a-pull-request.mdx)
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ summary: Submitting a Pull Request for Review
sidebar_position: 6
---

import Admonition from "@theme/Admonition";
import CodeBlock from "@theme/CodeBlock";
import TabItem from "@theme/TabItem";
import Tabs from "@theme/Tabs";

# Submitting a Pull Request for Review

Please refrain from submitting a pull request for the following instances:
Expand Down Expand Up @@ -37,25 +42,52 @@ git log -1

## Creating the Pull Request

In the package folder, run `git push`.

:::note

If you've created your own branch, as recommended, the cli tool will show you a new command to create and push to a remote branch matching the local one. Run this.

:::

Once the commit is successfully pushed, you'll notice that a URL will be provided that will immediately allow you to create a pull request with your changes.

Run `git status` one last time to make sure your branch is clean. If it is:

1. Open the link.
2. Fill in a summary of your changes (usually the same as the commit message).
3. Link any relevant issues:
- If you want to link this pull request to an existing issue, simply mention it in the PR summary: `The inclusion of <somepackage> fixes #123`.
- If you need a change to depend on another change, mention it in the PR summary too: `Depends on #234`.
4. Double check everything
5. Create the pull request!
There are multiple ways to create a Pull Request with GitHub, either from the website, or from the command line.

<Tabs groupId="opening-prs">
<TabItem value="website" label="Website">
<p>
In the package folder, push your local changes to a remote branch:

<CodeBlock language="bash">
git push
</CodeBlock>
</p>
<Admonition type="info">
If you've created your own branch, as recommended, the CLI tool will show you a new command to create and push to a remote branch matching the local one. Run this.
</Admonition>
<p>
Once the commit is successfully pushed, you'll notice that a URL will be provided that will immediately allow you to create a pull request with your changes.

Run `git status` one last time to make sure your branch is clean. If it is:

1. Open the link.
2. Fill in a summary of your changes (usually the same as the commit message).
3. Link any relevant issues:
- If you want to link this pull request to an existing issue, simply mention it in the PR summary: `The inclusion of <somepackage> fixes #123`.
- If you need a change to depend on another change, mention it in the PR summary too: `Depends on #234`.
4. Double check everything
5. Create the pull request!
</p>

</TabItem>
<TabItem value="github-cli" label="GitHub CLI">
<p>
In the package folder, run the `gh` command:
</p>
<CodeBlock language="bash">
gh pr create
</CodeBlock>
<p>
This will start an interactive session to create your pull request step-by-step.
GZGavinZhao marked this conversation as resolved.
Show resolved Hide resolved

When the current branch isn't fully pushed to a git remote, a prompt will ask where to push the branch and offer an option to fork the base repository. For community packagers, you should use your fork of the packages repository. If you are a member of the Solus Staff, you should use `getsolus/packages`.
</p>
EbonJaeger marked this conversation as resolved.
Show resolved Hide resolved
<Admonition type="info">
The text editor used by `github-cli` may not the same one that `git` uses. To change this, consult the [`gh config set` command](https://cli.github.com/manual/gh_config_set).
</Admonition>
EbonJaeger marked this conversation as resolved.
Show resolved Hide resolved
</TabItem>
</Tabs>

## Amending a Pull Request

Expand Down
2 changes: 1 addition & 1 deletion docs/packaging/updating-an-existing-package.md
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@
- #123 fixed a thing
```

If you want to intentionally link to another issue in this repository, the right way is to use our repo name. Ex:

Check warning on line 142 in docs/packaging/updating-an-existing-package.md

View workflow job for this annotation

GitHub Actions / spellcheck

Unknown word (repo)

```
Fixes getsolus/packages#issuenumber
Expand Down Expand Up @@ -190,4 +190,4 @@

For more information on suitable commit messages, please check the [tooling central documentation](https://github.com/solus-project/tooling-central/blob/master/README.rst#using-git).

Next, you'll [submit a pull request for review](submitting-a-pull-request.md).
Next, you'll [submit a pull request for review](submitting-a-pull-request.mdx).