diff --git a/.all-contributorsrc b/.all-contributorsrc index 871c5c210..78bcf932e 100644 --- a/.all-contributorsrc +++ b/.all-contributorsrc @@ -398,6 +398,15 @@ "contributions": [ "doc" ] + }, + { + "login": "cheshire137", + "name": "Sarah Vessels", + "avatar_url": "https://avatars3.githubusercontent.com/u/82317?v=4", + "profile": "https://github.com/cheshire137", + "contributions": [ + "doc" + ] } ] } diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 197ca7c20..f2d0b0bfd 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -17,7 +17,9 @@ If you want to open a PR that fixes a bug or adds a feature, then we can't thank ### Working on issues -Please feel free to take on any issue that's currently open. Feel free to resolve any issue that you would enjoy working on even if it happens to be a low priority. +Please feel free to take on any issue that's currently open. You could look at +[issues labeled "high priority"](https://github.com/gitpoint/git-point/issues?q=is%3Aopen+is%3Aissue+label%3A%22high+priority%22), +but feel free to resolve any issue that you would enjoy working on even if it happens to be a low priority. ## Setup diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 159262624..846124a39 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -10,5 +10,5 @@ Thank you to all the people who have already contributed to GitPoint! | [
Sammy Israwi](https://github.com/SammyIsra)
[💻](https://github.com/gitpoint/git-point/commits?author=SammyIsra "Code") [🐛](https://github.com/gitpoint/git-point/issues?q=author%3ASammyIsra "Bug reports") | [
Chao Ren](https://github.com/RogerAbyss)
[🐛](https://github.com/gitpoint/git-point/issues?q=author%3ARogerAbyss "Bug reports") [💻](https://github.com/gitpoint/git-point/commits?author=RogerAbyss "Code") | [
Harish Toshniwal](https://introwit.in)
[📖](https://github.com/gitpoint/git-point/commits?author=introwit "Documentation") | [
Ferran Negre](http://github.com/ferrannp)
[💻](https://github.com/gitpoint/git-point/commits?author=ferrannp "Code") | [
Ganesh Cauda Salim](https://github.com/caudaganesh)
[💻](https://github.com/gitpoint/git-point/commits?author=caudaganesh "Code") | [
Wanda Ichsanul Isra](https://www.linkedin.com/in/wlisrausr)
[💻](https://github.com/gitpoint/git-point/commits?author=wlisrausr "Code") | | [
Cameron Samuels](http://cameronsamuels.com)
[📖](https://github.com/gitpoint/git-point/commits?author=CameronSamuels "Documentation") | [
Mehdi Achour](https://machour.idk.tn/)
[🐛](https://github.com/gitpoint/git-point/issues?q=author%3Amachour "Bug reports") [💻](https://github.com/gitpoint/git-point/commits?author=machour "Code") [🌍](#translation-machour "Translation") | [
Reyhan Sofian](https://www.reyhan.tech/)
[💻](https://github.com/gitpoint/git-point/commits?author=reyhansofian "Code") | [
Adrian Hartanto](https://github.com/adrianhartanto0)
[💻](https://github.com/gitpoint/git-point/commits?author=adrianhartanto0 "Code") | [
Blake Y. Gong](https://github.com/blakegong)
[💻](https://github.com/gitpoint/git-point/commits?author=blakegong "Code") | [
Xianming Zhong](https://github.com/chinesedfan)
[💻](https://github.com/gitpoint/git-point/commits?author=chinesedfan "Code") [🐛](https://github.com/gitpoint/git-point/issues?q=author%3Achinesedfan "Bug reports") | | [
Arthur Denner](https://github.com/arthurdenner)
[🌍](#translation-arthurdenner "Translation") | [
Florian Taut](https://taut-fl.de)
[💻](https://github.com/gitpoint/git-point/commits?author=FlorianTaut "Code") | [
Avare Kodcu](http://www.avarekodcu.com/iletisim)
[🌍](#translation-abdurrahmanekr "Translation") | [
Anas Khan](http://anask.xyz)
[🌍](#translation-anaskhan96 "Translation") | [
Nelson Henrique](https://github.com/nersoh)
[💻](https://github.com/gitpoint/git-point/commits?author=nersoh "Code") | [
Charles Kenney](http://charleskenney.com)
[💻](https://github.com/gitpoint/git-point/commits?author=Charliekenney23 "Code") | -| [
Vitaliy Kanev](https://github.com/vitalkanev)
[📖](https://github.com/gitpoint/git-point/commits?author=vitalkanev "Documentation") | [
Peter Dave Hello](https://www.peterdavehello.org/)
[📖](https://github.com/gitpoint/git-point/commits?author=PeterDaveHello "Documentation") [🔧](#tool-PeterDaveHello "Tools") | [
Ernoff](https://github.com/Ernoff)
[💻](https://github.com/gitpoint/git-point/commits?author=Ernoff "Code") [🐛](https://github.com/gitpoint/git-point/issues?q=author%3AErnoff "Bug reports") | [
Arjun Curat](https://github.com/acurat)
[📖](https://github.com/gitpoint/git-point/commits?author=acurat "Documentation") | +| [
Vitaliy Kanev](https://github.com/vitalkanev)
[📖](https://github.com/gitpoint/git-point/commits?author=vitalkanev "Documentation") | [
Peter Dave Hello](https://www.peterdavehello.org/)
[📖](https://github.com/gitpoint/git-point/commits?author=PeterDaveHello "Documentation") [🔧](#tool-PeterDaveHello "Tools") | [
Ernoff](https://github.com/Ernoff)
[💻](https://github.com/gitpoint/git-point/commits?author=Ernoff "Code") [🐛](https://github.com/gitpoint/git-point/issues?q=author%3AErnoff "Bug reports") | [
João Fonseca](https://github.com/Jpfonseca)
| [
Arjun Curat](https://github.com/acurat)
[📖](https://github.com/gitpoint/git-point/commits?author=acurat "Documentation") | [
Sarah Vessels](https://github.com/cheshire137)
[📖](https://github.com/gitpoint/git-point/commits?author=cheshire137 "Documentation") | diff --git a/README.md b/README.md index 63a3fdb4e..df2e3946b 100644 --- a/README.md +++ b/README.md @@ -39,7 +39,7 @@ ## Introduction [![Build Status](https://img.shields.io/travis/gitpoint/git-point.svg?style=flat-square)](https://travis-ci.org/gitpoint/git-point) -[![All Contributors](https://img.shields.io/badge/all_contributors-40-orange.svg?style=flat-square)](#contributors) +[![All Contributors](https://img.shields.io/badge/all_contributors-42-orange.svg?style=flat-square)](#contributors) [![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square)](http://makeapullrequest.com) [![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg?style=flat-square)](http://commitizen.github.io/cz-cli/) [![Gitter chat](https://img.shields.io/badge/chat-on_gitter-008080.svg?style=flat-square)](https://gitter.im/git-point) diff --git a/src/api/index.js b/src/api/index.js index d4820135f..c46f4dc9e 100644 --- a/src/api/index.js +++ b/src/api/index.js @@ -21,6 +21,36 @@ const METHOD = { POST: 'POST', }; +export const v4 = { + root: 'https://api.github.com/graphql', + call: async parameters => { + const response = await fetch(v4.root, parameters); + const json = JSON.parse(response._bodyText); + + if (response.status >= 200 && response.status < 300) { + return json.data; + } + const error = new Error(json.message); + + error.response = response; + throw error; + }, + parameters: (accessToken, body = {}) => { + return { + method: METHOD.POST, + headers: { + Authorization: `token ${accessToken}`, + }, + body: JSON.stringify(body), + }; + }, + post: async (accessToken, body) => { + const response = await v4.call(v4.parameters(accessToken, body)); + + return response; + }, +}; + export const v3 = { root: 'https://api.github.com', call: async (url, parameters) => { diff --git a/src/components/issue-description.component.js b/src/components/issue-description.component.js index 90c58d428..7ae614271 100644 --- a/src/components/issue-description.component.js +++ b/src/components/issue-description.component.js @@ -115,7 +115,7 @@ export class IssueDescription extends Component { return ( - {issue.repository_url && ( + {issue.repository_url && onRepositoryPress(issue.repository_url)} hideChevron - /> - )} + />} - ))} + !isPendingCheckMerge && + )} - {issue.pull_request && ( + {issue.pull_request && - {isPendingDiff && ( - - )} + {isPendingDiff && + } {!isPendingDiff && - (lineAdditions !== 0 || lineDeletions !== 0) && ( - - navigation.navigate('PullDiff', { - title: translate('repository.pullDiff.title', language), - language, - diff, - })} - /> - )} - - )} + (lineAdditions !== 0 || lineDeletions !== 0) && + + navigation.navigate('PullDiff', { + title: translate('repository.pullDiff.title', language), + language, + diff, + })} + />} + } {issue.labels && - issue.labels.length > 0 && ( - - {this.renderLabelButtons(issue.labels)} - - )} + issue.labels.length > 0 && + + {this.renderLabelButtons(issue.labels)} + } {issue.assignees && - issue.assignees.length > 0 && ( - - - - )} + issue.assignees.length > 0 && + + + } {issue.pull_request && !isMerged && issue.state === 'open' && - userHasPushPermission && ( - -