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

Enforce PRs to be based against develop branch #3031

Merged
merged 3 commits into from
Feb 16, 2023

Conversation

rejas
Copy link
Collaborator

@rejas rejas commented Feb 7, 2023

"Inspired" by my mistake in #3028 this PR will add a worfklow check for the branch a PR is based against.

Open question is if this prevents @MichMich from preparing a release?

@khassel
Copy link
Collaborator

khassel commented Feb 7, 2023

Open question is if this prevents @MichMich from preparing a release?

looking into how he does releases, yes, he uses a PR.

May we could use something like "skipLabels" as provided in the changelog action - or look for a special string in the commit message (which would be not so safe)

@khassel
Copy link
Collaborator

khassel commented Feb 7, 2023

may we could use e.g. https://github.com/marketplace/actions/pr-labels to get the PR labels and not exit if a specific label exists.

We need this not only for releases but also for some edge cases as updating README (which is possible after next release without update notifications).

@rejas
Copy link
Collaborator Author

rejas commented Feb 7, 2023

may we could use e.g. https://github.com/marketplace/actions/pr-labels to get the PR labels and not exit if a specific label exists.

I assume we maintainers are the only ones who can add labels to issues @MichMich ? Then adding a label like you say (maybe "hotfix") would be enough I think to prevent future master merges and allow stuff to be merged for such cases

@sdetweil
Copy link
Collaborator

sdetweil commented Feb 7, 2023

I think there should never be a direct fix to master. always promote from some other branch.
pr to hotfix-x to master,
pr to develop to master

@rejas rejas force-pushed the misc/enforce_develop_branch branch from ea9d479 to 19a9404 Compare February 8, 2023 20:57
@codecov-commenter
Copy link

codecov-commenter commented Feb 8, 2023

Codecov Report

Merging #3031 (bafa394) into develop (e24dfa6) will increase coverage by 0.07%.
The diff coverage is n/a.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@             Coverage Diff             @@
##           develop    #3031      +/-   ##
===========================================
+ Coverage    22.87%   22.95%   +0.07%     
===========================================
  Files           52       52              
  Lines        11541    11541              
===========================================
+ Hits          2640     2649       +9     
+ Misses        8901     8892       -9     
Impacted Files Coverage Δ
modules/default/updatenotification/node_helper.js 90.27% <0.00%> (+12.50%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@rejas rejas force-pushed the misc/enforce_develop_branch branch 2 times, most recently from ca7a27e to 939f02c Compare February 8, 2023 21:08
@rejas rejas added the question label Feb 8, 2023
@rejas rejas force-pushed the misc/enforce_develop_branch branch 5 times, most recently from c8d70f7 to be820d8 Compare February 15, 2023 21:30
@rejas rejas removed the question label Feb 15, 2023
@rejas rejas force-pushed the misc/enforce_develop_branch branch from be820d8 to 0ef5088 Compare February 15, 2023 21:34
@rejas rejas added the question label Feb 15, 2023
@rejas rejas force-pushed the misc/enforce_develop_branch branch from 0ef5088 to 9f49a11 Compare February 15, 2023 21:49
@rejas rejas removed the question label Feb 15, 2023
@rejas rejas changed the base branch from develop to master February 15, 2023 21:51
@rejas rejas changed the base branch from master to develop February 15, 2023 22:00
@rejas rejas force-pushed the misc/enforce_develop_branch branch 3 times, most recently from a7f6aa0 to a8c2766 Compare February 15, 2023 22:12
@rejas rejas changed the base branch from develop to master February 15, 2023 22:14
@rejas rejas force-pushed the misc/enforce_develop_branch branch from a8c2766 to 9f49a11 Compare February 15, 2023 22:36
@rejas rejas changed the base branch from master to develop February 15, 2023 22:37
@rejas rejas marked this pull request as ready for review February 15, 2023 22:38
@rejas
Copy link
Collaborator Author

rejas commented Feb 15, 2023

So this PR is ready I think. It will complain if the PR is based upon master and does not have the new "mastermerge" label. Maintainers can test it on this PR, just add / remove the label and trigger the tests: #3036

Only thing that doesnt get caught is IF the PR is developed against Develop, but then submitted against Master (thats why this PR here wont fail if I change the base to master). Any ideas on how to fix that or is that a usecase we can ignore?

@khassel
Copy link
Collaborator

khassel commented Feb 15, 2023

Any ideas on how to fix that or is that a usecase we can ignore?

I think we can ignore it. If someone has an idea for a fix we can add it later ...

@rejas rejas force-pushed the misc/enforce_develop_branch branch from bafa394 to 9f49a11 Compare February 16, 2023 08:51
@khassel khassel merged commit 88c7e42 into MagicMirrorOrg:develop Feb 16, 2023
@rejas rejas deleted the misc/enforce_develop_branch branch February 16, 2023 18:43
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.

4 participants