Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ent/bug

Template repository for reporting bugs
https://github.com/ent/bug

Last synced: about 2 months ago
JSON representation

Template repository for reporting bugs

Awesome Lists containing this project

README

        

# Template Repository For Bug Reporting
Create a Repository From the Template
-----------------------------------
First and foremost, create a repository from this template repository (the one you're in now! 😊 ).

In order to do so, click 'Use this template' and create your repository.

Upload your desired code into the new repository.

If you happen to be a GitHub Teams or GitHub Enterprise customer you can alternatively choose to do so directly in the Codespace. Proceed to read if you want to learn how.

Once creating the desired repository, press `.` (period key) from the main repository page to switch over to dev mode.

Create a Codespace
------------------
Within dev mode, by clicking the 'Run and Debug' button you can create a new Codespace.

If you haven't already done so, you can import your code from your personal files by clicking File > Open File.

Inside Codespaces
------------------
Once you're inside Codespaces with your desired code, you can edit, run and debug it.

**Editing**

Let's say you want to edit the template `ent/schema`. For example, add a field named `title` to the `User` schema.

In `ent/schema/user.go`:

To generate this, we will run the command `go generate ./ent` in the Codespaces terminal.

To see if the command worked successfully, we can see that changes were made to files (files on the left-hand side became yellow, meaning changes were made that were not staged yet). Also, we can check inside `ent/user/user.go` if our field was added:

To learn more about working with `ent`, click [here](https://entgo.io/docs/getting-started/).

**Saving Changes**

If you have made changes to your code, by clicking on 'Source Control' you can directly stage, commit and push them into the repository.

By clicking the '+' you can stage your changes.

To commit the changes, enter a message and click the check mark. This button will automatically commit straight into the master branch.

Report a Bug
------------------
Now that your repository is ready, click [here](https://github.com/ent/ent/issues/new/choose) to submit an issue on the Ent repository.

When submitting your issue, a best practice would be to provide sufficient context, link to your new repository, and you're done!