Skip to content

Commit

Permalink
feat: adding in items for maintenance, workflows, standard commit lin…
Browse files Browse the repository at this point in the history
…ting (#75)

* feat: adding in items for maintenance - various workflows, standard commit linting

* fix: header lint fix
  • Loading branch information
pattishin authored Apr 19, 2023
1 parent e963095 commit 6dd4dc5
Show file tree
Hide file tree
Showing 6 changed files with 155 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/conventional-commit-lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

enabled: true
always_check_pr_title: true
27 changes: 27 additions & 0 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the 'License');
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an 'AS IS' BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Labeler assigns GitHub labels to PRs based on changed files.

# component labels are used in release notes.
'component: app':
- 'src/*'
- 'src/**/*'
'component: infra':
- 'infra/*'
- 'infra/**/*'
- 'Dockerfile'
'component: docs':
- 'docs/*'
- 'docs/**/*'
11 changes: 11 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
## Description

Fixes #<ISSUE-NUMBER>

**Note:** Before submitting a pull request, please open an issue for discussion if you are not associated with Google.

## Checklist
- [ ] Added steps to reproduce the changes in this pull request
- [ ] Added relevant testing in this pull request
- [ ] Please **merge** this PR for me once it is approved.

40 changes: 40 additions & 0 deletions .github/sync-repo-settings.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# .github/sync-repo-settings.yaml
# See https://github.com/googleapis/repo-automation-bots/tree/main/packages/sync-repo-settings for app options.

rebaseMergeAllowed: true
squashMergeAllowed: true
mergeCommitAllowed: false
deleteBranchOnMerge: true
branchProtectionRules:
- pattern: main
isAdminEnforced: false
requiresStrictStatusChecks: false
requiredStatusCheckContexts:
# .github/workflows/test.yml with a job called "test"
- 'test'
# .github/workflows/lint.yml with a job called "lint"
- 'lint'
# Google bots below
- 'cla/google'
- 'snippet-bot check'
- 'header-check'
- 'conventionalcommits.org'
requiredApprovingReviewCount: 1
requiresCodeOwnerReviews: true
permissionRules:
- team: workspace-devrel-dpe
permission: admin
19 changes: 19 additions & 0 deletions .github/trusted-contribution.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Automatically trigger Cloud Build tests
# (only works on the GoogleCloudPlatform org!)
annotations:
- type: comment
text: "/gcbrun"
42 changes: 42 additions & 0 deletions .github/workflows/auto-label.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# Copyright 2023 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the 'License');
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an 'AS IS' BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Auto Label
on:
pull_request_target:
types: [ opened, reopened, synchronize, edited ]

# Add labels to Pull Requests
permissions:
issues: write
pull-requests: write

jobs:
conventional-release:
runs-on: ubuntu-latest
steps:
- name: Conventional Release Labels
uses: bcoe/conventional-release-labels@v1
with:
type_labels: '{"feat": "type: feature request", "fix": "type: bug", "breaking": "semver: major"}'

label-changes:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/labeler@v4
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"

0 comments on commit 6dd4dc5

Please sign in to comment.