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

chore(CI): automatically create and assign Milestones #4400

Merged
merged 3 commits into from
Jun 24, 2024

Conversation

marstamm
Copy link
Member

@marstamm marstamm commented Jun 24, 2024

Proposed Changes

This PR introduces 2 new actions. I tested these in a private repo to verify they work

ASSIGN_MILESTONE.yml

  • Runs for every closed Issue/PR
  • Gets the Milestone starting with "M"
  • Assigns the PR/issue to the Milestone, if it does not have one assigned manually

RELEASE_ISSUE.yml > createMilestone

  • Closes Milestone attached to Release issue
  • Creates a new milestone with increased version number (Schema M<number>)
  • Assigns new milestone to created release issue

closes #4311

Checklist

To ensure you provided everything we need to look at your PR:

  • Brief textual description of the changes present
  • Visual demo attached
  • Steps to try out present, i.e. using the @bpmn-io/sr tool
  • Related issue linked via Closes {LINK_TO_ISSUE} or Related to {LINK_TO_ISSUE}

@marstamm marstamm requested a review from a team June 24, 2024 09:59
@marstamm marstamm self-assigned this Jun 24, 2024
@marstamm marstamm requested review from philippfromme and barmac and removed request for a team June 24, 2024 09:59
@bpmn-io-tasks bpmn-io-tasks bot added the needs review Review pending label Jun 24, 2024
@@ -19,6 +19,50 @@ jobs:
template-path: 'docs/.project/RELEASE_TEMPLATE.md'
package-path: 'app/package.json'

createMilestone:
needs: createReleaseIssue
if: github.event.issue.milestone
Copy link
Collaborator

Choose a reason for hiding this comment

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

Shouldn't this be enclosed in ${{ }}?

Copy link
Member Author

@marstamm marstamm Jun 24, 2024

Choose a reason for hiding this comment

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

For if clauses, using the expression syntax is optional (cf. https://docs.github.com/en/actions/learn-github-actions/expressions).
We can use the syntax for consistency. I think it looks cleaner without it, especially for multi-line conditions

Copy link
Collaborator

@barmac barmac left a comment

Choose a reason for hiding this comment

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

Let's try this out!

@marstamm
Copy link
Member Author

🤞

@marstamm marstamm merged commit 086d46b into develop Jun 24, 2024
12 checks passed
@marstamm marstamm deleted the automate-milestones branch June 24, 2024 13:39
@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Jun 24, 2024
@github-actions github-actions bot added this to the M78 milestone Jun 24, 2024
@barmac
Copy link
Collaborator

barmac commented Jun 25, 2024

We are now in the code freeze, and the release will happen only next week. Will the script assign the current milestone to the issues closed in the meantime? I assume so, but we'd rather not assign the current milestone to the issues that will be released only with the next release.

@marstamm
Copy link
Member Author

The new Milestone will only be created when the Release issue is closed. I am fine with changing the procedure to close the issue once main tasks are done and only the release presentation is still to be done.

I would assume not many issues will be closed in that time (in the modeler)

@nikku
Copy link
Member

nikku commented Jun 26, 2024

So eager to try this in practice 🏃

@nikku
Copy link
Member

nikku commented Jun 26, 2024

#4400 (comment)

Do we/did we address this? We'll otherwise risk a bunch of false positives, working on issues for the next iteration. What we could do instead of reacting on close is to react on a checkbox being checked in the release list, opening a new milestone already while the old one is still open.

* [ ] Merge `dev` to `main`

⬆️ Once checked, already create a new milestone (because DEV is essentially unfrozen at this point).

@marstamm
Copy link
Member Author

react on a checkbox being checked in the release list

That feels rather hacky and could break due to many things, like renaming of branches, manual changes to the template, etc. I also feel like Checking of something in the list having side-effects is unexpected magic.

Alternatively, I would rather keep milestone closing a manual step and only automate creating + assigning the new milestones.

@nikku
Copy link
Member

nikku commented Jun 26, 2024

So then let's close the milestone eagerly, manually, once all (main) release activities concluded? That would work for me as well. I just want to prevent that issues are moved unnoticed into a wrong milestone.

@marstamm
Copy link
Member Author

I'll create a follow-up PR

@barmac
Copy link
Collaborator

barmac commented Jun 26, 2024

Regarding magic of checkbox, this is already how it works with renovate rebase, e.g. #4387

@marstamm
Copy link
Member Author

For renovate, it is clear what the expectation is, and is it the only interactable element in the issue body. The checkbox also feels like a workaround and is used instead of a button.

For the release issue, we have 10s of checkboxes that do nothing, IMO it feels weird that one should be magic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Automatically assign current iteration milestone when closing an issue
3 participants