Skip to content

add mergify to automate our workflow #12255

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

Merged
merged 3 commits into from
Jan 16, 2020
Merged

Conversation

0xc0170
Copy link
Contributor

@0xc0170 0xc0170 commented Jan 14, 2020

Summary of changes

The configuration should follow our workflow.

What does mergify do? It acts on the conditions and can do actions. For instance if PR is reviewed, it can add new label, remove review and move to the next stage, and so on. The configuration is in the root, in yml file. It is easy to read and configure.

I documented as much as I could in the configuration to keep ti clear what state the condition is applied to and what a new state will be.

This goes to master as noted below (due to limitation of using the default branch).

Impact of changes

Migration actions required

Documentation


Pull request type

[X] Patch update (Bug fix / Target update / Docs update / Test update / Refactor)
[] Feature update (New feature / Functionality change / New API)
[] Major update (Breaking change E.g. Return code change / API behaviour change)

Test results

[X] No Tests required for this change (E.g docs only update)
[] Covered by existing mbed-os tests (Greentea or Unittest)
[] Tests / results supplied as part of this PR

Reviewers


@0xc0170 0xc0170 changed the base branch from feature-mergify to master January 14, 2020 12:50
@0xc0170
Copy link
Contributor Author

0xc0170 commented Jan 14, 2020

Another test: Changing base to master, lets see if the app find this PR (it uses default branch).

This config should always follow our worklof and other way around. They should both be in sync.

What can mergify do? Check PR status (labels, reviewers) and act on it. First step would be to not merge anything, just use labels and help us to keep PRs up to date. Less manual work.

If this works, we can get CI to check specific labels to trigger CI (or use commands) and other things, this needs more work.
This will be reverted once mergify works with the PR workflow.
One rule for each condition - base is feature-mergify.
@0xc0170
Copy link
Contributor Author

0xc0170 commented Jan 14, 2020

One drawback, default branch is used for configuration. Thus we won't be able to test this on a feature branch without touching the master.

I added a rule to each condition there - base ~= feature-mergify to make sure mergify is active only on PRs for feature-mergify. We shall test this via PRs to feature-mergify. And revert e4cd938 once it is correct and tested.

Waiting on 6.0.0-alpha1 to complete and then we can test this one.

@0xc0170 0xc0170 changed the title feature branch: add mergify to automate our workflow add mergify to automate our workflow Jan 14, 2020
@0xc0170 0xc0170 requested a review from a team January 14, 2020 13:53
remove:
- "needs: review"
comment:
message: This PR cannot be merged due to conflicts. Please rebase to resolve them.
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we also get a conflict when in the 'needs: ci' state ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see, we should remove as well needs: CI, will fix

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

- do not merge

# Check if version label is applied
- name: release version is a must for merged PRs
Copy link
Contributor

Choose a reason for hiding this comment

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

This will require much more thought in the new release scheme. It is envisaged going forward that prior to actual release another bot will add one of these labels depending on what pr type is specified by the author:
'release-version: patch'
'release-version: minor'
'release-version: major'
Then when we are ready to make the release, the release script will determine the actual semantic version of the release based on the content ....

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I can remove it now or once the release bot is running. This would catch errors, should not cause conflict with the release bot.

@ciarmcom ciarmcom requested a review from a team January 14, 2020 16:00
@ciarmcom
Copy link
Member

@0xc0170, thank you for your changes.
@ARMmbed/mbed-os-maintainers please review.

@0xc0170
Copy link
Contributor Author

0xc0170 commented Jan 16, 2020

Merging this to start testing it on feature-mergify branch today.

CI passed, also mergify confirmed the config is valid.

@0xc0170 0xc0170 merged commit ba27e6c into ARMmbed:master Jan 16, 2020
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.

3 participants