Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

BranchAnalysis.tsx 5.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. /*
  2. * SonarQube
  3. * Copyright (C) 2009-2019 SonarSource SA
  4. * mailto:info AT sonarsource DOT com
  5. *
  6. * This program is free software; you can redistribute it and/or
  7. * modify it under the terms of the GNU Lesser General Public
  8. * License as published by the Free Software Foundation; either
  9. * version 3 of the License, or (at your option) any later version.
  10. *
  11. * This program is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  14. * Lesser General Public License for more details.
  15. *
  16. * You should have received a copy of the GNU Lesser General Public License
  17. * along with this program; if not, write to the Free Software Foundation,
  18. * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  19. */
  20. import * as React from 'react';
  21. import Helmet from 'react-helmet';
  22. import SQPageContainer from './components/SQPageContainer';
  23. import SQStartUsing from './components/SQStartUsing';
  24. import SQTopNav from './components/SQTopNav';
  25. import { isLoggedIn } from '../../../helpers/users';
  26. import { getBaseUrl } from '../../../helpers/urls';
  27. import './style.css';
  28. export default function BranchAnalysis() {
  29. return (
  30. <SQPageContainer>
  31. {({ currentUser }) => (
  32. <div className="page page-limited sc-page">
  33. <Helmet title="Pull requests analysis in Github, BitBucket and Azure DevOps | SonarCloud">
  34. <meta
  35. content="SonarCloud automatically analyzes branches and decorates pull requests with Github, BitBucket and Azure DevOps."
  36. name="description"
  37. />
  38. </Helmet>
  39. <SQTopNav />
  40. <div className="sc-child-header">
  41. <img alt="" height="34" src={`${getBaseUrl()}/images/sonarcloud/branch-analysis.svg`} />
  42. <h1 className="sc-child-title">
  43. Branch analysis & <br />
  44. pull request decoration
  45. </h1>
  46. <p className="sc-child-lead">
  47. SonarCloud comes with a built-in feature to automatically analyze <br />
  48. project branches and pull requests as soon as they get created.
  49. </p>
  50. </div>
  51. <ul className="sc-features-list sc-branch-features-list">
  52. <li className="sc-feature sc-branch-feature">
  53. <img
  54. alt=""
  55. className="sc-branch-feature-right flex-0"
  56. height="270"
  57. src={`${getBaseUrl()}/images/sonarcloud/branch-01.png`}
  58. srcSet={`${getBaseUrl()}/images/sonarcloud/branch-01.png 1x, ${getBaseUrl()}/images/sonarcloud/branch-01@2x.png 2x`}
  59. width="463"
  60. />
  61. <div className="flex-1">
  62. <h3 className="sc-feature-title">Analyze branches and pull requests</h3>
  63. <p className="sc-feature-description">
  64. For all project branches (main, maintenance, version, feature, etc.), you get the
  65. full experience in the project space, with a specific focus on that branch.
  66. </p>
  67. <p className="sc-feature-description">
  68. When analyzing pull requests (PRs), a Quality Gate will be generated along with
  69. the list of issues created in the PR.
  70. </p>
  71. <p className="sc-feature-description">
  72. To save time and insure consistency, the analysis configuration is reused across
  73. all branches of a project.
  74. </p>
  75. </div>
  76. </li>
  77. <li className="sc-feature sc-branch-feature">
  78. <div className="flex-1">
  79. <h3 className="sc-feature-title">Decorate PRs on Azure DevOps and GitHub</h3>
  80. <p className="sc-feature-description">
  81. Pull requests get decorated directly on Azure DevOps and GitHub. The result of the
  82. PR analysis is available directly in the pull request itself, complementing nicely
  83. manual reviews made by peers and enabling to make a more educated decision for
  84. merging.
  85. </p>
  86. </div>
  87. <img
  88. alt=""
  89. className="sc-branch-feature-left flex-0"
  90. height="432"
  91. src={`${getBaseUrl()}/images/sonarcloud/branch-02.png`}
  92. srcSet={`${getBaseUrl()}/images/sonarcloud/branch-02.png 1x, ${getBaseUrl()}/images/sonarcloud/branch-02@2x.png 2x`}
  93. width="471"
  94. />
  95. </li>
  96. <li className="sc-feature sc-branch-feature">
  97. <img
  98. alt=""
  99. className="sc-branch-feature-right flex-0"
  100. height="169"
  101. src={`${getBaseUrl()}/images/sonarcloud/branch-03.png`}
  102. srcSet={`${getBaseUrl()}/images/sonarcloud/branch-03.png 1x, ${getBaseUrl()}/images/sonarcloud/branch-03@2x.png 2x`}
  103. width="460"
  104. />
  105. <div className="flex-1">
  106. <h3 className="sc-feature-title">Add a check in GitHub</h3>
  107. <p className="sc-feature-description">
  108. Finally, a check can be added to the PR to provide the Quality Gate status of the
  109. PR, check that can optionally block the merge.
  110. </p>
  111. </div>
  112. </li>
  113. </ul>
  114. <div className="sc-branch-bottom">
  115. There is no longer an excuse for pushing issues to the master.
  116. </div>
  117. {!isLoggedIn(currentUser) && <SQStartUsing />}
  118. </div>
  119. )}
  120. </SQPageContainer>
  121. );
  122. }