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

Add a workflow which automatically adds backport tags based upon changelogs #2454

Merged
merged 2 commits into from
Jan 14, 2025

Conversation

tremble
Copy link
Contributor

@tremble tremble commented Jan 11, 2025

SUMMARY

As has been recently noticed, we're being inconsistent with backporting things.

Based on the keys from the changelog fragments this action would perform the following actions:

  • On "push" or applying the mergeit label
    • If a PR contains non-backportable changes (major_changes, breaking_changes, removed_features) the do_not_backport label will be applied. These change types are assumed to require a "major" release, and as such shouldn't be backported into a currently "stable" release. At the same time it will remove any previously applied backport-* labels.
  • When the "mergeit" label is applied:
    • If a PR contains changes that only need a minor release (minor_changes, deprecated_features) the backport-9 label will be applied.
    • If a PR contains changes that only need a patch release, such as security/bug fixes (bugfixes, security_fixes), then backport-8 and backport-9 labels will both be applied.
ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

.github/workflows

ADDITIONAL INFORMATION

tremble/amazon.aws currently has this workflow applied to it, if you want to test it out. (tremble#11 is the PR I've been testing with, but feel free to open your own PR and play with the labels against my fork.

Copy link
Contributor

@tremble tremble added the do_not_backport This PR should not be backported to stable- branches unless absolutely necessary label Jan 11, 2025
@abikouo
Copy link
Contributor

abikouo commented Jan 13, 2025

I did something similar here anyway I will close mine.
Could you please move the workflow into ansible-network/github_actions repository so we can use it in multiple repositories?

@tremble
Copy link
Contributor Author

tremble commented Jan 13, 2025

I did something similar here anyway I will close mine. Could you please move the workflow into ansible-network/github_actions repository so we can use it in multiple repositories?

Sure, if you've got any comments on the "how" behind this PR I'd appreciate a cursory review here.

Copy link
Collaborator

@alinabuzachis alinabuzachis left a comment

Choose a reason for hiding this comment

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

Can you please update the release process guideline by adding the action to update this file?

@tremble
Copy link
Contributor Author

tremble commented Jan 13, 2025

Can you please update the release process guideline by adding the action to update this file?

Yup, will do. @abikouo would like the action moved over into the shared repo. Which I'll do first and should also simplify this file down.

.github/workflows/backports.yml Outdated Show resolved Hide resolved
.github/workflows/backports.yml Outdated Show resolved Hide resolved
Copy link

github-actions bot commented Jan 14, 2025

Docs Build 📝

Thank you for contribution!✨

This PR has been merged and your docs changes will be incorporated when they are next published.

Copy link
Contributor

@tremble tremble added mergeit Merge the PR (SoftwareFactory) skip-changelog labels Jan 14, 2025
Copy link
Contributor

Build succeeded (gate pipeline).
https://ansible.softwarefactory-project.io/zuul/buildset/77bd25be2815427b88ac491902331d57

✔️ ansible-galaxy-importer SUCCESS in 3m 26s
✔️ build-ansible-collection SUCCESS in 10m 09s

Copy link
Contributor

Pull request merge failed: Resource not accessible by integration, You may need to manually rebase your PR and retry.

@tremble tremble merged commit 429cff0 into ansible-collections:main Jan 14, 2025
50 of 52 checks passed
alinabuzachis pushed a commit to alinabuzachis/amazon.aws that referenced this pull request Jan 15, 2025
…gelogs (ansible-collections#2454)

##### SUMMARY

As has been recently noticed, we're being inconsistent with backporting things.

Based on the keys from the changelog fragments this action would perform the following actions:

- On "push" or applying the `mergeit` label
  -  If a PR contains **non-backportable** changes (`major_changes`, `breaking_changes`, `removed_features`) the `do_not_backport` label will be applied.  These change types are assumed to require a "major" release, and as such shouldn't be backported into a currently "stable" release.  At the same time it will remove any previously applied `backport-*` labels.
- When the "mergeit" label is applied:
  - If a PR contains changes that only need a **minor release** (minor_changes, deprecated_features) the `backport-9` label will be applied.
  - If a PR contains changes that only need a **patch release**, such as security/bug fixes (bugfixes, security_fixes), then `backport-8` and `backport-9` labels will both be applied.

##### ISSUE TYPE

- Feature Pull Request

##### COMPONENT NAME

.github/workflows

##### ADDITIONAL INFORMATION
alinabuzachis pushed a commit to alinabuzachis/amazon.aws that referenced this pull request Jan 15, 2025
…gelogs (ansible-collections#2454)

##### SUMMARY

As has been recently noticed, we're being inconsistent with backporting things.

Based on the keys from the changelog fragments this action would perform the following actions:

- On "push" or applying the `mergeit` label
  -  If a PR contains **non-backportable** changes (`major_changes`, `breaking_changes`, `removed_features`) the `do_not_backport` label will be applied.  These change types are assumed to require a "major" release, and as such shouldn't be backported into a currently "stable" release.  At the same time it will remove any previously applied `backport-*` labels.
- When the "mergeit" label is applied:
  - If a PR contains changes that only need a **minor release** (minor_changes, deprecated_features) the `backport-9` label will be applied.
  - If a PR contains changes that only need a **patch release**, such as security/bug fixes (bugfixes, security_fixes), then `backport-8` and `backport-9` labels will both be applied.

##### ISSUE TYPE

- Feature Pull Request

##### COMPONENT NAME

.github/workflows

##### ADDITIONAL INFORMATION
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
do_not_backport This PR should not be backported to stable- branches unless absolutely necessary mergeit Merge the PR (SoftwareFactory) skip-changelog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants