Skip to content
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

Release: Close related milestone #9

Open
danirabbit opened this issue Oct 31, 2019 · 3 comments
Open

Release: Close related milestone #9

danirabbit opened this issue Oct 31, 2019 · 3 comments
Labels
Priority: Wishlist Not a priority, but something that might be nice

Comments

@danirabbit
Copy link
Member

It would be super convenient if we could also close the related milestone (if it exists).

For example, we release "1.0.0", then we close the milestone named "1.0.0"

@danirabbit danirabbit added the Priority: Wishlist Not a priority, but something that might be nice label Oct 31, 2019
@cassidyjames
Copy link
Contributor

@danrabbit what happens to open issues/PRs on the associated milestone when it's closed?

@danirabbit
Copy link
Member Author

If you mean "what currently happens": they stay open and assigned to that milestone

If you mean "what ideally happens": they should be assigned to a new milestone or at least removed from that milestone

@dawidd6
Copy link

dawidd6 commented Nov 6, 2019

I guess it could be done like this:

  1. Read JSON object file from $GITHUB_EVENT_PATH and get milestone.number (check if it exists first)
  2. curl --method PATCH --data "$DATA" https://api.github.com/repos/$GITHUB_REPOSITORY/milestones/$MILESTONE_NUMBER?access_token=$GITHUB_TOKEN with $DATA:
DATA="
{
  \"title\": \"$VERSION\",
  \"state\": \"closed\"
}
"

Note, that this is untested.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Wishlist Not a priority, but something that might be nice
Projects
None yet
Development

No branches or pull requests

3 participants