Skip to content

Commit

Permalink
chore: release stargazers query type + minor docs changes
Browse files Browse the repository at this point in the history
  • Loading branch information
cletter7 committed Feb 3, 2023
1 parent b885ec6 commit 909f8e5
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 23 deletions.
21 changes: 13 additions & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,28 +2,33 @@

## Entries

## [1.4.0] - 2023-02-03

- **Feature** - Added stargazers query type
- **Chore** - Minor documentation updates

## [1.3.3] - 2023-01-09

- Chore - Remove angular dependency: migrate annotation editor
- **Chore** - Removed angular dependency: migrated annotation editor

## [1.3.2] - next

- Added a `$__toDay()` macro support
- **Feature** Added `$__toDay()` macro support

## [1.3.1] 2022-12-21

- Chore - Updated go version to latest (1.19.4)
- Chore - Updated backend grafana dependencies
- Chore - Add spellcheck
- **Chore** - Updated go version to latest (1.19.4)
- **Chore** - Updated backend grafana dependencies
- **Chore** - Added spellcheck

## [1.3.0] 2022-11-3

- Feature - Github projects - query items, user projects
- Chore - update build to use go 1.19.3
- **Feature** - Github projects - query items, user projects
- **Chore** - Updated build to use go 1.19.3

## [1.2.0] 2022-10-20

- Feature - Github projects
- **Feature** - Github projects

## [1.1.0] - next

Expand Down
22 changes: 12 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,18 +48,20 @@ To create a new Access Token, navigate to [Personal Access Tokens](https://githu
### Provisioning

[It’s possible to configure data sources using config files with Grafana’s provisioning system](https://grafana.com/docs/grafana/latest/administration/provisioning/#data-sources).

#### With the [prom-operator](https://github.com/prometheus-operator/prometheus-operator)

```yaml
promop:
grafana:
additionalDataSources:
- name: GitHub Repo Insights
type: grafana-github-datasource
jsonData:
owner: ""
repository: ""
secureJsonData:
accessToken: "<github api token>"
grafana:
additionalDataSources:
- name: GitHub Repo Insights
type: grafana-github-datasource
jsonData:
owner: ""
repository: ""
secureJsonData:
accessToken: "<github api token>"
```
## Annotations
Expand Down Expand Up @@ -110,7 +112,7 @@ For all repositories:
- `repo:status`
- `repo_deployment`
- `read:packages`
- `user:read`
- `read:user`
- `user:email`

For Github projects:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "grafana-github-datasource",
"version": "1.3.3",
"version": "1.4.0",
"description": "loads data from github issues/Pr's to Grafana",
"private": true,
"scripts": {
Expand Down
20 changes: 16 additions & 4 deletions src/views/ConfigEditor.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
import React, { PureComponent } from 'react';
import { onUpdateDatasourceJsonDataOption, DataSourcePluginOptionsEditorProps } from '@grafana/data';
import { Input, InlineFormLabel, LegacyForms, InfoBox, Icon } from '@grafana/ui';
import { css } from '@emotion/css';
import { GithubDataSourceOptions, GithubSecureJsonData } from '../types';
import { selectors } from 'components/selectors';

export type ConfigEditorProps = DataSourcePluginOptionsEditorProps<GithubDataSourceOptions, GithubSecureJsonData>;

const styles = {
tokenScopesList: css`
list-style-type: none;
`,
};

export class ConfigEditor extends PureComponent<ConfigEditorProps> {
onSettingReset = (prop: string) => (event: any) => {
this.onSettingUpdate(prop, false)({ target: { value: undefined } });
Expand Down Expand Up @@ -46,20 +53,25 @@ export class ConfigEditor extends PureComponent<ConfigEditorProps> {
<p>Ensure that your token has the following permissions:</p>
<h4>For all repositories:</h4>
<pre>
<ul>
<ul className={styles.tokenScopesList}>
<li>public_repo</li>
<li>repo:status</li>
<li>repo_deployment</li>
<li>read:packages</li>
</ul>
<ul>
<li>read:user</li>
<li>user:email</li>
</ul>
</pre>
<h4>For Github projects:</h4>
<pre>
<ul className={styles.tokenScopesList}>
<li>read:org</li>
<li>read:project</li>
</ul>
</pre>
<h4>An extra setting is required for private repositories:</h4>
<pre>
<ul>
<ul className={styles.tokenScopesList}>
<li>repo (Full control of private repositories)</li>
</ul>
</pre>
Expand Down

0 comments on commit 909f8e5

Please sign in to comment.