Skip to content

Commit

Permalink
Merge pull request #2199 from Azure/autogenerate
Browse files Browse the repository at this point in the history
Merge Autogenerate
  • Loading branch information
jorgecotillo authored Feb 14, 2022
2 parents 91fd03b + 148c32a commit b22cd42
Show file tree
Hide file tree
Showing 40 changed files with 21,897 additions and 1,670 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/generate-schemas-batch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ env:
SUMMARY_LOG_ARTIFACT_NAME: summary-log
AUTOGENERATE_BRANCH_NAME: autogenerate
AUTHOR: ${{ github.actor }}
AUTHOR_EMAIL: ${{ github.actor }}@microsoft.com
AUTHOR_EMAIL: <${{ github.actor }}@users.noreply.github.com>
jobs:
batch-0:
name: Update Schemas Batch 0
Expand Down Expand Up @@ -185,12 +185,12 @@ jobs:
working-directory: workflow-temp/azure-rest-api-specs

- name: Create Pull Request
uses: peter-evans/[email protected].0
uses: peter-evans/[email protected].1
with:
committer: GitHub <[email protected]>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: false
branch: ${{ env.AUTOGENERATE_BRANCH_NAME }}
branch: ${{ env.AUTOGENERATE_BRANCH_NAME }}_tmp
branch-suffix: short-commit-hash
delete-branch: true
title: |
Expand Down
9 changes: 7 additions & 2 deletions generator/cmd/generateall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ executeSynchronous(async () => {
const newConfigs = await generateSchemas(readme, autoGenConfig);
schemaConfigs.push(...newConfigs);
pkg.result = 'succeeded';
logOut(summaryLogger,
`<details>
<summary>Successfully generated types for base path '${basePath}'.</summary>
</details>
`);
} catch(error) {
pkg.packageName = autoGenConfig.basePath;
pkg.result = 'failed';
Expand All @@ -103,7 +108,7 @@ executeSynchronous(async () => {
// Use markdown formatting as this summary will be included in the PR description
logOut(summaryLogger,
`<details>
<summary>Failed to generate types for path '${autoGenConfig.basePath}' and namespace '${autoGenConfig.namespace}'</summary>
<summary>Failed to generate types for base path '${autoGenConfig.basePath}' and namespace '${autoGenConfig.namespace}'</summary>
\`\`\`
${error}
\`\`\`
Expand All @@ -117,7 +122,7 @@ executeSynchronous(async () => {
// This error usually indicates that a file has not been found (readme)
logOut(summaryLogger,
`<details>
<summary>Failed to generate types for path '${basePath}' probably due to readme not found or due to any other file not found exception.</summary>
<summary>Failed to generate types for base path '${basePath}' probably due to readme not found or due to any other file not found exception.</summary>
\`\`\`
${error}
\`\`\`
Expand Down
Loading

0 comments on commit b22cd42

Please sign in to comment.