Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare master for v5 release. #551

Merged
merged 15 commits into from
Jun 1, 2019
Prev Previous commit
Next Next commit
Rearrange options page
  • Loading branch information
Stefan Buck committed Jun 1, 2019
commit dbf5b894f438666e024a01aee873ee9a31fd9efd
95 changes: 55 additions & 40 deletions packages/helper-settings/SettingsForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import * as storage from './index';

const githubTokenDescription = () => (
<span>
Get the most out of OctoLinker by providing a GitHub personal access token.
Get the most out of OctoLinker by providing a GitHub access token.
</span>
);

Expand Down Expand Up @@ -69,7 +69,7 @@ export default class Form extends Component {
}

tokenMessage() {
return <div className="flash flash-success">Token successfuly added</div>;
return <div className="flash flash-success">Token successfully added</div>;
}

render(props, state) {
Expand All @@ -90,53 +90,68 @@ export default class Form extends Component {
error={errorMessage}
onInput={linkState(this, 'githubToken')}
/>
<p className="note">
OctoLinker uses the{' '}
<p className="note ">
For public repositories,{' '}
<a
href="https://developer.github.com/v3/"
href="https://github.com/settings/tokens/new?scopes=public_repo&description=OctoLinker"
target="_blank"
rel="noopener noreferrer"
>
GitHub API
create a token
</a>{' '}
to retrieve repository metadata. By default, it makes unauthenticated
requests to the GitHub API. However, there are two situations when
requests must be authenticated:
</p>
<p className="note ml-5">
<ul>
<li>You access a private repository</li>
<li>
You exceed{' '}
<a
href="https://developer.github.com/v3/#rate-limiting"
target="_blank"
rel="noopener noreferrer"
>
the rate limit for unauthenticated requests
</a>
</li>
</ul>
</p>
<p className="note">
When that happens, OctoLinker will ask for an API access token. If you
don&apos;t already have one, create one either for all your{' '}
with the{' '}
<code>
<strong>public_repo</strong>
</code>{' '}
permission. If you want OctoLinker for private repositories,
you&apos;ll need to{' '}
<a
href="https://github.com/settings/tokens/new?scopes=public_repo&description=OctoLinker%20browser%20extension"
href="https://github.com/settings/tokens/new?scopes=repo&description=OctoLinker"
target="_blank"
rel="noopener noreferrer"
>
<strong>public repositories</strong>
</a>
{' or for '}
<a
href="https://github.com/settings/tokens/new?scopes=repo&description=OctoLinker%20browser%20extension"
target="_blank"
rel="noopener noreferrer"
>
<strong>all public and private repositories</strong>
</a>
. Then copy and paste it into the input field above.
create a token
</a>{' '}
with the{' '}
<code>
<strong>repo</strong>
</code>{' '}
permissions. Then copy and paste it into the input field above.
<details className="mt-3">
<summary>Why is a GitHub token needed?</summary>
<p className="note">
OctoLinker uses the{' '}
<a
href="https://developer.github.com/v3/"
target="_blank"
rel="noopener noreferrer"
>
GitHub API
</a>{' '}
to retrieve repository metadata. By default, it makes
unauthenticated requests to the GitHub API. However, there are two
situations when requests must be authenticated:
</p>
<p className="note ml-5">
<ul>
<li>You access a private repository</li>
<li>
You exceed{' '}
<a
href="https://developer.github.com/v3/#rate-limiting"
target="_blank"
rel="noopener noreferrer"
>
the rate limit for unauthenticated requests
</a>
</li>
</ul>
</p>
<p className="note">
When that happens, OctoLinker needs an GitHub access token in
order to continue to work.
</p>
</details>
</p>
<hr />
<Checkbox
Expand Down
2 changes: 1 addition & 1 deletion packages/helper-settings/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import SettingsForm from './SettingsForm';

const App = () => (
<div className="d-flex flex-justify-center">
<div className="Box box-shadow four-fifth column">
<div className="four-fifth column">
<div className="Box-row">
<SettingsForm />
</div>
Expand Down