Skip to content

Commit

Permalink
Merge branch 'current' into current
Browse files Browse the repository at this point in the history
  • Loading branch information
mirnawong1 authored May 3, 2024
2 parents 65ac054 + 69df0fd commit 995a0b1
Show file tree
Hide file tree
Showing 568 changed files with 18,313 additions and 26,686 deletions.
43 changes: 43 additions & 0 deletions .github/ISSUE_TEMPLATE/b-propose-new-content.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: "Propose new content"
description: "For proposing new content, such as a new guide or a new page."
title: "[idea] <title>"
labels: ["content","idea"]
body:
- type: markdown
attributes:
value: |
Thank you for sharing your idea for the dbt product documentation! Here are a few things to consider:
* You can submit ideas or suggest changes to our content by opening an [Issue](https://github.com/dbt-labs/docs.getdbt.com/issues/new/choose).
* Before filing an issue, please [search our current issues](https://github.com/dbt-labs/docs.getdbt.com/issues) to avoid duplicates.
* Please read the [Contributing guide](https://github.com/dbt-labs/docs.getdbt.com#contributing) if you want to open a pull request.
- type: checkboxes
id: author_type
attributes:
label: "Which of these best describes you?"
options:
- label: "dbt Community member"
- label: "Partner"
- label: "dbt Labs employee"
- label: "Other"
validations:
required: false

- type: textarea
id: content_idea
attributes:
label: "What's your idea for new content?"
description: |
- Give as much detail as you can to help us understand your idea.
- Why do you think this content is important?
- Who will this new content help?
validations:
required: true

- type: textarea
id: location
attributes:
label: Where would you recommend this content live on the docs.getdbt.com?
description: "Please link to the page or pages you think best fit."
validations:
required: false
54 changes: 0 additions & 54 deletions .github/ISSUE_TEMPLATE/contribute-to-developer-blog.yml

This file was deleted.

50 changes: 50 additions & 0 deletions .github/ISSUE_TEMPLATE/external-core-team.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: dbt Core - Request changes to docs
description: "File a docs update or feature request related to dbt Core content."
title: "[Core] <title>"
labels: ["content","dbt Core"]
body:
- type: markdown
attributes:
value: |
Thank you for opening a dbt Core documentation issue! Here are a few things to consider:
* You can submit ideas or suggest changes to our content by opening an [Issue](https://github.com/dbt-labs/docs.getdbt.com/issues/new/choose).
* Before filing an issue, please [search our current issues](https://github.com/dbt-labs/docs.getdbt.com/issues) to avoid duplicates.
* Please read the [Contributing guide](https://github.com/dbt-labs/docs.getdbt.com#contributing) if you want to open a pull request.
* If known, add the `priority: high/medium/low` label (Optional)
- type: textarea
attributes:
label: Link to the page(s) on docs.getdbt.com requiring updates
description: "Please link to the page or pages you'd like to see improved."
validations:
required: true

- type: textarea
attributes:
label: Tell us more about this update
description: |
- Give as much detail as you can to help us understand the change you want to see.
- What use cases does it support? Can you provide or link to an example?
- Why is this change important?
validations:
required: true

- type: textarea
attributes:
label: Reviewers/Stakeholders/SMEs
description: List the reviewers, stakeholders, and subject matter experts (SMEs) to collaborate with for the docs update.
validations:
required: true

- type: textarea
attributes:
label: Related GitHub issues
description: Add any other context or screenshots about the feature request here.
validations:
required: false
- type: textarea
attributes:
label: Additional information
description: Provide any additional information, configuration, or data that might be necessary to reproduce the issue.
validations:
required: false
42 changes: 0 additions & 42 deletions .github/ISSUE_TEMPLATE/improve-the-site.yml

This file was deleted.

49 changes: 49 additions & 0 deletions .github/ISSUE_TEMPLATE/internal-orch-team.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Orchestration team - Request changes to docs
description: File a docs update request that is not already tracked in Orch team's Release Plans (Notion database).
labels: ["content","internal-orch-team"]
body:
- type: markdown
attributes:
value: |
* You can ask questions or submit ideas for the dbt docs in [Issues](https://github.com/dbt-labs/docs-internal/issues/new/choose)
* Before you file an issue read the [Contributing guide](https://github.com/dbt-labs/docs-internal#contributing).
* Check to make sure someone hasn't already opened a similar [issue](https://github.com/dbt-labs/docs-internal/issues).
- type: checkboxes
id: contributions
attributes:
label: Contributions
description: Please read the contribution docs before opening an issue or pull request.
options:
- label: I have read the contribution docs, and understand what's expected of me.

- type: textarea
attributes:
label: Link to the page on docs.getdbt.com requiring updates
description: Please link to the page or pages you'd like to see improved.
validations:
required: true

- type: textarea
attributes:
label: What part(s) of the page would you like to see updated?
description: |
- Give as much detail as you can to help us understand the change you want to see.
- Why should the docs be changed? What use cases does it support?
- What is the expected outcome?
validations:
required: true

- type: textarea
attributes:
label: Reviewers/Stakeholders/SMEs
description: List the reviewers, stakeholders, and subject matter experts (SMEs) to collaborate with for the docs update.
validations:
required: true

- type: textarea
attributes:
label: Related Jira tickets
description: Add any other context or screenshots about the feature request here.
validations:
required: false
2 changes: 1 addition & 1 deletion .github/pull_request_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,5 +19,5 @@ Uncomment when publishing docs for a prerelease version of dbt:
Adding or removing pages (delete if not applicable):
- [ ] Add/remove page in `website/sidebars.js`
- [ ] Provide a unique filename for new pages
- [ ] Add an entry for deleted pages in `website/static/_redirects`
- [ ] Add an entry for deleted pages in `website/vercel.json`
- [ ] Run link testing locally with `npm run build` to update the links that point to deleted pages
10 changes: 6 additions & 4 deletions .github/workflows/autoupdate.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
name: Auto Update

on:
# This will trigger on all pushes to all branches.
schedule:
- cron: "30 17 * * *"
# This will trigger on all pushes to all branches.
# push: {}
# Alternatively, you can only trigger if commits are pushed to certain branches, e.g.:
push:
branches:
- current
# push:
# branches:
# - current
# - unstable
jobs:
autoupdate:
Expand Down
111 changes: 111 additions & 0 deletions .github/workflows/repo-sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
name: Repo Sync

# **What it does**: Syncs docs.getdbt.com public repo into the docs private repo
# This GitHub Actions workflow keeps the `current` branch of those two repos in sync.
# **Why we have it**: To keep the open-source repository up-to-date
# while still having an internal repository for sensitive work.
# For more details, see https://github.com/repo-sync/repo-sync#how-it-works

on:
schedule:
- cron: '0 6,12,18 * * *' # Run at 6:00 AM, 12:00 PM, and 6:00 PM

jobs:
repo-sync:
permissions:
contents: write
pull-requests: write
name: Repo Sync
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# Use the INTERMEDIATE_BRANCH as the checkout reference
ref: ${{ secrets.INTERMEDIATE_BRANCH }}
token: ${{ secrets.GITHUB_TOKEN }}
# Fetch all history for all branches and tags
fetch-depth: 0

# Sync the source repo to the destination branch using repo-sync/github-sync
- uses: repo-sync/github-sync@v2
name: Sync repo to branch
with:
# Source repository to sync from
source_repo: ${{ secrets.SOURCE_REPO }}
# Source branch to sync from
source_branch: current
# Destination branch to sync to
destination_branch: ${{ secrets.INTERMEDIATE_BRANCH }}
github_token: ${{ secrets.WORKFLOW_TOKEN }}

- name: Ship pull request
uses: actions/github-script@v6
with:
github-token: ${{ secrets.WORKFLOW_TOKEN }}
result-encoding: string
script: |
const {owner, repo} = context.repo;
const head = '${{ secrets.INTERMEDIATE_BRANCH }}';
const base = 'current'
async function closePullRequest(prNumber) {
console.log('closing PR', prNumber)
await github.rest.pulls.update({
owner,
repo,
pull_number: prNumber,
state: 'closed'
});
console.log('closed PR', prNumber)
}
console.log('Creating new PR')
let pull, pull_number
try {
const response = await github.rest.pulls.create({
owner,
repo,
head,
base,
title: 'REPO SYNC - Public to Private',
body: 'This is an automated pull request to sync changes between the public and private repos.',
});
pull = response.data
pull_number = pull.number
console.log('Created pull request successfully', pull.html_url)
} catch (err) {
// Don't error/alert if there's no commits to sync
if (err.message?.includes('No commits')) {
console.log(err.message)
return
}
throw err
}
const { data: prFiles } = await github.rest.pulls.listFiles({ owner, repo, pull_number })
if (prFiles.length) {
console.log(prFiles.length, 'files have changed')
} else {
console.log('No files changed, closing')
await closePullRequest(pull_number)
return
}
console.log('Checking for merge conflicts')
if (pull.mergeable_state === 'dirty') {
console.log('Pull request has a conflict', pull.html_url)
await closePullRequest(pull_number)
throw new Error('PR has a conflict, please resolve manually')
}
console.log('No detected merge conflicts')


console.log('Merging the PR')
await github.rest.pulls.merge({
owner,
repo,
pull_number,
merge_method: 'merge',
})
console.log('Merged the PR successfully')
Loading

0 comments on commit 995a0b1

Please sign in to comment.