This repository has been archived by the owner on Sep 5, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 56
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Modernize setup * fix version * appease linter * Add .golangci.yml * silence go vet for now, as we intentionally misuse unsafe.Pointer * remove remnants of jwx
- Loading branch information
Showing
46 changed files
with
726 additions
and
170 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,148 @@ | ||
# CONTRIBUTING | ||
|
||
❤❤❤🎉 Thank you for considering to contribute to this project! 🎉❤❤❤ | ||
|
||
The following is a set of guidelines that we ask you to follow when you contribute to this project. | ||
|
||
# Index | ||
|
||
* [tl;dr](#tldr) | ||
* [Please Be Nice](#please-be-nice) | ||
* [Please Use Correct Medium (GitHub Issues / Discussions)](#please-use-correct-medium-github-issues--discussions) | ||
* [Please Include (Pseudo)code for Any Technical Issues](#please-include-pseudocode-for-any-technical-issues) | ||
* [Reviewer/Reviewee Guidelines](#reviewer-reviewee-guidelines) | ||
* [Brown M&M Clause](#brown-mm-clause) | ||
* [Pull Requests](#pull-requests) | ||
* [Branches](#branches) | ||
* [Generated Files](#generated-files) | ||
* [Test Cases](#test-cases) | ||
|
||
# tl;dr | ||
|
||
* 📕 Please read this Guideline in its entirety once, if at least to check the headings. | ||
* 🙋 Please be nice, and please be aware that we are not providing this software as a hobby. | ||
* 💬 Open-ended questions and inquiries go to [Discussions](https://github.com/lestrrat-go/libxml2/discussions). | ||
* 🖥️ Actionable, specific technical questions go to [Issues](https://github.com/lestrrat-go/libxml2/issues). | ||
* 📝 Please always include (pseudo)code for any technical questions/issues. | ||
* 🔒 Issues, PR, and other posts may be closed or not addressed if you do not follow these guidelines | ||
|
||
# Please Be Nice | ||
|
||
[Main source; if wording differ, the main source supersedes this copy](https://github.com/lestrrat-go/contributions/blob/main/Contributions.md) | ||
|
||
Please be nice when you contact us. | ||
|
||
We are very glad that you find this project useful, and we intend to provide software that help you. | ||
|
||
You do not have to thank us, but please bare in mind that this is an opensource project that is provided **as-is**. | ||
This means that we are **NOT** obligated to support you, work for you, do your homework/research for you, | ||
or otherwise heed to you needs. | ||
|
||
We do not owe you one bit of code, or a fix, even if it's a critical one. | ||
|
||
We write software because we're curious, we fix bugs because we have integrity. | ||
|
||
But we do not owe you anything. Please do not order us to work for you. | ||
We are not your support staff, and we are not here to do your research. | ||
We are willing to help, but only as long as you are being nice to us. | ||
|
||
# Please Use Correct Medium (GitHub Issues / Discussions) | ||
|
||
[Main source; this is a specialized version copied from the main source](https://github.com/lestrrat-go/contributions/blob/main/Contributions.md) | ||
|
||
This project uses [GitHub Issues](https://github.com/lestrrat-go/libxml2/issues) to deal with technical issues | ||
including bug reports, proposing new API, and otherwise issues that are directly actionable. | ||
|
||
Inquiries, questions about the usage, maintenance policies, and other open-ended | ||
questions/discussions should be posted to [GitHub Discussions](https://github.com/lestrrat-go/libxml2/discussions). | ||
|
||
# Please Include (Pseudo)code for Any Technical Issues | ||
|
||
[Main source; if wording differ, the main source supersedes this copy](https://github.com/lestrrat-go/contributions/blob/main/Contributions.md) | ||
|
||
Your report should contain clear, concise description of the issue that you are facing. | ||
However, at the same time please always include (pseudo)code in report. | ||
|
||
English may not be your forte, but we all should speak the common language of code. | ||
Rather than trying to write an entire essay or beat around the bush, which will | ||
more than likely cost both you and the maintainers extra roundtrips to communicate, | ||
please use code to describe _exactly_ what you are trying to achieve. | ||
|
||
Good reports should contain (in order of preference): | ||
|
||
1. Complete Go-style test code. | ||
1. Code snippet that clearly shows the intent of your code. | ||
1. Pseudocode that shows how you would want the API to work. | ||
|
||
As we are dealing with code, ultimately there is | ||
no better way to convey what you are trying to do than to provide | ||
your code. | ||
|
||
Please help us help you by providing us with a reproducible code. | ||
|
||
# Reviewer/Reviewee Guidelines | ||
|
||
If you are curious about what what gets reviewed and why some decisions | ||
are made the way they are, please read [this document](https://github.com/lestrrat-go/contributions/blob/main/Reviews.md) to get some insight into the thinking process. | ||
|
||
# Brown M&M Clause | ||
|
||
If you came here from an issue/PR template, please make sure to delete | ||
the section on "Contribution Guidelines" from the template. | ||
|
||
Failure to do so may result in the maintainers assuming that you have | ||
not fully read the guidelines. | ||
|
||
[(Reference)](https://www.insider.com/van-halen-brown-m-ms-contract-2016-9) | ||
|
||
# Pull Requests | ||
|
||
## Branches | ||
|
||
### `vXXX` branches | ||
|
||
Stable releases, such as `v1`, `v2`, etc. Please do not work against these branches. | ||
Use the `develop/vXXX` branches instead. | ||
|
||
### `develop/vXXX` branches | ||
|
||
Development occurs on these branches. If you are wishing to make changes against | ||
`v2`, work on `develop/v2` branch. | ||
|
||
When you make a PR, fork this branch, make your changes and create a PR against | ||
these development branches. | ||
|
||
```mermaid | ||
sequenceDiagram | ||
autonumber | ||
participant v1/v2/.. | ||
participant develop/v1/v2/.. | ||
participant feature_branch | ||
develop/v1/v2/..->>feature_branch: Fork development branch to your feature branch | ||
Note over feature_branch: Work on your feature | ||
feature_branch->>develop/v1/v2/..: File a PR against the development branch | ||
develop/v1/v2/..->>v1/v2/..: Merge changes | ||
``` | ||
|
||
## Generated Files | ||
|
||
All files with file names ending in `_gen.go` are generated by a tool. These files | ||
should not be modified directly. Instead, find out the tool that is generating the | ||
file by inspecting the file. Usually the tool that generated the file is listed | ||
in the comment section at the top of the file. | ||
|
||
Usually these files are generated based on a rule file (such as a YAML file). | ||
When you craft a pull request, you should include both changes to the rule file(s) | ||
and the generated file(s). The CI will run `go generate` and make sure that | ||
there are no extra `diff`s that have not been committed. | ||
|
||
## Test Cases | ||
|
||
In general any code change must be accompanied with test case. | ||
|
||
It is obviously very important to test the functionality. But adding test cases | ||
also gives you the opportunity to check for yourself how the new code should/can | ||
be used in practice. Test cases also act as a great way to communicate any | ||
assumptions or requirements that your code needs in order to function properly. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# These are supported funding model platforms | ||
|
||
github: | ||
- lestrrat | ||
patreon: # Replace with a single Patreon username | ||
open_collective: # Replace with a single Open Collective username | ||
ko_fi: # Replace with a single Ko-fi username | ||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel | ||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry | ||
liberapay: # Replace with a single Liberapay username | ||
issuehunt: # Replace with a single IssueHunt username | ||
otechie: # Replace with a single Otechie username | ||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
--- | ||
name: Bug report | ||
about: Create a report to help us improve | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Contribution Guidelines** | ||
|
||
Before filing an issue, please read the contents of [CONTRIBUTING.md](https://github.com/lestrrat-go/libxml2/blob/v2/.github/CONTRIBUTING.md), and follow its instructions. | ||
|
||
**Describe the bug** | ||
|
||
A clear and concise description of what the bug is. | ||
|
||
Please attach the output of `go version` | ||
|
||
**To Reproduce / Expected behavior** | ||
Please attach a standalone Go test code that shows the problem, and what you expected to happen. | ||
|
||
If you are asking for an API change or some such which inhibits you from providing a working code, please do your best to come up with a near-valid code. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. Please delete this section if unnecessary. | ||
|
||
**Sponsors** | ||
Are you sponsoring the authors? If so, let us know. Otherwise, please delete this section. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
blank_issues_enabled: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
name: Feature request | ||
about: Suggest an idea for this project | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Contribution Guidelines** | ||
|
||
Before filing an issue, please read the contents of [CONTRIBUTING.md](https://github.com/lestrrat-go/libxml2/blob/v2/.github/CONTRIBUTING.md), and follow its instructions. | ||
|
||
**Abstract** | ||
Please describe concisely what you want to accomplish, including prerequisite information. Please remember that if _you_ cannot articulate the problem, we cannot guess what you are thinking. | ||
|
||
**Describe the proposed solution/change** | ||
Please attach a standalone Go test code that shows the problem, and what you expected to happen. | ||
|
||
If it's a behavior change, please include a failing (or would-be failing) test case. If it's a structural or an API change, we understand that you cannot create a complete compiling code, but please do your best to produce a a near-valid code that shows exactly what you want | ||
|
||
**Analysis** | ||
Please describe alternative solutions that you have considered, and pros/cons between them. | ||
|
||
**Additional context** | ||
Add any other context or screenshots about the feature request here. Please delete this section if unnecessary. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
--- | ||
name: 'Other Issues' | ||
about: 'Other types of issues' | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
**Contribution Guidelines** | ||
|
||
Before filing an issue, please read the contents of [CONTRIBUTING.md](https://github.com/lestrrat-go/libxml2/blob/v2/.github/CONTRIBUTING.md), and follow its instructions. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
addReviewers: true | ||
addAssignees: false | ||
reviewers: | ||
- lestrrat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# To get started with Dependabot version updates, you'll need to specify which | ||
# package ecosystems to update and where the package manifests are located. | ||
# Please see the documentation for all configuration options: | ||
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates | ||
|
||
version: 2 | ||
updates: | ||
- package-ecosystem: "gomod" # See documentation for possible values | ||
directory: "/" # Location of package manifests | ||
schedule: | ||
interval: "daily" | ||
target-branch: "master" | ||
labels: | ||
- "go" | ||
- "dependencies" | ||
- "dependabot" | ||
- package-ecosystem: "gomod" # See documentation for possible values | ||
directory: "/" # Location of package manifests | ||
schedule: | ||
interval: "daily" | ||
target-branch: "develop/v1" | ||
labels: | ||
- "go" | ||
- "dependencies" | ||
- "dependabot" | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
target-branch: "develop/v2" | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
target-branch: "develop/v1" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: Assign Issue | ||
on: | ||
issues: | ||
types: [opened] | ||
|
||
jobs: | ||
auto-assign: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 'Auto-assign issue' | ||
uses: pozil/auto-assign-issue@v1 | ||
with: | ||
assignees: lestrrat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: 'Auto Assign' | ||
on: | ||
pull_request: | ||
types: [opened, ready_for_review] | ||
|
||
jobs: | ||
add-reviews: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: kentaro-m/[email protected] | ||
with: | ||
configuration-path: .github/auto-assign-pr.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: CI | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
go: [ '1.21' ] | ||
name: "Test [ Go ${{ matrix.go }} ]" | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Cache Go modules | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/go/pkg/mod | ||
~/.cache/go-build | ||
~/.cache/bazel | ||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go- | ||
- name: Install Go stable version | ||
if: matrix.go != 'tip' | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ matrix.go }} | ||
check-latest: true | ||
- name: Test | ||
run: go test ./... |
Oops, something went wrong.