Chore: Add CONTRIBUTING.md guidelines and standardized templates (#279)

* chore: Improve GitHub workflows, issue template, and gitignore entries

- Add support for manual triggering of build and lint workflows.
- Improve bug report template by clarifying prompts and adding checklist and tips for better explanation of issues.
- Ignore `.md` files in `.github` and `.github/ISSUE_TEMPLATE` folders.
- Add badges for test running and coverage status in README.md.

* chore: Add standardized templates to repository

- Add pull request and feature request templates to the `.github` folder

* docs: Add CONTRIBUTING.md guidelines and update .gitignore.

- Update .gitignore to remove exclusions for browsing history files
- Add an exclusion for CONTRIBUTING.md in the Community section in .gitignore
- Create CONTRIBUTING.md with guidelines for contributors.
This commit is contained in:
ᴍᴏᴏɴD4ʀᴋ 2024-01-13 18:08:35 +08:00 committed by GitHub
parent 8a717704ed
commit 23037e16fd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 108 additions and 11 deletions

View File

@ -7,14 +7,34 @@ assignees: ''
---
**Describe the bug**
Use `./hack-browser-data -vv` paste result here
## Describe the bug
A clear and concise description of what the bug is.
## Log Output
Please attach or paste the relevant log output. Use `./hack-browser-data -vv` and paste result here.
**Desktop (please complete the following information):**
- OS Name:
- Browser Name:
- Browser Version:
## Expected vs Actual Behavior
Describe what you expected to happen and what actually happened.
**Additional context**
Add any other context about the problem here.
## Desktop (please complete the following information):
Select the operating system(s) you are using:
- [ ] Windows
- [ ] macOS
- [ ] Linux
- OS Version: [e.g. windows 10, macos 10.15.7, ubuntu 20.04]
- OS Architecture: [e.g. 32-bit, 64-bit]
- Browser Name: [e.g. chrome, firefox]
- Browser Version: [e.g. 86.0.4240.111, 82.0.3]
## Additional Details
- [ ] I ran `hack-browser-data` with administrator/root privileges.
## Checklist
- [ ] I have checked the [existing issues](https://github.com/moonD4rk/HackBrowserData/issues) for similar problems.
## Screenshots/Videos
If applicable, add screenshots or videos to help explain your problem.
## Additional context
Add any other context about the problem here.

View File

@ -0,0 +1,23 @@
---
name: Feature Request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''
---
## Feature Description
A clear and concise description of what the feature is.
## Why is this feature needed?
A clear and concise description of why this feature is needed.
## Checklist
- [ ] I have checked the [existing issues](https://github.com/moonD4rk/HackBrowserData/issues) for similar problems.
## Screenshots/Videos
If applicable, add screenshots or videos to help explain your proposal.
## Additional Context
Add any other context or screenshots about the feature request here.

13
.github/PULL_REQUEST_TEMPLATE.md vendored Normal file
View File

@ -0,0 +1,13 @@
## Proposed changes
<!-- Describe the overall picture of your modifications to help maintainers understand the pull request. PRs are required to be associated to their related issue tickets or feature request. -->
## Checklist
<!-- Put an "x" in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code. -->
- [ ] Pull request is created against the [dev](https://github.com/moonD4rk/HackBrowserData/tree/dev) branch
- [ ] All checks passed (lint, unit, build tests etc.) with my changes
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] I have added necessary documentation (if appropriate)

View File

@ -5,6 +5,7 @@ on:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
build:

View File

@ -4,6 +4,7 @@ on:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
lint:
name: Lint

View File

@ -1,5 +1,9 @@
on:
[pull_request]
pull_request:
push:
branches:
- main
workflow_dispatch:
name: run tests
jobs:

7
.gitignore vendored
View File

@ -196,4 +196,9 @@ hack-browser-data
!/browsingdata/history/history_test.go
# github action
!/.github/workflows/unittest.yml
!/.github/workflows/unittest.yml
!/.github/ISSUE_TEMPLATE/*.md
!/.github/*.md
# Community
!CONTRIBUTING.md

30
CONTRIBUTING.md Normal file
View File

@ -0,0 +1,30 @@
# Contributing to HackBrowserData
We appreciate your interest in contributing to the HackBrowserData! This document provides some basic guidelines for contributors.
## Getting Started
- Always base your work from the `dev` branch, which is the development branch with the latest code.
- Before creating a Pull Request (PR), make sure there is a corresponding issue for your contribution. If there isn't one already, please create one.
- Include the problem description in the issue.
## Pull Requests
When creating a PR, please follow these guidelines:
- Link your PR to the corresponding issue.
- Provide context in the PR description to help reviewers understand the changes. The more information you provide, the faster the review process will be.
- Include an example of running the tool with the changed code, if applicable. Provide 'before' and 'after' examples if possible.
- Include steps for functional testing or replication.
- If you're adding a new feature, make sure to include unit tests.
## Code Style
Please adhere to the existing coding style for consistency.
## Questions
If you have any questions or need further guidance, please feel free to ask in the issue or PR, or [reach out to the maintainers](mailto:i@moond4rk.com).
Thank you for your contribution!

View File

@ -5,7 +5,7 @@
# HackBrowserData
[![Lint](https://github.com/moonD4rk/HackBrowserData/actions/workflows/lint.yml/badge.svg)](https://github.com/moonD4rk/HackBrowserData/actions/workflows/lint.yml) [![build](https://github.com/moonD4rk/HackBrowserData/actions/workflows/build.yml/badge.svg)](https://github.com/moonD4rk/HackBrowserData/actions/workflows/build.yml) [![Release](https://github.com/moonD4rk/HackBrowserData/actions/workflows/release.yml/badge.svg)](https://github.com/moonD4rk/HackBrowserData/actions/workflows/release.yml)
[![Lint](https://github.com/moonD4rk/HackBrowserData/actions/workflows/lint.yml/badge.svg)](https://github.com/moonD4rk/HackBrowserData/actions/workflows/lint.yml) [![build](https://github.com/moonD4rk/HackBrowserData/actions/workflows/build.yml/badge.svg)](https://github.com/moonD4rk/HackBrowserData/actions/workflows/build.yml) [![Release](https://github.com/moonD4rk/HackBrowserData/actions/workflows/release.yml/badge.svg)](https://github.com/moonD4rk/HackBrowserData/actions/workflows/release.yml) [![run tests](https://github.com/moonD4rk/HackBrowserData/actions/workflows/unittest.yml/badge.svg)](https://github.com/moonD4rk/HackBrowserData/actions/workflows/unittest.yml) [![Coverage Status](https://coveralls.io/repos/github/moonD4rk/HackBrowserData/badge.svg)](https://coveralls.io/github/moonD4rk/HackBrowserData)
[中文说明](https://github.com/moonD4rk/HackBrowserData/blob/master/README_ZH.md)