Skip to content

Commit

Permalink
chore: add github templates (grafana#280)
Browse files Browse the repository at this point in the history
  • Loading branch information
vickyyyyyyy authored Jan 20, 2023
1 parent 3216dc6 commit 84c8b6c
Show file tree
Hide file tree
Showing 12 changed files with 159 additions and 70 deletions.
14 changes: 14 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Lines starting with '#' are comments.
# Each line is a file pattern followed by one or more owners.

# More details are here: https://help.github.com/articles/about-codeowners/

# The '*' pattern is global owners.

# Order is important. The last matching pattern has the most precedence.
# The folders are ordered as follows:

# In each subsection folders are ordered first by depth, then alphabetically.
# This should make it easy to add new rules without breaking existing ones.

* @grafana/partner-plugins
45 changes: 45 additions & 0 deletions .github/ISSUE_TEMPLATE/1-bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
name: Bug report
about: Report a bug you found when using this plugin
labels: ['datasource/ClickHouse', 'type/bug']
---

<!--
Please use this template to create your bug report. By providing as much info as possible you help us understand the issue, reproduce it and resolve it for you quicker. Therefore, take a couple of extra minutes to make sure you have provided all info needed.
PROTIP: record your screen and attach it as a gif to showcase the issue.
- Use query inspector to troubleshoot issues: https://bit.ly/2XNF6YS
- How to record and attach gif: https://bit.ly/2Mi8T6K
-->

**What happened**:

**What you expected to happen**:

**How to reproduce it (as minimally and precisely as possible)**:

<!--
Example:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
-->

**Screenshots**

<!--
If applicable, add screenshots to help explain your problem.
-->

**Anything else we need to know?**:

**Environment**:

- Grafana version:
- Plugin version:
- OS Grafana is installed on:
- User OS & Browser:
- Others:
33 changes: 0 additions & 33 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Feature Request
url: https://github.com/grafana/clickhouse-datasource/discussions/new
about: Discuss ideas for new features or changes
- name: Questions & Help
url: https://community.grafana.com
about: Please ask and answer questions here
20 changes: 0 additions & 20 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

34 changes: 34 additions & 0 deletions .github/issue_commands.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
[
{
"type": "label",
"name": "datasource/ClickHouse",
"action": "addToProject",
"addToProject": {
"url": "https://github.com/orgs/grafana/projects/190"
}
},
{
"type": "label",
"name": "datasource/ClickHouse",
"action": "removeFromProject",
"addToProject": {
"url": "https://github.com/orgs/grafana/projects/190"
}
},
{
"type": "label",
"name": "type/docs",
"action": "addToProject",
"addToProject": {
"url": "https://github.com/orgs/grafana/projects/69"
}
},
{
"type": "label",
"name": "type/docs",
"action": "removeFromProject",
"addToProject": {
"url": "https://github.com/orgs/grafana/projects/69"
}
}
]
4 changes: 4 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<!-- To surface this PR in the changelog add the label: changelog -->
<!-- If this PR is going in the changelog please make sure the title of the PR explains the feature in a user-centric way: -->
<!-- Bad: fix state bug in hooks -->
<!-- Good: Fix crash when switching from Query Builder -->
9 changes: 9 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
changelog:
categories:
- title: Copy the following lines for the CHANGELOG
labels:
- changelog
- title: Hidden
exclude:
labels:
- '*'
16 changes: 0 additions & 16 deletions .github/workflows/add-to-project.yml

This file was deleted.

23 changes: 23 additions & 0 deletions .github/workflows/detect-breaking-changes.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Compatibility check
on: [push, pull_request]

jobs:
compatibilitycheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install dependencies
run: yarn install
- name: Build plugin
run: yarn build
- name: Compatibility check
uses: grafana/plugin-actions/is-compatible@v1
with:
module: './src/module.ts'
comment-pr: 'yes'
skip-comment-if-compatible: 'yes'
fail-if-incompatible: 'no'
targets: '@grafana/data,@grafana/ui,@grafana/runtime,@grafana/e2e-selectors'
21 changes: 21 additions & 0 deletions .github/workflows/issue_commands.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Run commands when issues are labeled
on:
issues:
types: [labeled]
jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Checkout Actions
uses: actions/checkout@v2
with:
repository: "grafana/grafana-github-actions"
path: ./actions
ref: main
- name: Install Actions
run: npm install --production --prefix ./actions
- name: Run Commands
uses: ./actions/commands
with:
token: ${{secrets.GH_BOT_ACCESS_TOKEN}}
configPath: issue_commands
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"description": "Clickhouse Datasource",
"scripts": {
"spellcheck": "cspell -c cspell.config.json \"**/*.{ts,tsx,js,go,md,mdx,yml,yaml,json,scss,css}\"",
"build": "grafana-toolkit plugin:build",
"build": "NODE_OPTIONS='--max-old-space-size=8192' grafana-toolkit plugin:build",
"test": "grafana-toolkit plugin:test",
"dev": "grafana-toolkit plugin:dev",
"watch": "grafana-toolkit plugin:dev --watch",
Expand Down

0 comments on commit 84c8b6c

Please sign in to comment.