-
Notifications
You must be signed in to change notification settings - Fork 9
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
Add support to report issue to ROS gz_*_vendor repositories in release.py #1150
Closed
Closed
Changes from 6 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
ced8c08
WIP: methods to run gh create issue
j-rivero b68bd35
Fully working version
j-rivero db11527
Missing helper file
j-rivero 67f4a2b
Improve the error reporting on gh
j-rivero 3236d73
Implement a basic testing
j-rivero 8ed2830
Cleanup
j-rivero fda1471
Merge branch 'master' into jrivero/vendor_gh_issue
j-rivero 0087404
WIP: create PR for vendor_repositories
j-rivero 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 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
35 changes: 35 additions & 0 deletions
35
jenkins-scripts/dsl/tools/get_collections_from_package_and_version.py
This file contains 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,35 @@ | ||
#!/usr/bin/python3 | ||
|
||
import sys | ||
import yaml | ||
|
||
|
||
# Function to find the collection name based on lib name and major version | ||
def find_collection(data, lib_name, major_version): | ||
instances = [] | ||
|
||
for collection in data['collections']: | ||
for lib in collection['libs']: | ||
if lib['name'] == lib_name and lib['major_version'] == major_version: | ||
instances.append(collection['name']) | ||
return instances | ||
|
||
|
||
def get_major_version(version): | ||
elements = version.split('.') | ||
return int(elements[0]) | ||
|
||
|
||
if len(sys.argv) < 3: | ||
print(f"Usage: {sys.argv[0]} <lib_name> <major_version> <collection-yaml-file>") | ||
sys.exit(1) | ||
|
||
lib_name = sys.argv[1] | ||
version = sys.argv[2] | ||
yaml_file = sys.argv[3] | ||
|
||
with open(yaml_file, 'r') as file: | ||
data = yaml.safe_load(file) | ||
|
||
collection_names = find_collection(data, lib_name, get_major_version(version)) | ||
print(f"{' '.join(collection_names)}") |
This file contains 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.
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.
Is it possible to create a pull request instead? All we have to do is run https://github.com/gazebo-tooling/gz_vendor/blob/main/create_gz_vendor_pkg/create_vendor_package.py and give it the up-to-date package.xml from the upstream Gazebo library.