1
0
mirror of synced 2026-02-01 03:01:50 -05:00

repo sync

This commit is contained in:
Octomerger Bot
2021-02-24 04:41:09 +10:00
committed by GitHub
7 changed files with 69 additions and 1 deletions

View File

@@ -42,7 +42,6 @@ For the users of {% data variables.product.product_location %} to be able to ena
![Checkbox to enable or disable {% data variables.product.prodname_code_scanning %}](/assets/images/enterprise/management-console/enable-code-scanning-checkbox.png)
{% data reusables.enterprise_management_console.save-settings %}
### Running {% data variables.product.prodname_code_scanning %} using {% data variables.product.prodname_actions %}
#### Setting up a self-hosted runner
@@ -89,3 +88,25 @@ The {% data variables.product.prodname_codeql_runner %} is a command-line tool t
1. Under "{% data variables.product.prodname_advanced_security %}", unselect **{% data variables.product.prodname_code_scanning_capc %}**.
![Checkbox to enable or disable {% data variables.product.prodname_code_scanning %}](/assets/images/enterprise/management-console/code-scanning-disable.png)
{% data reusables.enterprise_management_console.save-settings %}
### Enabling or disabling {% data variables.product.prodname_code_scanning %} via the administrative shell (SSH)
You can enable or disable {% data variables.product.prodname_code_scanning %} programmatically on {% data variables.product.product_location %}. For example, you can enable {% data variables.product.prodname_code_scanning %} with your infrastructure-as-code tooling when you deploy an instance for staging or disaster recovery.
For more information about the administrative shell and command-line utilities for {% data variables.product.prodname_ghe_server %}, see "[Accessing the administrative shell (SSH)](/admin/configuration/accessing-the-administrative-shell-ssh)" and "[Command-line utilities](/admin/configuration/command-line-utilities#ghe-config)."
1. SSH into {% data variables.product.product_location %}.
1. Enable {% data variables.product.prodname_code_scanning %}.
```shell
ghe-config app.minio.enabled true
ghe-config app.code-scanning.enabled true
```
2. Optionally, disable {% data variables.product.prodname_code_scanning %}.
```shell
ghe-config app.minio.enabled false
ghe-config app.code-scanning.enabled false
```
3. Apply the configuration.
```shell
ghe-config-apply
```

View File

@@ -0,0 +1,3 @@
<button class="arrow-for-scrolling-top" id="js-scroll-top">
{% octicon "chevron-up" %}
</button>

View File

@@ -2,6 +2,7 @@
import '../stylesheets/index.scss'
import displayPlatformSpecificContent from './display-platform-specific-content'
import explorer from './explorer'
import scrollUp from './scroll-up'
import search from './search'
import nav from './nav'
import browserDateFormatter from 'browser-date-formatter'
@@ -23,6 +24,7 @@ import airgapLinks from './airgap-links'
document.addEventListener('DOMContentLoaded', async () => {
displayPlatformSpecificContent()
explorer()
scrollUp()
search()
nav()
browserDateFormatter()

22
javascripts/scroll-up.js Normal file
View File

@@ -0,0 +1,22 @@
export default function () {
// function to scroll up to page top
const PageTopBtn = document.getElementById('js-scroll-top')
if (!PageTopBtn) return
PageTopBtn.addEventListener('click', (e) => {
window.scrollTo({
top: 0,
behavior: 'smooth'
})
})
// show scroll button only when display is scroll down
window.addEventListener('scroll', function () {
const y = document.documentElement.scrollTop // get the height from page top
if (y < 100) {
PageTopBtn.classList.remove('show')
} else if (y >= 100) {
PageTopBtn.classList.add('show')
}
})
}

View File

@@ -15,6 +15,7 @@
{% endif %}
{% include support-section %}
{% include small-footer %}
{% include scroll-button %}
</main>
</body>
</html>

View File

@@ -47,6 +47,7 @@ $marketing-font-path: "/dist/fonts/";
@import "search.scss";
@import "overrides.scss";
@import "sidebar.scss";
@import "scroll-button.scss";
@import "explorer.scss";
// from https://unpkg.com/highlight.js@9.15.8/styles/github.css
@import "syntax-highlighting.scss";

View File

@@ -0,0 +1,18 @@
button.arrow-for-scrolling-top {
opacity: 0;
transition: 1s;
background-color: #0367d6;
color: #fff;
position: fixed;
bottom: 10px;
right: 10px;
display: block;
width: 40px;
height: 40px;
border-radius: 50%;
&.show {
opacity: 1;
border: none;
transition: 1s;
}
}