Skip to content
This repository has been archived by the owner on Sep 16, 2023. It is now read-only.

Commit

Permalink
chore: regenerate common templates (#52)
Browse files Browse the repository at this point in the history
This PR was generated using Autosynth. 🌈

Synth log will be available here:
https://source.cloud.google.com/results/invocations/cc723c51-d4fa-4226-ae20-39da88909234/targets

- [ ] To automatically regenerate this PR, check this box.

Source-Link: googleapis/synthtool@6abb590
Source-Link: googleapis/synthtool@5a506ec
Source-Link: googleapis/synthtool@7c53709
Source-Link: googleapis/synthtool@27e0e91
  • Loading branch information
yoshi-automation committed Oct 22, 2020
1 parent 17c1c9e commit 98b2e56
Show file tree
Hide file tree
Showing 5 changed files with 78 additions and 23 deletions.
Empty file added .github/snippet-bot.yml
Empty file.
54 changes: 54 additions & 0 deletions .github/workflows/approve-readme.yaml
@@ -0,0 +1,54 @@
on:
pull_request:
name: auto-merge-readme
jobs:
approve:
runs-on: ubuntu-latest
if: github.repository_owner == 'googleapis' && github.head_ref == 'autosynth-readme'
steps:
- uses: actions/github-script@v3.0.0
with:
github-token: ${{secrets.YOSHI_APPROVER_TOKEN}}
script: |
// only approve PRs from yoshi-automation
if (context.payload.pull_request.user.login !== "yoshi-automation") {
return;
}
// only approve PRs like "chore: release <release version>"
if (!context.payload.pull_request.title === "chore: regenerate README") {
return;
}
// only approve PRs with README.md and synth.metadata changes
const files = new Set(
(
await github.paginate(
github.pulls.listFiles.endpoint({
owner: context.repo.owner,
repo: context.repo.repo,
pull_number: context.payload.pull_request.number,
})
)
).map(file => file.filename)
);
if (files.size != 2 || !files.has("README.md") || !files.has(".github/readme/synth.metadata/synth.metadata")) {
return;
}
// approve README regeneration PR
await github.pulls.createReview({
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Rubber stamped PR!',
pull_number: context.payload.pull_request.number,
event: 'APPROVE'
});
// attach automerge label
await github.issues.addLabels({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.number,
labels: ['automerge']
});
11 changes: 9 additions & 2 deletions .kokoro/build.sh
Expand Up @@ -69,9 +69,16 @@ integration)
RETURN_CODE=$?
;;
samples)
if [[ -f samples/pom.xml ]]
SAMPLES_DIR=samples
# only run ITs in snapshot/ on presubmit PRs. run ITs in all 3 samples/ subdirectories otherwise.
if [[ ! -z ${KOKORO_GITHUB_PULL_REQUEST_NUMBER} ]]
then
pushd samples
SAMPLES_DIR=samples/snapshot
fi

if [[ -f ${SAMPLES_DIR}/pom.xml ]]
then
pushd {SAMPLES_DIR}
mvn -B \
-Penable-samples \
-DtrimStackTrace=false \
Expand Down
30 changes: 11 additions & 19 deletions renovate.json
Expand Up @@ -17,24 +17,6 @@
],
"versionScheme": "docker"
},
{
"packagePatterns": [
"^com.google.api:gax",
"^com.google.auth:",
"^com.google.cloud:google-cloud-core",
"^io.grpc:",
"^com.google.guava:"
],
"groupName": "core dependencies"
},
{
"packagePatterns": [
"^com.google.http-client:",
"^com.google.oauth-client:",
"^com.google.api-client:"
],
"groupName": "core transport dependencies"
},
{
"packagePatterns": [
"*"
Expand Down Expand Up @@ -63,6 +45,16 @@
"semanticCommitType": "chore",
"semanticCommitScope": "deps"
},
{
"packagePatterns": [
"^junit:junit",
"^com.google.truth:truth",
"^org.mockito:mockito-core",
"^org.objenesis:objenesis"
],
"semanticCommitType": "test",
"semanticCommitScope": "deps"
},
{
"packagePatterns": [
"^com.google.cloud:google-cloud-"
Expand All @@ -78,4 +70,4 @@
],
"semanticCommits": true,
"masterIssue": true
}
}
6 changes: 4 additions & 2 deletions synth.metadata
Expand Up @@ -4,7 +4,7 @@
"git": {
"name": ".",
"remote": "https://github.com/googleapis/java-security-private-ca.git",
"sha": "24f60bc2664cc0377ca354fe44a1a05103ffe08b"
"sha": "17c1c9e016801102d17e8ac8b1c25a518feb4b04"
}
},
{
Expand All @@ -19,7 +19,7 @@
"git": {
"name": "synthtool",
"remote": "https://github.com/googleapis/synthtool.git",
"sha": "b65ef07d99946d23e900ef2cc490274a16edd336"
"sha": "6abb59097be84599a1d6091fe534a49e5c5cf948"
}
}
],
Expand All @@ -42,7 +42,9 @@
".github/PULL_REQUEST_TEMPLATE.md",
".github/readme/synth.py",
".github/release-please.yml",
".github/snippet-bot.yml",
".github/trusted-contribution.yml",
".github/workflows/approve-readme.yaml",
".github/workflows/auto-release.yaml",
".github/workflows/ci.yaml",
".github/workflows/formatting.yaml",
Expand Down

0 comments on commit 98b2e56

Please sign in to comment.