-
Notifications
You must be signed in to change notification settings - Fork 639
Fix part of #6106: Implement generate changelog workflow and update bazel setup step #6341
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
35 commits
Select commit
Hold shift + click to select a range
4aa8470
Add VertexAiClient interface and FakeVertexAiClient for changelog gen…
Sandesh282 14bee6f
Add GoogleVertexAiClient: production Vertex AI REST implementation
Sandesh282 8e13e92
Add GenerateChangelogs script and Bazel targets for automated changel…
Sandesh282 0bf63b8
Fix: remove unused kt_jvm_binary from release/BUILD.bazel load statement
Sandesh282 9814e60
minor fix
Sandesh282 a07aac8
Add unit tests for GenerateChangelogs script
Sandesh282 368ffc3
Fix mutable companion apiBaseUrl; add GoogleVertexAiClientTest
Sandesh282 c6af637
Add gh pr create arg assertions to GenerateChangelogsTest
Sandesh282 510cb3e
Fix ktlint blank line violations in GenerateChangelogsTest
Sandesh282 3161be3
Exempt VertexAiClient and FakeVertexAiClient from test file check
Sandesh282 e6bac62
Move FakeVertexAiClient to src/javatests; exempt VertexAiClient inter…
Sandesh282 6ee5859
Fix buildifier blank lines in release BUILD.bazel
Sandesh282 f583f28
Add FakeVertexAiClientTest to satisfy test file presence check
Sandesh282 8985c0e
move FakeVertexAiClient to prod source set to fix test file presence …
Sandesh282 f95b6d3
remove unused kt_jvm_library from javatests BUILD load statement
Sandesh282 66120f5
apply buildifier reformat to javatests BUILD
Sandesh282 aa6d3e3
add generate_changelog.yml workflow triggered on version.bzl push
Sandesh282 1136d88
Address reviewer comments: fix action pins, Closes→Fix/Fixes, cleanup…
Sandesh282 ab14f99
Add target_version input to workflow_dispatch
Sandesh282 cdd68bc
Wire target_version input to TARGET_VERSION env var in script step
Sandesh282 53c0ee2
Add set-up-android-bazel-build-environment and Bazel 6.5.0 version pin
Sandesh282 6ece400
add git fetch command
Sandesh282 302b027
Use oppia-android-automation-env (no approval gate) for changelog wor…
Sandesh282 4b67051
Merge upstream/develop into pr2.2 (pr2.1 landed)
Sandesh282 bf29ef0
Clarify secrets setup; drop automated-changelog label; delete 0.18.md…
Sandesh282 422044a
Update Set up Bazel step
Sandesh282 3eed5c3
Address review: use dedicated changelog SA, fix release branch refs t…
Sandesh282 de8a9af
Fix ktlint: wrap long gitMergeBase call
Sandesh282 cfddd58
Fix ktlint: wrap gitMergeBase args
Sandesh282 8efcd23
Update Bazel setup step
Sandesh282 6317a13
Address review: trim overinflated docstrings in generate_changelog.yml
Sandesh282 5dbd4e4
Add 0.18 and 0.18_alpha changelogs from upstream develop
Sandesh282 1a489e2
Address review
Sandesh282 d73380f
minor fix
Sandesh282 8a045e4
Fix KDoc placement: move private constants before KDoc block
Sandesh282 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
Some comments aren't visible on the classic Files Changed page.
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
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
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
|
adhiamboperes marked this conversation as resolved.
|
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 |
|---|---|---|
| @@ -0,0 +1,91 @@ | ||
| # Triggered when a version-bump PR merges to develop (path filter: version.bzl). | ||
| # Runs GenerateChangelogs, which reads the new version, collects PRs between the | ||
| # two most recent release branches, calls Vertex AI for a summary, and opens a PR | ||
| # with the generated config/changelogs/<version>.md file. | ||
| # Can also be triggered manually via workflow_dispatch. | ||
|
|
||
| name: Generate Changelog | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - develop | ||
| paths: | ||
| - 'version.bzl' | ||
| workflow_dispatch: | ||
|
adhiamboperes marked this conversation as resolved.
|
||
| inputs: | ||
| target_version: | ||
| description: >- | ||
| Version to generate changelog for (e.g. "0.17"). If empty, the version | ||
| is read from version.bzl at HEAD. Use this to regenerate a changelog | ||
| for an older release without modifying version.bzl. | ||
| required: false | ||
| default: '' | ||
|
|
||
| # Only one changelog generation may run at a time; cancel-in-progress: false so that | ||
| # a rapid double-push to version.bzl does not leave an inconsistent changelog branch. | ||
| concurrency: | ||
| group: generate-changelog | ||
|
adhiamboperes marked this conversation as resolved.
|
||
| cancel-in-progress: false | ||
|
|
||
| jobs: | ||
| generate_changelog: | ||
| name: Generate Changelog | ||
| runs-on: ubuntu-24.04 | ||
| # oppia-android-automation-env (not release-env) because this workflow opens a PR | ||
| # for human review and never deploys directly. GCP_CHANGELOG_SERVICE_ACCOUNT is | ||
| # a dedicated, minimally-scoped SA separate from GCP_RELEASE_SERVICE_ACCOUNT so | ||
| # that a compromised changelog workflow cannot reach signing/Play Store resources. | ||
| environment: oppia-android-automation-env | ||
| permissions: | ||
| id-token: write | ||
| contents: write | ||
| pull-requests: write | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| fetch-depth: 0 | ||
|
|
||
| - name: Configure git identity | ||
| run: | | ||
| git config user.name "github-actions[bot]" | ||
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
|
adhiamboperes marked this conversation as resolved.
|
||
|
|
||
| - name: Configure git remote credentials | ||
| run: | | ||
| git remote set-url origin \ | ||
| https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }} | ||
|
|
||
| - name: Authenticate to GCP via Workload Identity Federation | ||
| uses: google-github-actions/auth@v2 | ||
| with: | ||
| workload_identity_provider: ${{ secrets.WIF_PROVIDER }} | ||
|
adhiamboperes marked this conversation as resolved.
|
||
| service_account: ${{ secrets.GCP_CHANGELOG_SERVICE_ACCOUNT }} | ||
|
|
||
| - name: Set up Google Cloud SDK | ||
| uses: google-github-actions/setup-gcloud@v2 | ||
|
|
||
| - name: Get and mask GCP access token | ||
| run: | | ||
| ACCESS_TOKEN="$(gcloud auth print-access-token)" | ||
| echo "::add-mask::$ACCESS_TOKEN" | ||
| echo "GCP_ACCESS_TOKEN=$ACCESS_TOKEN" >> "$GITHUB_ENV" | ||
|
|
||
| - name: Set up Bazel | ||
| uses: bazel-contrib/setup-bazel@0.19.0 | ||
| with: | ||
| bazelisk-cache: true | ||
|
|
||
| - name: Set up Android + Bazel build environment | ||
| uses: ./.github/actions/set-up-android-bazel-build-environment | ||
|
|
||
| - name: Generate changelog and open PR | ||
| env: | ||
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
| TARGET_VERSION: ${{ inputs.target_version }} | ||
| run: | | ||
| bazel run //scripts:generate_changelogs -- \ | ||
| "$(pwd)" \ | ||
| "${{ secrets.GCP_PROJECT_ID }}" \ | ||
| "$GCP_ACCESS_TOKEN" | ||
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
|
adhiamboperes marked this conversation as resolved.
|
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 |
|---|---|---|
| @@ -1 +1 @@ | ||
| Placeholder changelog for 0.18 pre-releases. | ||
| This release warns users on Android 5/5.1 of retiring support for their OS versions. It also adds full support for Android 16, and a variety of bugfixes. |
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 |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| This release warns users on Android 5/5.1 of retiring support for their OS versions. It also adds full support for Android 16, a variety of bugfixes and adds an alpha-specific worked examples feature to study guides. |
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.