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

refactor(release): align plugins release number to branch name in testing context #5392

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

mushroomempires
Copy link
Contributor

Description

align the plugin release number to the branch name in the context of a release (hotfix- or testing-). let it unchanged for any other context (unstable/canary)

Fixes # MON-156626

Type of change

  • Patch fixing an issue (non-breaking change)
  • New functionality (non-breaking change)
  • Functionality enhancement or optimization (non-breaking change)
  • Breaking change (patch or feature) that might cause side effects breaking part of the Software

How this pull request can be tested ?

Please describe the procedure to verify that the goal of the PR is matched.
Provide clear instructions so that it can be correctly tested.
Mention the automated tests included in this FOR (what they test like mode/option combinations).

Checklist

  • I have followed the coding style guidelines provided by Centreon
  • I have commented my code, especially hard-to-understand areas of the PR.
  • I have rebased my development branch on the base branch (develop).
  • In case of a new plugin, I have created the new packaging directory accordingly.
  • I have implemented automated tests related to my commits.
    • Data used for automated tests are anonymized.
  • I have reviewed all the help messages in all the .pm files I have modified.
    • All sentences begin with a capital letter.
    • All sentences end with a period.
    • I am able to understand all the help messages, if not, exchange with the PO or TW to rewrite them.
  • After having created the PR, I will make sure that all the tests provided in this PR have run and passed.

@mushroomempires mushroomempires marked this pull request as ready for review January 14, 2025 17:03
@mushroomempires mushroomempires requested a review from a team as a code owner January 14, 2025 17:03
throw new Error('invalid release name');
}
} else {
release = new Date().toLocaleTimeString('en-US', { hour12: false }).replaceAll(":","")
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
release = new Date().toLocaleTimeString('en-US', { hour12: false }).replaceAll(":","")
const currentDate = new Date();
release = `${currentDate.getFullYear()}${("0" + (currentDate.getMonth() + 1)).slice(-2)}00`;

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.

2 participants