Skip to content
This repository was archived by the owner on Jun 11, 2025. It is now read-only.

Commit e6ef03a

Browse files
chore: Synced file(s) with googleworkspace/.github (#55)
* chore: Created local '.github/workflows/lint.yml' from remote 'sync-files/defaults/.github/workflows/lint.yml' * chore: Created local '.github/workflows/test.yml' from remote 'sync-files/defaults/.github/workflows/test.yml' * chore: Created local '.github/CODEOWNERS' from remote 'sync-files/defaults/.github/CODEOWNERS' * chore: Created local '.github/sync-repo-settings.yaml' from remote 'sync-files/defaults/.github/sync-repo-settings.yaml' * chore: Created local '.github/workflows/automation.yml' from remote 'sync-files/defaults/.github/workflows/automation.yml' * chore: Created local 'SECURITY.md' from remote 'SECURITY.md'
1 parent 0673b8a commit e6ef03a

File tree

6 files changed

+194
-0
lines changed

6 files changed

+194
-0
lines changed

.github/CODEOWNERS

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Copyright 2022 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners
16+
17+
.github/ @googleworkspace/workspace-devrel-dpe

.github/sync-repo-settings.yaml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Copyright 2022 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# .github/sync-repo-settings.yaml
16+
# See https://github.com/googleapis/repo-automation-bots/tree/main/packages/sync-repo-settings for app options.
17+
rebaseMergeAllowed: true
18+
squashMergeAllowed: true
19+
mergeCommitAllowed: false
20+
deleteBranchOnMerge: true
21+
branchProtectionRules:
22+
- pattern: main
23+
isAdminEnforced: false
24+
requiresStrictStatusChecks: false
25+
requiredStatusCheckContexts:
26+
# .github/workflows/test.yml with a job called "test"
27+
- "test"
28+
# .github/workflows/lint.yml with a job called "lint"
29+
- "lint"
30+
# Google bots below
31+
- "cla/google"
32+
- "snippet-bot check"
33+
- "header-check"
34+
- "conventionalcommits.org"
35+
requiredApprovingReviewCount: 1
36+
requiresCodeOwnerReviews: true
37+
- pattern: master
38+
isAdminEnforced: false
39+
requiresStrictStatusChecks: false
40+
requiredStatusCheckContexts:
41+
# .github/workflows/test.yml with a job called "test"
42+
- "test"
43+
# .github/workflows/lint.yml with a job called "lint"
44+
- "lint"
45+
# Google bots below
46+
- "cla/google"
47+
- "snippet-bot check"
48+
- "header-check"
49+
- "conventionalcommits.org"
50+
requiredApprovingReviewCount: 1
51+
requiresCodeOwnerReviews: true
52+
permissionRules:
53+
- team: workspace-devrel-dpe
54+
permission: admin

.github/workflows/automation.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Copyright 2022 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
---
15+
name: Automation
16+
on: [push, pull_request, workflow_dispatch]
17+
jobs:
18+
dependabot:
19+
runs-on: ubuntu-latest
20+
if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request' }}
21+
env:
22+
PR_URL: ${{github.event.pull_request.html_url}}
23+
GITHUB_TOKEN: ${{secrets.GOOGLEWORKSPACE_BOT_TOKEN}}
24+
steps:
25+
- name: approve
26+
run: gh pr review --approve "$PR_URL"
27+
- name: merge
28+
run: gh pr merge --auto --squash --delete-branch "$PR_URL"
29+
default-branch-migration:
30+
# this job helps with migrating the default branch to main
31+
# it pushes main to master if master exists and main is the default branch
32+
# it pushes master to main if master is the default branch
33+
runs-on: ubuntu-latest
34+
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' }}
35+
steps:
36+
- uses: actions/checkout@v2
37+
with:
38+
fetch-depth: 0
39+
# required otherwise GitHub blocks infinite loops in pushes originating in an action
40+
token: ${{ secrets.GOOGLEWORKSPACE_BOT_TOKEN }}
41+
- name: Set env
42+
run: |
43+
# set DEFAULT BRANCH
44+
echo "DEFAULT_BRANCH=$(gh repo view --json defaultBranchRef --jq '.defaultBranchRef.name')" >> $GITHUB_ENV;
45+
46+
# set HAS_MASTER_BRANCH
47+
if [ ! -z "$(git ls-remote --heads origin master)" ]; then
48+
echo "HAS_MASTER_BRANCH=true" >> $GITHUB_ENV
49+
else
50+
echo "HAS_MASTER_BRANCH=false" >> $GITHUB_ENV
51+
fi
52+
env:
53+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
54+
- name: configure git
55+
run: |
56+
git config --global user.name 'googleworkspace-bot'
57+
git config --global user.email 'googleworkspace-bot@google.com'
58+
- if: ${{ env.DEFAULT_BRANCH == 'main' && env.HAS_MASTER_BRANCH == 'true' }}
59+
name: Update master branch from main
60+
run: |
61+
git checkout -b master
62+
git reset --hard origin/main
63+
git push origin master
64+
- if: ${{ env.DEFAULT_BRANCH == 'master'}}
65+
name: Update main branch from master
66+
run: |
67+
git checkout -b main
68+
git reset --hard origin/master
69+
git push origin main

.github/workflows/lint.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Copyright 2022 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
---
15+
name: Lint
16+
on: [push, pull_request, workflow_dispatch]
17+
jobs:
18+
lint:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v2
22+
- run: |
23+
echo "No lint checks";
24+
exit 1;

.github/workflows/test.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Copyright 2022 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
---
15+
name: Test
16+
on: [push, pull_request, workflow_dispatch]
17+
jobs:
18+
test:
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v2
22+
- run: |
23+
echo "No tests";
24+
exit 1;

SECURITY.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Report a security issue
2+
3+
To report a security issue, please use https://g.co/vulnz. We use
4+
https://g.co/vulnz for our intake, and do coordination and disclosure here on
5+
GitHub (including using GitHub Security Advisory). The Google Security Team will
6+
respond within 5 working days of your report on g.co/vulnz.

0 commit comments

Comments
 (0)