-
Notifications
You must be signed in to change notification settings - Fork 3
Route drawer CTAs for MITxOnline programs-as-courses to correct product pages #3063
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
0e90c7a
Refactor resource_type_group to use typed ChoiceField for proper Open…
ChristopherChudzicki bf55a48
Regenerate OpenAPI specs and TypeScript client
ChristopherChudzicki 938de0c
Use resource_type_group to route program-as-course drawer CTAs to /co…
ChristopherChudzicki 7804431
Apply suggestions from code review
ChristopherChudzicki 050f7dd
use group=course for programs, sometimes
ChristopherChudzicki 7db5663
change string to comment
ChristopherChudzicki b80e1d4
try flatten allof
ChristopherChudzicki 84bf91c
link to changes
ChristopherChudzicki c0471ee
fix a test
ChristopherChudzicki 5241923
add a comment about mitxonline versus learn resources
ChristopherChudzicki 1771f12
add a small comment
ChristopherChudzicki fe3e4c8
fix generated client
ChristopherChudzicki File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,24 +14,18 @@ jobs: | |
| with: | ||
| ref: ${{ github.base_ref }} | ||
| path: base | ||
| - name: Generate oasdiff changelog | ||
| - name: Generate oasdiff summary | ||
| id: oasdif_changelog | ||
| run: | # Capture changelog as a multiline output | ||
| echo "changelog<<EOF" > $GITHUB_OUTPUT | ||
| docker run --rm \ | ||
| run: | | ||
| SUMMARY=$(docker run --rm \ | ||
| --workdir ${{ github.workspace }} \ | ||
| --volume ${{ github.workspace }}:${{ github.workspace }}:rw \ | ||
| -e GITHUB_WORKSPACE=${{ github.workspace }} \ | ||
| tufin/oasdiff changelog --composed \ | ||
| tufin/oasdiff changelog --composed --flatten-allof \ | ||
| 'base/openapi/specs/*.yaml' \ | ||
| 'head/openapi/specs/*.yaml' \ | ||
| >> $GITHUB_OUTPUT | ||
| echo "EOF" >> $GITHUB_OUTPUT | ||
| - name: Get summary | ||
| id: oasdif_summary | ||
| run: | | ||
| echo summary=$(echo "${{ steps.oasdif_changelog.outputs.changelog }}" | head -1 ) \ | ||
| >> $GITHUB_OUTPUT | ||
| | head -1) | ||
| echo "summary=$SUMMARY" >> $GITHUB_OUTPUT | ||
| - name: Find existing comment | ||
| id: find_comment | ||
| uses: peter-evans/find-comment@b30e6a3c0ed37e7c023ccd3f1db5c6c0b0c23aad # v4 | ||
|
|
@@ -43,7 +37,7 @@ jobs: | |
| - name: Post changes as comment | ||
| uses: peter-evans/create-or-update-comment@e8674b075228eee787fea43ef493e45ece1004c9 # v5 | ||
| # Even if no changes, make sure to update old comment if it was found. | ||
| if: steps.oasdif_summary.outputs.summary || steps.find_comment.outputs.comment-id | ||
| if: steps.oasdif_changelog.outputs.summary || steps.find_comment.outputs.comment-id | ||
| with: | ||
| token: ${{ secrets.GITHUB_TOKEN }} | ||
| edit-mode: "replace" | ||
|
|
@@ -53,15 +47,11 @@ jobs: | |
| body: | | ||
| ## OpenAPI Changes | ||
| <details> | ||
| <summary>Show/hide ${{ steps.oasdif_summary.outputs.summary || 'No detectable change.' }}</summary> | ||
| ${{ steps.oasdif_changelog.outputs.summary || 'No detectable change.' }} | ||
| ``` | ||
| ${{ steps.oasdif_changelog.outputs.changelog }} | ||
| ``` | ||
| [View full changelog](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}) | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. link to the details instead of posting all of the changelog... in this case, it was bigger than the comment could handle |
||
| Unexpected changes? Ensure your branch is up-to-date with `main` (consider rebasing). | ||
| </details> | ||
| - name: Check for breaking changes | ||
| id: oasdif_breaking | ||
| run: | | ||
|
|
@@ -72,6 +62,6 @@ jobs: | |
| tufin/oasdiff breaking \ | ||
| --fail-on ERR \ | ||
| --format githubactions \ | ||
| --composed \ | ||
| --composed --flatten-allof \ | ||
| 'base/openapi/specs/*.yaml' \ | ||
| 'head/openapi/specs/*.yaml' | ||
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See https://github.com/oasdiff/oasdiff/blob/main/docs/ALLOF.md,
-flatten-allofhelps reduce some false positives