Skip to content

Commit

Permalink
Governance init (#331)
Browse files Browse the repository at this point in the history
* Add gov

* Add gov

* Add crowdsec version and update regex

* Make more generic

* Oppsie

* Javascript regex is the best

* Test
  • Loading branch information
LaurenceJJones authored Jan 19, 2024
1 parent da619f3 commit 7f706b6
Show file tree
Hide file tree
Showing 5 changed files with 190 additions and 0 deletions.
88 changes: 88 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
name: Bug report
description: Report a bug encountered while operating crowdsec
labels: kind/bug
body:
- type: textarea
id: problem
attributes:
label: What happened?
description: |
Please provide as much info as possible. Not doing so may result in your bug not being addressed in a timely manner.
If this matter is security related, please disclose it privately to [email protected]
validations:
required: true

- type: textarea
id: expected
attributes:
label: What did you expect to happen?
validations:
required: true

- type: textarea
id: repro
attributes:
label: How can we reproduce it (as minimally and precisely as possible)?
validations:
required: true

- type: textarea
id: additional
attributes:
label: Anything else we need to know?

- type: textarea
id: Version
attributes:
label: version
value: |
remediation component version:
<details>
```console
$ crowdsec-firewall-bouncer --version
# paste output here
```
</details>
validations:
required: true
- type: textarea
id: CS-Version
attributes:
label: crowdsec version
value: |
crowdsec version:
<details>
```console
$ crowdsec --version
# paste output here
```
</details>
validations:
required: true

- type: textarea
id: osVersion
attributes:
label: OS version
value: |
<details>
```console
# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here
# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here
```
</details>
4 changes: 4 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
contact_links:
- name: Support Request
url: https://discourse.crowdsec.net
about: Support request or question relating to Crowdsec
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Feature request
description: Suggest an improvement or a new feature
body:
- type: textarea
id: feature
attributes:
label: What would you like to be added?
description: |
Significant feature requests are unlikely to make progress as issues. Please consider engaging on discord (discord.gg/crowdsec) and forums (https://discourse.crowdsec.net), instead.
value: |
For feature request please pick a kind label by removing `<!-- -->` that wrap the example lines below
<!-- /kind feature -->
<!-- Completely new feature not currently available -->
<!-- /kind enhancement -->
<!-- Feature is available but this extends or adds extra functionality -->
validations:
required: true

- type: textarea
id: rationale
attributes:
label: Why is this needed?
validations:
required: true
41 changes: 41 additions & 0 deletions .github/governance.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
version: v1

issue:
captures:
- regex: 'version: v(.+)-'
github_release: true
ignore_case: true
label: 'version/$CAPTURED'

labels:
- prefix: triage
list: ['accepted']
multiple: false
author_association:
collaborator: true
member: true
owner: true
needs:
comment: |
@$AUTHOR: Thanks for opening an issue, it is currently awaiting triage.
In the meantime, you can:
1. Check [Documentation](https://docs.crowdsec.net/docs/next/bouncers/firewall) to see if your issue can be self resolved.
2. You can also join our [Discord](https://discord.gg/crowdsec)
- prefix: kind
list: ['feature', 'bug', 'packaging', 'enhancement']
multiple: false
author_association:
author: true
collaborator: true
member: true
owner: true
needs:
comment: |
@$AUTHOR: There are no 'kind' label on this issue. You need a 'kind' label to start the triage process.
* `/kind feature`
* `/kind enhancement`
* `/kind bug`
* `/kind packaging`
30 changes: 30 additions & 0 deletions .github/workflows/governance-bot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
# .github/workflow/governance.yml

on:
pull_request_target:
types: [ synchronize, opened, labeled, unlabeled ]
issues:
types: [ opened, labeled, unlabeled ]
issue_comment:
types: [ created ]

# You can use permissions to modify the default permissions granted to the GITHUB_TOKEN,
# adding or removing access as required, so that you only allow the minimum required access.
permissions:
contents: read
issues: write
pull-requests: write
statuses: write
checks: write

jobs:
governance:
name: Governance
runs-on: ubuntu-latest
steps:
# Semantic versioning, lock to different version: v2, v2.0 or a commit hash.
- uses: BirthdayResearch/oss-governance-bot@v3
with:
# You can use a PAT to post a comment/label/status so that it shows up as a user instead of github-actions
github-token: ${{secrets.GITHUB_TOKEN}} # optional, default to '${{ github.token }}'
config-path: .github/governance.yml # optional, default to '.github/governance.yml'

0 comments on commit 7f706b6

Please sign in to comment.