Skip to content

Commit 914572e

Browse files
committed
Initial commit
0 parents  commit 914572e

15 files changed

+869
-0
lines changed
+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: 🐞 Bug
2+
description: Create a report to help us improve
3+
title: "[BUG] <title>"
4+
labels: [bug, needs triage]
5+
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Thanks for taking the time to fill out this bug report!
11+
- type: checkboxes
12+
attributes:
13+
label: Is there an existing issue for this?
14+
description: Please search to see if an issue already exists for the bug you encountered.
15+
options:
16+
- label: I have searched the existing issues
17+
required: true
18+
- type: textarea
19+
id: what-happened
20+
attributes:
21+
label: Describe the bug?
22+
description: A clear and concise description of what the bug is
23+
placeholder: Tell us what you see!
24+
validations:
25+
required: true
26+
- type: textarea
27+
id: reproduce
28+
attributes:
29+
label: To Reproduce
30+
description: Steps to reproduce the behavior?
31+
placeholder: |
32+
1. In this environment...
33+
2. With this config...
34+
3. Run '...'
35+
4. See error...
36+
validations:
37+
required: true
38+
- type: dropdown
39+
id: os
40+
attributes:
41+
label: What OS are you seeing the problem on?
42+
multiple: true
43+
options:
44+
- ubuntu-latest or ubuntu-20.04
45+
- ubuntu-18.04
46+
- macos-latest or macos-10.15
47+
- macos-11
48+
- windows-latest or windows-2019
49+
- windows-2016
50+
validations:
51+
required: true
52+
- type: textarea
53+
id: expected
54+
attributes:
55+
label: Expected behavior?
56+
description: A clear and concise description of what you expected to happen.
57+
placeholder: Tell us what you expected!
58+
validations:
59+
required: true
60+
- type: textarea
61+
id: logs
62+
attributes:
63+
label: Relevant log output
64+
description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks.
65+
render: shell
66+
- type: textarea
67+
attributes:
68+
label: Anything else?
69+
description: |
70+
Links? or References?
71+
72+
Anything that will give us more context about the issue you are encountering!
73+
74+
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
75+
validations:
76+
required: false
77+
- type: checkboxes
78+
id: terms
79+
attributes:
80+
label: Code of Conduct
81+
description: By submitting this issue, you agree to follow our [Code of Conduct](../blob/main/CODE_OF_CONDUCT.md)
82+
options:
83+
- label: I agree to follow this project's Code of Conduct
84+
required: true
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Feature request
2+
description: Suggest an idea for this project
3+
title: "[Feature] <title>"
4+
labels: [enhancement]
5+
6+
body:
7+
- type: markdown
8+
attributes:
9+
value: |
10+
Thanks for taking the time to fill out this feature request!
11+
- type: textarea
12+
id: what-happened
13+
attributes:
14+
label: Is your feature request related to a problem? Please describe.
15+
description: |
16+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
17+
placeholder: Tell us what you see!
18+
validations:
19+
required: true
20+
- type: textarea
21+
id: requests
22+
attributes:
23+
label: Describe the solution you'd like?
24+
description: A clear and concise description of what you want to happen.
25+
validations:
26+
required: true
27+
- type: textarea
28+
id: alternative
29+
attributes:
30+
label: Describe alternatives you've considered?
31+
description: A clear and concise description of any alternative solutions or features you've considered.
32+
validations:
33+
required: false
34+
- type: textarea
35+
attributes:
36+
label: Anything else?
37+
description: |
38+
Links? or References?
39+
40+
Add any other context or screenshots about the feature request here.
41+
42+
Tip: You can attach images or log files by clicking this area to highlight it and then dragging files in.
43+
validations:
44+
required: false
45+
- type: checkboxes
46+
id: terms
47+
attributes:
48+
label: Code of Conduct
49+
description: By submitting this issue, you agree to follow our [Code of Conduct](./CODE_OF_CONDUCT.md)
50+
options:
51+
- label: I agree to follow this project's Code of Conduct
52+
required: true

.github/workflows/auto-approve.yml

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Auto approve
2+
3+
on:
4+
pull_request_target
5+
6+
jobs:
7+
auto-approve:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: hmarr/auto-approve-action@v2
11+
if: |
12+
github.actor == 'dependabot[bot]' ||
13+
github.actor == 'dependabot' ||
14+
github.actor == 'dependabot-preview[bot]' ||
15+
github.actor == 'dependabot-preview' ||
16+
github.actor == 'renovate[bot]' ||
17+
github.actor == 'renovate'
18+
with:
19+
github-token: ${{ secrets.PAT_TOKEN }}

.github/workflows/rebase.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Automatic Rebase
2+
on:
3+
issue_comment:
4+
types: [created]
5+
jobs:
6+
rebase:
7+
name: Rebase
8+
if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase')
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
with:
13+
token: ${{ secrets.PAT_TOKEN }}
14+
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
15+
- name: Automatic Rebase
16+
uses: cirrus-actions/[email protected]
17+
env:
18+
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Update release version.
2+
on:
3+
release:
4+
types: [published]
5+
6+
7+
jobs:
8+
update-version:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
with:
13+
fetch-depth: 0
14+
- name: Run release-tagger
15+
uses: tj-actions/release-tagger@v2
16+
- name: Sync release version.
17+
uses: tj-actions/sync-release-version@v13
18+
id: sync-release-version
19+
with:
20+
pattern: '${{ github.repository }}@'
21+
only_major: true
22+
paths: |
23+
README.md
24+
- name: Generate CHANGELOG
25+
uses: tj-actions/[email protected]
26+
with:
27+
output: 'HISTORY.md'
28+
- name: Create Pull Request
29+
uses: peter-evans/[email protected]
30+
with:
31+
base: "main"
32+
labels: "merge when passing"
33+
title: "Upgraded to ${{ steps.sync-release-version.outputs.new_version }}"
34+
branch: "upgrade-to-${{ steps.sync-release-version.outputs.new_version }}"
35+
commit-message: "Upgraded from ${{ steps.sync-release-version.outputs.old_version }} -> ${{ steps.sync-release-version.outputs.new_version }}"
36+
body: "View [CHANGES](https://github.com/${{ github.repository }}/compare/${{ steps.sync-release-version.outputs.old_version }}...${{ steps.sync-release-version.outputs.new_version }})"
37+
token: ${{ secrets.PAT_TOKEN }}

.github/workflows/test.yml

+117
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,117 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
# outputs:
12+
# added_files:
13+
# description: "Returns only files that are Added (A)."
14+
# value: ${{ steps.changed-files.outputs.added_files }}
15+
# copied_files:
16+
# description: "Returns only files that are Copied (C)."
17+
# value: ${{ steps.changed-files.outputs.copied_files }}
18+
# deleted_files:
19+
# description: "Returns only files that are Deleted (D)."
20+
# value: ${{ steps.changed-files.outputs.deleted_files }}
21+
# modified_files:
22+
# description: "Returns only files that are Modified (M)."
23+
# value: ${{ steps.changed-files.outputs.modified_files }}
24+
# renamed_files:
25+
# description: "Returns only files that are Renamed (R)."
26+
# value: ${{ steps.changed-files.outputs.renamed_files }}
27+
# all_old_new_renamed_files:
28+
# description: "Returns only files that are Renamed and list their old and new names. **NOTE:** This requires setting `include_all_old_new_renamed_files` to `true` (R)"
29+
# value: ${{ steps.changed-files.outputs.all_old_new_renamed_files }}
30+
# type_changed_files:
31+
# description: "Returns only files that have their file type changed (T)."
32+
# value: ${{ steps.changed-files.outputs.type_changed_files }}
33+
# unmerged_files:
34+
# description: "Returns only files that are Unmerged (U)."
35+
# value: ${{ steps.changed-files.outputs.unmerged_files }}
36+
# unknown_files:
37+
# description: "Returns only files that are Unknown (X)."
38+
# value: ${{ steps.changed-files.outputs.unknown_files }}
39+
# all_changed_and_modified_files:
40+
# description: "Returns all changed and modified files i.e. *a combination of (ACMRDTUX)*"
41+
# value: ${{ steps.changed-files.outputs.all_changed_and_modified_files }}
42+
# all_changed_files:
43+
# description: "Returns all changed files i.e. *a combination of all added, copied, modified and renamed files (ACMR)*"
44+
# value: ${{ steps.changed-files.outputs.all_changed_files }}
45+
# any_changed:
46+
# description: "Returns `true` when any of the filenames provided using the `files` input has changed. If no `files` have been specified,an empty string `''` is returned. i.e. *using a combination of all added, copied, modified and renamed files (ACMR)*."
47+
# value: ${{ steps.changed-files.outputs.any_changed }}
48+
# only_changed:
49+
# description: "Returns `true` when only files provided using the `files` input has changed. If no `files` have been specified,an empty string `''` is returned. i.e. *using a combination of all added, copied, modified and renamed files (ACMR)*."
50+
# value: ${{ steps.changed-files.outputs.only_changed }}
51+
# other_changed_files:
52+
# description: "Returns all other changed files not listed in the files input i.e. *using a combination of all added, copied, modified and renamed files (ACMR)*."
53+
# value: ${{ steps.changed-files.outputs.other_changed_files }}
54+
# all_modified_files:
55+
# description: "Returns all changed files i.e. *a combination of all added, copied, modified, renamed and deleted files (ACMRD)*."
56+
# value: ${{ steps.changed-files.outputs.all_modified_files }}
57+
# any_modified:
58+
# description: "Returns `true` when any of the filenames provided using the `files` input has been modified. If no `files` have been specified,an empty string `''` is returned. i.e. *using a combination of all added, copied, modified, renamed, and deleted files (ACMRD)*."
59+
# value: ${{ steps.changed-files.outputs.any_modified }}
60+
# only_modified:
61+
# description: "Returns `true` when only files provided using the `files` input has been modified. If no `files` have been specified,an empty string `''` is returned.(ACMRD)."
62+
# value: ${{ steps.changed-files.outputs.only_modified }}
63+
# other_modified_files:
64+
# description: "Returns all other modified files not listed in the files input i.e. *a combination of all added, copied, modified, and deleted files (ACMRD)*"
65+
# value: ${{ steps.changed-files.outputs.other_modified_files }}
66+
# any_deleted:
67+
# description: "Returns `true` when any of the filenames provided using the `files` input has been deleted. If no `files` have been specified,an empty string `''` is returned. (D)"
68+
# value: ${{ steps.changed-files.outputs.any_deleted }}
69+
# only_deleted:
70+
# description: "Returns `true` when only files provided using the `files` input has been deleted. If no `files` have been specified,an empty string `''` is returned. (D)"
71+
# value: ${{ steps.changed-files.outputs.only_deleted }}
72+
# other_deleted_files:
73+
# description: "Returns all other deleted files not listed in the files input i.e. *a combination of all deleted files (D)*"
74+
# value: ${{ steps.changed-files.outputs.other_deleted_files }}
75+
76+
jobs:
77+
test:
78+
runs-on: ubuntu-latest
79+
name: Test
80+
steps:
81+
- name: Checkout
82+
uses: actions/checkout@v3
83+
- name: Install Rust
84+
uses: actions/setup-rust@v1
85+
- name: Build binary
86+
run: cargo build --release
87+
- name: Run tests
88+
run: cargo test
89+
- name: Get changed files
90+
id: changed-files
91+
uses: tj-actions/changed-files@v34
92+
- name: Generate output files from JSON
93+
uses: ./
94+
with:
95+
outputs: ${{ steps.changed-files.outputs }};
96+
keys: |
97+
added_files
98+
copied_files
99+
deleted_files
100+
modified_files
101+
renamed_files
102+
all_old_new_renamed_files
103+
type_changed_files
104+
unmerged_files
105+
unknown_files
106+
all_changed_and_modified_files
107+
all_changed_files
108+
any_changed
109+
only_changed
110+
other_changed_files
111+
all_modified_files
112+
any_modified
113+
only_modified
114+
other_modified_files
115+
any_deleted
116+
only_deleted
117+
other_deleted_files

.github/workflows/update-readme.yml

+44
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Format README.md
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
sync-assets:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v3
13+
with:
14+
fetch-depth: 0
15+
16+
- name: Run auto-doc
17+
uses: tj-actions/[email protected]
18+
19+
- name: Run test
20+
uses: tj-actions/remark@v3
21+
22+
- name: Verify Changed files
23+
uses: tj-actions/verify-changed-files@v12
24+
id: verify_changed_files
25+
with:
26+
files: |
27+
README.md
28+
29+
- name: README.md changed
30+
if: steps.verify_changed_files.outputs.files_changed == 'true'
31+
run: |
32+
echo "README.md has uncommited changes"
33+
exit 1
34+
35+
- name: Create Pull Request
36+
if: failure()
37+
uses: peter-evans/create-pull-request@v4
38+
with:
39+
base: "main"
40+
title: "Updated README.md"
41+
branch: "chore/update-readme"
42+
commit-message: "Updated README.md"
43+
body: "Updated README.md"
44+
token: ${{ secrets.PAT_TOKEN }}

0 commit comments

Comments
 (0)