How to make a PR to stable branch?

I cloned the packages git repo, made a new branch, made a commit to it and pushed it to my github clone. The next time I open Github (the web site), there's a banner that offers to open a pull request from my new branch to openwrt master/main branch. After that PR was created and merged into master:

  • How do I open a PR to a stable branch?
  • How do I include previous commits (independent, not squashed) that weren't included yet in the stable branch?
  • How do I find all those commits that are missing from the stable branch?

Thanks.

You can diff 2 nranches.
Obviously if you forked them.
Then select to make pr to other than default branch above pull request

git checkout -b your-descriptive-new-branch-name openwrt-24.10
apply your changes, preferably using git cherry-pick -x commit_id
git checkout main
git push -a
open PR

(EDIT: the markup swallowed the branch name, so remove the angled brackets)

2 Likes

I recommend to first checout the stable branch, e.g. openwrt-24-10, and then create a new branch for your PR there:

git checkout openwrt-24.10
git checkout -b yourPRbranch
apply your changes, preferably using git cherry-pick -x <commit_id>
git push
open PR

That is easier if there are later edits to the PR.

git log is your friend. Checkout the main branch, and look for commit history of the package

e.g. git log --oneline -n 5 utils/collectd

perus@ub2504:/OpenWrt/aarch64/feeds/packages$ git log --oneline -n 5 utils/collectd/
dbfb023f9 collectd: fix compilation with GCC14
8c7e0d56f collectd: enable write_prometheus plugin
4c4a7bd31 treewide: use config_get_bool instead of config_get enabled
12856c56f collectd: enable statsd plugin
2214eedb6 collectd: add license informations
1 Like

FYI there is https://openwrt.org/submitting-patches#patch_backports, feel free to improve

1 Like

A far as I know you make all PR's to the main branch and if those are reviewed and committed you backport those.

A backported commit is for the maintainers much easier to add as it already has been reviewed and committed to the main branch