Skip to content

Commit 86cf41e

Browse files
authored
repo sync
2 parents ea31ef4 + 37cd5e6 commit 86cf41e

29 files changed

Lines changed: 47 additions & 45 deletions

.github/workflows/repo-sync.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,36 @@ jobs:
163163
console.log(`Branch is already up-to-date`)
164164
}
165165
166+
- name: Enable GitHub auto-merge
167+
if: ${{ steps.find-pull-request.outputs.number }}
168+
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
169+
with:
170+
github-token: ${{ secrets.GITHUB_TOKEN }}
171+
script: |
172+
const pull = await github.pulls.get({
173+
...context.repo,
174+
pull_number: parseInt(${{ steps.find-pull-request.outputs.number }})
175+
})
176+
const pullNodeId = pull.data.node_id
177+
console.log(`Pull request GraphQL Node ID: ${pullNodeId}`)
178+
const mutation = `mutation ($id: ID!) {
179+
enablePullRequestAutoMerge(input: {
180+
pullRequestId: $id,
181+
mergeMethod: MERGE
182+
}) {
183+
clientMutationId
184+
}
185+
}`
186+
const variables = {
187+
id: pullNodeId
188+
}
189+
const graph = await github.graphql(mutation, variables)
190+
if (graph.errors && graph.errors.length > 0) {
191+
console.error('ERROR! Failed to enable auto-merge:\n - ', graph.errors.map(error => error.message).join('\n - '))
192+
} else {
193+
console.log('Auto-merge enabled!')
194+
}
195+
166196
- name: Send Slack notification if workflow fails
167197
uses: someimportantcompany/github-actions-slack-message@0b470c14b39da4260ed9e3f9a4f1298a74ccdefd
168198
if: failure()

.github/workflows/send-issues-to-how-how-we-work-boards.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-latest
1717
continue-on-error: true
1818
steps:
19-
- if: contains(github.event.issue.labels.*.name, 'engineering') && !contains(github.event.issue.labels.*.name, 'feature') && !contains(github.event.issue.labels.*.name, 'epic')
19+
- if: (github.repository == 'github/docs-internal') && contains(github.event.issue.labels.*.name, 'engineering') && !contains(github.event.issue.labels.*.name, 'feature') && !contains(github.event.issue.labels.*.name, 'epic')
2020
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
2121
with:
2222
github-token: ${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }}
@@ -31,7 +31,7 @@ jobs:
3131
} catch (error) {
3232
console.log(error);
3333
}
34-
- if: contains(github.event.issue.labels.*.name, 'engineering') && contains(github.event.issue.labels.*.name, 'feature')
34+
- if: (github.repository == 'github/docs-internal') && contains(github.event.issue.labels.*.name, 'engineering') && contains(github.event.issue.labels.*.name, 'feature')
3535
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
3636
with:
3737
github-token: ${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }}
@@ -46,7 +46,7 @@ jobs:
4646
} catch (error) {
4747
console.log(error);
4848
}
49-
- if: contains(github.event.issue.labels.*.name, 'engineering') && contains(github.event.issue.labels.*.name, 'epic')
49+
- if: (github.repository == 'github/docs-internal') && contains(github.event.issue.labels.*.name, 'engineering') && contains(github.event.issue.labels.*.name, 'epic')
5050
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
5151
with:
5252
github-token: ${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }}

.github/workflows/send-prs-to-how-how-we-work-boards.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
runs-on: ubuntu-latest
1717
continue-on-error: true
1818
steps:
19-
- if: (github.repository == 'github/docs-internal' || github.repository == 'github/docs') && contains(github.event.pull_request.labels.*.name, 'feature')
19+
- if: (github.repository == 'github/docs-internal') && contains(github.event.pull_request.labels.*.name, 'feature')
2020
uses: actions/github-script@626af12fe9a53dc2972b48385e7fe7dec79145c9
2121
with:
2222
github-token: ${{ secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES }}

content/actions/learn-github-actions/sharing-workflows-with-your-organization.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ If you need to share workflows and other {% data variables.product.prodname_acti
2121

2222
### Creating a workflow template
2323

24-
Workflow templates can be created by users with write access to the organization's `.github` repository. The templates can then be used by organization members who have permission to create workflows. Workflow templates can be used to create new workflows in an organizations' public repositories; to use templates to create workflows in private repositories, the organization must be part of an enterprise or GitHub One plan.
24+
Workflow templates can be created by users with write access to the organization's `.github` repository. The templates can then be used by organization members who have permission to create workflows. Workflow templates can be used to create new workflows in an organizations' public repositories; to use templates to create workflows in private repositories, the organization must be part of an enterprise plan.
2525

2626
This procedure demonstrates how to create a workflow template and metadata file. The metadata file describes how the template is presented to users when they are creating a new workflow.
2727

2828
1. If it doesn't already exist, create a new public repository named `.github` in your organization.
29-
1. Create a directory named `workflow-templates`.
30-
1. Create your new workflow file inside the `workflow-templates` directory.
29+
2. Create a directory named `workflow-templates`.
30+
3. Create your new workflow file inside the `workflow-templates` directory.
3131

3232
If you need to refer to a repository's default branch, you can use the `$default-branch` placeholder. When a workflow is created using your template, the placeholder will be automatically replaced with the name of the repository's default branch.
3333

@@ -52,7 +52,7 @@ This procedure demonstrates how to create a workflow template and metadata file.
5252
- name: Run a one-line script
5353
run: echo Hello from Octo Organization
5454
```
55-
1. Create a metadata file inside the `workflow-templates` directory. The metadata file must have the same name as the workflow file, but instead of the `.yml` extension, it must be appended with `.properties.json`. For example, this file named `octo-organization-ci.properties.json` contains the metadata for a workflow file named `octo-organization-ci.yml`:
55+
4. Create a metadata file inside the `workflow-templates` directory. The metadata file must have the same name as the workflow file, but instead of the `.yml` extension, it must be appended with `.properties.json`. For example, this file named `octo-organization-ci.properties.json` contains the metadata for a workflow file named `octo-organization-ci.yml`:
5656
```yaml
5757
{
5858
"name": "Octo Organization Workflow",

content/github/getting-started-with-github/githubs-products.md

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -98,15 +98,4 @@ In addition to the features available with {% data variables.product.prodname_te
9898

9999
You can set up a trial to evaluate {% data variables.product.prodname_ghe_cloud %}. For more information, see "<a href="/articles/setting-up-a-trial-of-github-enterprise-cloud" class="dotcom-only">Setting up a trial of {% data variables.product.prodname_ghe_cloud %}</a>."
100100

101-
For more information about hosting your own instance of [{% data variables.product.prodname_ghe_server %}](https://enterprise.github.com), contact {% data variables.contact.contact_enterprise_sales %}. {% data reusables.enterprise_installation.request-a-trial %}
102-
103-
### {% data variables.product.prodname_ghe_one %}
104-
105-
{% data variables.product.prodname_ghe_one %} includes [{% data variables.product.prodname_enterprise %}](#github-enterprise), plus:
106-
107-
- {% data variables.contact.github_support %} {% data variables.product.premium_plus_support_plan %}
108-
- {% data variables.product.prodname_insights %}
109-
- {% data variables.product.prodname_GH_advanced_security %}{% if currentVersion == "free-pro-team@latest" or currentVersion ver_gt "enterprise-server@2.22" %}. For more information, see "[About {% data variables.product.prodname_GH_advanced_security %}](/github/getting-started-with-github/about-github-advanced-security)."{% endif %}{% if enterpriseServerVersions contains currentVersion and currentVersion == "enterprise-server@2.22" %}. For more information, see "[About {% data variables.product.prodname_code_scanning %}](/github/finding-security-vulnerabilities-and-errors-in-your-code/about-code-scanning)."{% endif %}
110-
- [{% data variables.product.prodname_learning %} for organizations](https://lab.github.com/organizations)
111-
112-
For more information about signing up for {% data variables.product.prodname_ghe_one %}, contact {% data variables.contact.contact_enterprise_sales %}.
101+
For more information about hosting your own instance of [{% data variables.product.prodname_ghe_server %}](https://enterprise.github.com), contact {% data variables.contact.contact_enterprise_sales %}. {% data reusables.enterprise_installation.request-a-trial %}

content/github/working-with-github-support/about-github-premium-support-for-github-enterprise-cloud.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: About GitHub Premium Support for GitHub Enterprise Cloud
3-
intro: '{% data variables.contact.premium_support %} is a paid, supplemental support offering for {% data variables.product.prodname_ghe_cloud %} and {% data variables.product.prodname_ghe_one %} customers.'
3+
intro: '{% data variables.contact.premium_support %} is a paid, supplemental support offering for {% data variables.product.prodname_ghe_cloud %} customers.'
44
redirect_from:
55
- /articles/about-github-premium-support
66
- /articles/about-github-premium-support-for-github-enterprise-cloud

content/insights/exploring-your-usage-of-github-enterprise/metrics-available-with-github-insights.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
---
22
title: Metrics available with GitHub Insights
3-
product: '{% data reusables.gated-features.github-insights %}'
43
intro: '{% data variables.product.prodname_insights %} includes a variety of metrics to give you visibility into your team''s software delivery process.'
54
redirect_from:
65
- /github/installing-and-configuring-github-insights/metrics-available-with-github-insights

content/insights/exploring-your-usage-of-github-enterprise/navigating-between-github-enterprise-and-github-insights.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
title: Navigating between GitHub Enterprise and GitHub Insights
33
intro: ''
4-
product: '{% data reusables.gated-features.github-insights %}'
54
permissions: 'Anyone with access to {% data variables.product.prodname_insights %} can navigate between {% data variables.product.prodname_enterprise %} and {% data variables.product.prodname_insights %}.'
65
versions:
76
enterprise-server: '*'

content/insights/exploring-your-usage-of-github-enterprise/setting-your-timezone-for-github-insights.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
title: Setting your timezone for GitHub Insights
33
intro: 'You can set the timezone for metrics you view in {% data variables.product.prodname_insights %}.'
4-
product: '{% data reusables.gated-features.github-insights %}'
54
permissions: 'Anyone with access to {% data variables.product.prodname_insights %} can set their own timezone.'
65
versions:
76
enterprise-server: '*'

content/insights/exploring-your-usage-of-github-enterprise/viewing-key-metrics-and-reports.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
---
22
title: Viewing key metrics and reports
33
intro: You can view and filter key metrics and reports to help you understand and improve your software delivery process through data.
4-
product: '{% data reusables.gated-features.github-insights %}'
54
redirect_from:
65
- /github/installing-and-configuring-github-insights/viewing-and-filtering-key-metrics-and-reports
76
permissions: 'Anyone with access to {% data variables.product.prodname_insights %} can view key metrics and reports.'

0 commit comments

Comments
 (0)