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

[CHANGE ME] Re-generated to pick up changes from synthtool. #146

Merged
merged 11 commits into from
Oct 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .github/generated-files-bot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
externalManifests:
- type: json
file: 'synth.metadata'
jsonpath: '$.generatedFiles[*]'
- type: json
file: '.github/readme/synth.metadata/synth.metadata'
jsonpath: '$.generatedFiles[*]'
Empty file added .github/snippet-bot.yml
Empty file.
54 changes: 54 additions & 0 deletions .github/workflows/approve-readme.yaml
Original file line number Diff line number Diff line change
@@ -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']
});
25 changes: 25 additions & 0 deletions .github/workflows/formatting.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
on:
pull_request_target:
types: [opened, synchronize]
branches:
- master
name: format
jobs:
format-code:
runs-on: ubuntu-latest
env:
ACCESS_TOKEN: ${{ secrets.YOSHI_CODE_BOT_TOKEN }}
steps:
- uses: actions/checkout@v2
with:
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
- uses: actions/setup-java@v1
with:
java-version: 11
- run: "mvn com.coveo:fmt-maven-plugin:format"
- uses: googleapis/code-suggester@v1.8.0
with:
command: review
pull_number: ${{ github.event.pull_request.number }}
git_dir: '.'
2 changes: 1 addition & 1 deletion .github/workflows/samples.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ on:
pull_request:
name: samples
jobs:
lint:
checkstyle:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand Down
11 changes: 9 additions & 2 deletions .kokoro/build.sh
Original file line number Diff line number Diff line change
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
Empty file modified .kokoro/readme.sh
100644 → 100755
Empty file.
2 changes: 1 addition & 1 deletion .kokoro/release/publish_javadoc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ popd
# V2
mvn clean site -B -q -Ddevsite.template="${KOKORO_GFILE_DIR}/java/"

pushd target/devsite
pushd target/devsite/reference

# create metadata
python3 -m docuploader create-metadata \
Expand Down
7 changes: 4 additions & 3 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<!-- # Generated by synthtool. DO NOT EDIT! !-->
# Code of Conduct

## Our Pledge
Expand Down Expand Up @@ -69,12 +70,12 @@ dispute. If you are unable to resolve the matter for any reason, or if the
behavior is threatening or harassing, report it. We are dedicated to providing
an environment where participants feel welcome and safe.

Reports should be directed to *[PROJECT STEWARD NAME(s) AND EMAIL(s)]*, the
Project Steward(s) for *[PROJECT NAME]*. It is the Project Steward’s duty to
Reports should be directed to *googleapis-stewards@google.com*, the
Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to
receive and address reported violations of the code of conduct. They will then
work with a committee consisting of representatives from the Open Source
Programs Office and the Google Open Source Strategy team. If for any reason you
are uncomfortable reaching out the Project Steward, please email
are uncomfortable reaching out to the Project Steward, please email
opensource@google.com.

We will investigate every complaint, but you may not receive a direct response.
Expand Down
30 changes: 11 additions & 19 deletions renovate.json
Original file line number Diff line number Diff line change
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
}
}
8 changes: 6 additions & 2 deletions synth.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"git": {
"name": ".",
"remote": "https://github.com/googleapis/java-mediatranslation.git",
"sha": "d5b38890565a89f1594bba606db04cfade229c77"
"sha": "7ddfa2b271197a1ef02c7b11f3d4696298f8433c"
}
},
{
Expand All @@ -19,7 +19,7 @@
"git": {
"name": "synthtool",
"remote": "https://github.com/googleapis/synthtool.git",
"sha": "e6168630be3e31eede633ba2c6f1cd64248dec1c"
"sha": "b19b401571e77192f8dd38eab5fb2300a0de9324"
}
}
],
Expand All @@ -40,11 +40,15 @@
".github/ISSUE_TEMPLATE/feature_request.md",
".github/ISSUE_TEMPLATE/support_request.md",
".github/PULL_REQUEST_TEMPLATE.md",
".github/generated-files-bot.yml",
".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",
".github/workflows/samples.yaml",
".kokoro/build.bat",
".kokoro/build.sh",
Expand Down