Skip to content

chore: follow up fix to verify_library_generation#2721

Merged
alicejli merged 23 commits intomainfrom
fixScript
May 3, 2024
Merged

chore: follow up fix to verify_library_generation#2721
alicejli merged 23 commits intomainfrom
fixScript

Conversation

@alicejli
Copy link
Contributor

@alicejli alicejli commented May 2, 2024

#2716 didn't quite fix what it should have. Follow up to fix the error:

Previous HEAD position was e54601fce Merge 30c7c5b4f9825c14458d6ef31e0b3e3fccbb4207 into 5d4567f883b1e29cd5f299d392c5a809b451aa18
Switched to a new branch 'main'
branch 'main' set up to track 'origin/main'.
+ git fetch --no-tags --prune origin +main:refs/remotes/origin/main
From https://github.com/googleapis/sdk-platform-java
 - [deleted]             (none)     -> origin/main
+ git checkout renovate/markupsafe-2.x
error: pathspec 'renovate/markupsafe-2.x' did not match any file(s) known to git

@alicejli alicejli requested a review from a team May 2, 2024 17:37
@product-auto-label product-auto-label bot added the size: s Pull request size is small. label May 2, 2024
Co-authored-by: Joe Wang <106995533+JoeWang1127@users.noreply.github.com>
@@ -1,6 +1,11 @@
on:
push:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you merge main branch, I think this line should not change.

echo "head_ref=${{ github.event.pull_request.head.ref }}"
echo "Head repo URL: ${{ github.event.pull_request.head.repo.html_url }}
# PRs that come from a fork need to be handled differently
if [[ ${{ github.event.pull_request.head.repo.full_name }} == ${{ github.repository }} ]]; then
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what the difference between github.event.pull_request.head.repo.full_name and github.repository if it's a forked repo? Does the former have a different organization?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

github.repository will always be googleapis/sdk-platform-java since that's where this workflow is running from. github.event.pull_request.head.repo.fullname will have a different organization and potentially different repo name (for instance, for renovate bot, the value is: renovate-bot/gapic-generator-java)

@JoeWang1127
Copy link
Contributor

Could you move github related variable to env? I think this will make the script concise.

@alicejli
Copy link
Contributor Author

alicejli commented May 2, 2024

Confirmed this workflow file: https://github.com/googleapis/sdk-platform-java/actions/runs/8931135864/workflow?pr=2657

worked with #2657.

Have updated this script to use that workflow file (along with some refactoring to use the env var)

Copy link
Contributor

@JoeWang1127 JoeWang1127 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fix.

@sonarqubecloud
Copy link

sonarqubecloud bot commented May 2, 2024

Quality Gate Passed Quality Gate passed for 'gapic-generator-java-root'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@sonarqubecloud
Copy link

sonarqubecloud bot commented May 2, 2024

Quality Gate Passed Quality Gate passed for 'java_showcase_integration_tests'

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

@alicejli alicejli merged commit 2e360ef into main May 3, 2024
@alicejli alicejli deleted the fixScript branch May 3, 2024 13:59
lqiu96 pushed a commit that referenced this pull request May 22, 2024
#2716 didn't quite
fix what it should have. Follow up to fix the error:

```
Previous HEAD position was e54601f Merge 30c7c5b into 5d4567f
Switched to a new branch 'main'
branch 'main' set up to track 'origin/main'.
+ git fetch --no-tags --prune origin +main:refs/remotes/origin/main
From https://github.com/googleapis/sdk-platform-java
 - [deleted]             (none)     -> origin/main
+ git checkout renovate/markupsafe-2.x
error: pathspec 'renovate/markupsafe-2.x' did not match any file(s) known to git
```

---------

Co-authored-by: Joe Wang <106995533+JoeWang1127@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size: s Pull request size is small.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants