-
Notifications
You must be signed in to change notification settings - Fork 10
Add script for creating milestones on all Gazebo libraries #1361
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
Open
azeey
wants to merge
1
commit into
gazebo-tooling:master
Choose a base branch
from
azeey:create_milestones
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# README | ||
|
||
This directory contains tools and data to create milestones on all Gazebo | ||
libraries as it is not currently possible to share a milestone between different | ||
Github repositories. Instead, we create a milestone with the same name on all | ||
the repos and use queries like | ||
[`milestone:"Jetty Release"`](https://github.com/search?q=org%3Agazebosim+milestone%3A%22Jetty+Release%22&type=pullrequests) | ||
to filter pull request/issues. This is typically done during preparation for the | ||
release of a collection (e.g. Gazebo Jetty). | ||
|
||
Usage: | ||
|
||
1. Install and configure the Github CLI tool [`gh`](https://cli.github.com/). | ||
Ensure you have write permission on all the Gazebo library repos. | ||
|
||
1. Create a `json` file with the following format replacing `<collection>` and | ||
`<due date>`. | ||
|
||
```json | ||
{ | ||
"title": "<collection> Release", | ||
"state": "open", | ||
"description": "Track pull requests that are meant to go into the release. Note that this also includes pull requests that get merged into older branches and get forward merged.", | ||
"due_on": "<due date>" | ||
} | ||
``` | ||
|
||
1. Run `create_milestones.bash` with the file created above as an argument. |
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,74 @@ | ||
#!/usr/bin/env bash | ||
# Copyright (C) 2025 Open Source Robotics Foundation | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
# This script creates milestones in each Gazebo library and ros_gz. You'll | ||
# need the `gh` Github CLI tool installed and configured properly with an | ||
# account that has write permissions on all the repos specified below. | ||
# | ||
# Usage: | ||
# ./create_milestones.bash milestone_description.json | ||
# | ||
# where milestone_description.json is json file that contains the title, | ||
# description and due date of the milestone | ||
# Example: | ||
# | ||
# { | ||
# "title": "Jetty Release" | ||
# "state": "open", | ||
# "description": "Track pull requests that are meant to go into the release. Note that this also includes pull requests that get merged into older branches and get forward merged." | ||
# "due_on": "2025-09-29T23:59:59Z" | ||
# } | ||
# | ||
# | ||
if [[ $# -lt 1 ]]; then | ||
echo "./create_milestones.bash FILE.json" | ||
exit 1 | ||
fi | ||
|
||
if [[ ! -f $1 ]]; then | ||
echo "File \"$1\" does not exist" | ||
exit 1 | ||
fi | ||
|
||
repos=" | ||
gz-cmake | ||
gz-common | ||
gz-fuel-tools | ||
gz-gui | ||
gz-launch | ||
gz-math | ||
gz-msgs | ||
gz-physics | ||
gz-plugin | ||
gz-rendering | ||
gz-sensors | ||
gz-sim | ||
gz-tools | ||
gz-transport | ||
gz-utils | ||
sdformat | ||
ros_gz | ||
" | ||
|
||
for repo in $repos; do | ||
echo "Creating milestone on gazebosim/$repo" | ||
result=$(cat $1 | gh api --jq ".html_url" --method POST repos/gazebosim/$repo/milestones --input - 2>&1) | ||
retval=$? | ||
echo " url: $result" | ||
if [[ retval -ne 0 ]]; then | ||
exit 1 | ||
fi | ||
done |
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,6 @@ | ||
{ | ||
"title": "Jetty Release", | ||
"state": "open", | ||
"description": "Track pull requests that are meant to go into the release. Note that this also includes pull requests that get merged into older branches and get forward merged.", | ||
"due_on": "2025-09-29T23:59:59Z" | ||
} |
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.
The 68-73 lines are a bit over-complex to my eyes probably with some bugs like the use of retval instead of $retval in line 71. Can not try this easily but I would write something like: