-
Notifications
You must be signed in to change notification settings - Fork 36
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
delete-old-branches: Protect main and master branch #15
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pkossyfas
requested review from
hwoarang,
siavashs and
teorizop
as code owners
February 2, 2022 18:13
pkossyfas
force-pushed
the
protect-default-branch
branch
from
February 7, 2022 20:10
1fbddc8
to
33be627
Compare
pkossyfas
force-pushed
the
protect-default-branch
branch
from
February 7, 2022 20:16
33be627
to
f375803
Compare
Add main and master branches as default branches so as to be excluded from deletion. Also, add an option for user to override the default behavior.
pkossyfas
force-pushed
the
protect-default-branch
branch
from
February 8, 2022 10:42
f375803
to
ee268fd
Compare
Dragotic
approved these changes
Feb 8, 2022
colbynh
pushed a commit
to recurforever/delete-old-branches-action
that referenced
this pull request
Feb 10, 2022
commit d0b9bd7 Merge: e0b037f 90c0d60 Author: colbynh <colby@recurforever.com> Date: Thu Feb 10 15:21:16 2022 -0500 Merge branch 'add-exclude-open-prs' of github.com:recurforever/delete-old-branches-action into add-exclude-open-prs commit e0b037f Author: Siavash Safi <siavash.safi@gmail.com> Date: Fri Feb 4 11:14:49 2022 +0100 parent 5ca4d86 author Siavash Safi <siavash.safi@gmail.com> 1643969689 +0100 committer colbynh <colby@recurforever.com> 1644524340 -0500 gpgsig -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEUZBe8tgy7Ask2IhkIqPSM0dKGa8FAmIFczUACgkQIqPSM0dK Ga9Ltw/+NagoL6pRjUq2J/H/1YnsIEUzm8Hs7m7t4cMhOi8EoeRqhJ7i8xf5Cx4m Bdj4+5E7/x6oPXp+tZlZI0jp5Q6ZKlAcYxK4t41QpIe9sEiTy/3OFvY+22GQHjzL Ec9Agvj8psmlmGrCJdLNzdMD83+s+NJiPAyt3djZkQHKtIn4ssRDZKrS2aXJtDtz SlkdeeG4buaQv+/eV0gEIihKnsV/lqL7BedF7TcxFsxG6TcLMKrVYQ1f7qYGQu+U rDuyoc86IZR+ikrSVGFsNYZrbyFnwyGR7fTw8T3UqvUzmMgfA6Ba9vmxsB8JTRw3 oFXT3QK7dcPYS8wdYDtLd0ooIJO4sj8gJ9gPt/2UEU02ESFQ5Kr/fLKfJ2m2rlyl K4x+1eTSg4IADZ9woR3OJK1RHupxLJUEEwShn29dv8DWCp0LrG64FnPbmnb64rAT /AUTzbdwpVvs6UdlwDRIDWIa9vZqTn3pq9bN9QXAo3j585birKybNpPDnlvzFXls 0hhenZ04gt2V+qoRAAqEPg7wKFki89evmMjjsBG2Nzsw4HvS49Hou4pkiifCTlQC B0uUTE19a+sGjvA72gCozQO8EgOy34e36JBgSsfxd4ClrGX329cfJxfbezOwDAcp po0UfnQqGAJsjKcIS1K6P3Hw6DyroX0ZbT9oBnMjleBcoMh0xkE= =3gCj -----END PGP SIGNATURE----- parent 5ca4d86 author Siavash Safi <siavash.safi@gmail.com> 1643969689 +0100 committer colbynh <colby@recurforever.com> 1644524337 -0500 gpgsig -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEUZBe8tgy7Ask2IhkIqPSM0dKGa8FAmIFczEACgkQIqPSM0dK Ga/QPQ//UIL+chY1ZJ8Pj4eSionib0n8Cx6lR81jH9No5ldilFxJQyWYFamPSnQc KU3YRyxPUIoq5vNp7+HgaNhLTRMfkjtEBrpu5M+0FVjQnCFaYjR0YW4zX3u/F4ct d9mzrzWjIWPZuFgQu/VAcB1NwEgB0l8nfVKJkSNAbuei8rddu4LFGp/fupWpW8tQ JIdigISNf2XrpOXZwfR09FVPAhU6+73VWlu0nqfuF69MA62BvxLaJKMaGAKzTKhv V4OzC0gq30bQi176nsUlgiJnhK9JDO9G/54/pbytWsOE/ZoZlW9rgZo8DzFnwJ7Y ZWLLDtor8KSx1Q844VtmrBuIESnWPCQwYxeNiumJpYDTe/ErSqG0bNxJep+GNF7y XxT77diZNWqI9cCgwj0EauAfbj7ssfYZyy/o35lAWQXlTy88E2SW2LEqjEv+PGrA xUcYbXunr/FeXaZsWzdVh0//hn3qKr6x//OVKMd+8sYv4yfweVVZGCKNlqAfNfi9 bquDtVhY8UOMb2jYwvW9zXaGBg7JNA2z9zyicRRdq7ssehrSjvFTZlP2U+bRC5Hz 46bGTMqeJNuikXD3N5vhSFBG2wPlMoDm9KFXkrP9DhRg0KBBQMPBYYvspsEtKoxY 3YMEibCaC/JGBjpPu4fgwfNQxJBxOhewY5aIL5VMan9kDsQGRlk= =8dYu -----END PGP SIGNATURE----- parent 5ca4d86 author Siavash Safi <siavash.safi@gmail.com> 1643969689 +0100 committer colbynh <colby@recurforever.com> 1644524332 -0500 gpgsig -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEUZBe8tgy7Ask2IhkIqPSM0dKGa8FAmIFcy0ACgkQIqPSM0dK Ga+PChAAq3IhiKxPmxgY6i7ilvv25W0hndHI7pvCBXo8ckmxboDs0o85QEyRL0vm bNxHxVHeIC2qN6dOG5n4g6N4uxRCjRDpN1nu/FgYuHZ46EkNaPBe5B6GTW7i8nFV KVnj18mMNzfRrB3mVKxr4Af8S5GLVZ5qlxPATkZ9DJRIsrJxcT/IkCOXqXYNl1kY 2dlYR3NLKmCCKJSfLP88SiYxY3jIGOE1nkTuP3w+hZrNBkqPnRCbbFOoQmYnovDe JJRAzXtIwZL9qgIN7E0v9O8TLM5UI9FFk0gvNvTS2AWk4I4ZjSR/I2QQQhpBP9Ce EgBpE8oW/0Qll0jSKVDCseYycTVL9g+56N7jR52mT14Ju6uRqkrrQmtuPjPATp7O i6HG7ws/QTNPr74ophVxfIsZy4N4XPPU9KTyag9cxOlJCZEpioEctJ0W3fVQfp3N oLJWyjiDGmrRCaanW8UatTBTAv//imLOmEOGkDotg39MAdO2mch+ATGVdWaPNEqc rXh6rkGBui0xSOtT1h3IjpVBy/vKBCyEZZdO+q9lBn1iVPvTMr53pKDxtCoBznzl 35k1WWKY1W4mL7urhxM0pOqZq5ubY0kHRc5g9SP2CKAq3rtg8P+DFBvS8ab6Y/eC dPvftwTBb6YHR6uWF2CbklHhxhDBDTpXzI4lo0h6g9hXQVB17dQ= =YC59 -----END PGP SIGNATURE----- Update CODEOWNERS Use github api to get source branches Debug pr output debug . Fix api url Trim quotes on branch names Update for consistency Co-authored-by: Polykarpos Kossyfas <44210251+pkossyfas@users.noreply.github.com> Fix variable Co-authored-by: Polykarpos Kossyfas <44210251+pkossyfas@users.noreply.github.com> Update readme with exlude pr branches Update readme Update for consistency Co-authored-by: Polykarpos Kossyfas <44210251+pkossyfas@users.noreply.github.com> Fix variable Co-authored-by: Polykarpos Kossyfas <44210251+pkossyfas@users.noreply.github.com> commit 90c0d60 Merge: e3a2c01 0704ae2 Author: colbynh <colby@recurforever.com> Date: Thu Feb 10 15:12:02 2022 -0500 Merge branch 'add-exclude-open-prs' of github.com:recurforever/delete-old-branches-action into add-exclude-open-prs commit e3a2c01 Author: colbynh <colby@recurforever.com> Date: Thu Feb 10 15:11:44 2022 -0500 Add exclude pr commit 0704ae2 Merge: 173fad9 c94dd47 Author: colbynh <colby@recurforever.com> Date: Thu Feb 10 15:06:42 2022 -0500 Merge branch 'add-exclude-open-prs' of github.com:recurforever/delete-old-branches-action into add-exclude-open-prs commit 173fad9 Author: Colby Chenard <guitaristcolby@gmail.com> Date: Thu Feb 10 14:48:32 2022 -0500 Fix variable Co-authored-by: Polykarpos Kossyfas <44210251+pkossyfas@users.noreply.github.com> commit 2153840 Author: Colby Chenard <guitaristcolby@gmail.com> Date: Thu Feb 10 14:48:21 2022 -0500 Update for consistency Co-authored-by: Polykarpos Kossyfas <44210251+pkossyfas@users.noreply.github.com> commit c876f88 Author: colbynh <colby@recurforever.com> Date: Wed Jan 26 15:37:16 2022 -0500 Update readme commit c86b44a Author: colbynh <colby@recurforever.com> Date: Wed Jan 26 15:33:05 2022 -0500 Trim quotes on branch names commit 0251ed9 Author: colbynh <colby@recurforever.com> Date: Wed Jan 26 13:18:59 2022 -0500 Fix api url commit dc20feb Author: colbynh <colby@recurforever.com> Date: Wed Jan 26 13:17:02 2022 -0500 . commit ef515cd Author: colbynh <colby@recurforever.com> Date: Wed Jan 26 13:13:19 2022 -0500 debug commit c6e5632 Author: colbynh <colby@recurforever.com> Date: Wed Jan 26 12:58:27 2022 -0500 Debug pr output commit 5c69752 Author: colbynh <colby@recurforever.com> Date: Wed Jan 26 12:44:42 2022 -0500 Update readme with exlude pr branches commit bfed459 Author: colbynh <colby@recurforever.com> Date: Wed Jan 26 12:44:24 2022 -0500 Use github api to get source branches commit f58a23d Author: colbynh <colby@recurforever.com> Date: Wed Jan 26 12:04:43 2022 -0500 Add exclude pr branch option commit c94dd47 Author: Colby Chenard <guitaristcolby@gmail.com> Date: Thu Feb 10 14:48:32 2022 -0500 Fix variable Co-authored-by: Polykarpos Kossyfas <44210251+pkossyfas@users.noreply.github.com> commit 2bb3f87 Author: Colby Chenard <guitaristcolby@gmail.com> Date: Thu Feb 10 14:48:21 2022 -0500 Update for consistency Co-authored-by: Polykarpos Kossyfas <44210251+pkossyfas@users.noreply.github.com> commit 90dde14 Merge: e2fc70d ee268fd Author: Polykarpos Kossyfas <44210251+pkossyfas@users.noreply.github.com> Date: Tue Feb 8 12:56:13 2022 +0200 Merge pull request beatlabs#15 from pkossyfas/protect-default-branch delete-old-branches: Protect main and master branch commit ee268fd Author: Polykarpos Kossyfas <p.kossyfas@thebeat.co> Date: Wed Feb 2 20:06:36 2022 +0200 delete-old-branches: Protect main and master branch Add main and master branches as default branches so as to be excluded from deletion. Also, add an option for user to override the default behavior. commit e2fc70d Merge: 5cec5e4 9104e84 Author: Alexios Polyzos <dragotic.saen@gmail.com> Date: Tue Feb 8 12:32:11 2022 +0200 Merge pull request beatlabs#16 from hwoarang/markos/add-ability-to-exclude-tags delete-action-branches: Add ability to exclude certain tags pattern commit 9104e84 Author: Markos Chandras <markos@chandras.me> Date: Mon Feb 7 17:22:30 2022 +0200 delete-action-branches: Add ability to exclude certain tags pattern There might be cases where certain tags need to be excluded from deletion. As such, lets add the ability to do that similarly to how excluded branches are handled. commit 5cec5e4 Author: Siavash Safi <siavash.safi@gmail.com> Date: Fri Feb 4 11:14:49 2022 +0100 Update CODEOWNERS commit 7e81c4d Author: colbynh <colby@recurforever.com> Date: Wed Jan 26 15:37:16 2022 -0500 Update readme commit 6925fe2 Author: colbynh <colby@recurforever.com> Date: Wed Jan 26 15:33:05 2022 -0500 Trim quotes on branch names commit 5e942cd Author: colbynh <colby@recurforever.com> Date: Wed Jan 26 13:18:59 2022 -0500 Fix api url commit 5498e08 Author: colbynh <colby@recurforever.com> Date: Wed Jan 26 13:17:02 2022 -0500 . commit d19ff4a Author: colbynh <colby@recurforever.com> Date: Wed Jan 26 13:13:19 2022 -0500 debug commit 7c4e5a6 Author: colbynh <colby@recurforever.com> Date: Wed Jan 26 12:58:27 2022 -0500 Debug pr output commit 3c95920 Author: colbynh <colby@recurforever.com> Date: Wed Jan 26 12:44:42 2022 -0500 Update readme with exlude pr branches commit 5ca4d86 Author: colbynh <colby@recurforever.com> Date: Wed Jan 26 12:44:24 2022 -0500 Use github api to get source branches commit e3f0650 Author: colbynh <colby@recurforever.com> Date: Wed Jan 26 12:04:43 2022 -0500 Add exclude pr branch option commit 2f90191 Merge: 6a6405f 6178899 Author: Markos Chandras <hwoarang@users.noreply.github.com> Date: Mon Mar 15 07:34:01 2021 +0000 Merge pull request beatlabs#12 from mdelapenya/patch-1 docs: update example usage to latest version commit 6178899 Author: Manuel de la Peña <mdelapenya@gmail.com> Date: Mon Mar 15 07:34:40 2021 +0100 docs: update example usage to latest version commit 6a6405f Author: Markos Chandras <markos@chandras.me> Date: Tue Dec 1 11:50:54 2020 +0000 [github] Update release action Update action to use the beatlabs/release-changelog-action to generate the changelog for the release. commit b0c1038 Merge: ea9b1ff 32c8b35 Author: Markos Chandras <hwoarang@users.noreply.github.com> Date: Tue Dec 1 11:46:34 2020 +0000 Merge pull request beatlabs#9 from beatlabs/fix-excluded-branches-regex delete-old-branches: Fix default regex for excluded branches commit 32c8b35 Author: Markos Chandras <markos@chandras.me> Date: Tue Dec 1 10:18:45 2020 +0000 delete-old-branches: Fix default regex for excluded branches The default regex is meant to not ignore any extra branch. As such, we need fix the regex in order to not match anything. commit ea9b1ff Author: Markos Chandras <markos@chandras.me> Date: Tue Nov 24 15:57:47 2020 +0000 [github] Bump to latest release action commit e78d126 Merge: ab4c664 eab41eb Author: Markos Chandras <hwoarang@users.noreply.github.com> Date: Tue Nov 24 15:43:20 2020 +0000 Merge pull request beatlabs#8 from beatlabs/minimum_tags [delete-old-branches] Add option to keep minimum number of tags commit eab41eb Author: Markos Chandras <markos@chandras.me> Date: Tue Nov 10 22:44:55 2020 +0000 [delete-old-branches] Add option to keep minimum number of tags Tags often correspond to actual releases so its might be desirable to keep a minimum number of them around especially for repositories which do not release so often otheriwse we may end up with a situation where all the tags will be eventually deleted if nothing was committed to the repo for X amount of time. commit ab4c664 Merge: 68dfdde fb75cf4 Author: Markos Chandras <hwoarang@users.noreply.github.com> Date: Tue Nov 10 22:33:32 2020 +0000 Merge pull request beatlabs#6 from beatlabs/fix-logic-around-branch-prefix Fix logic around prefixed branches commit fb75cf4 Author: Markos Chandras <markos@chandras.me> Date: Fri Jul 24 13:12:20 2020 +0300 Fix logic around prefixed branches The action deletes all branches by default except the protected ones. As such, there is no reason to have a specific filter to include more branches into this logic. What we want is a mechanism to *exclude* branches from this logic in order to artifically protect branches which are not marked as protected in the github API. commit 68dfdde Author: Markos Chandras <markos@chandras.me> Date: Mon Sep 14 16:38:33 2020 +0300 [github] Update SHA for release action Update SHA for the release action which fixes the following problem: marvinpinto/action-automatic-releases/7787f7d200d647f2e8739c9df73a1cf7a23b9f30/action.yml (Line: 27, Col: 5): Unexpected value 'decription' commit ae01784 Merge: 801baf5 37542d5 Author: Markos Chandras <hwoarang@users.noreply.github.com> Date: Mon Sep 14 14:36:20 2020 +0100 Merge pull request beatlabs#7 from beatlabs/hide-pseudorefs-and-peeled-tags Pass --refs to git-ls-remote commit 37542d5 Author: Markos Chandras <markos@chandras.me> Date: Mon Sep 14 13:35:35 2020 +0300 Pass --refs to git-ls-remote We need to pass --refs to the git ls-remote command in order to hide peeled tags and pseudorefs like HEAD from output. Otherwise the action fails when trying to delete annotated tags as they appear in the form of vX.X.X^{} commit 801baf5 Merge: df0035d be5626b Author: Siavash Safi <siavash.safi@gmail.com> Date: Wed Jul 22 09:53:02 2020 +0200 Merge pull request beatlabs#5 from teivah/master Adding a mechanism to filter per prefix commit be5626b Author: teivah <t.harsanyi@thebeat.co> Date: Wed Jul 22 09:44:24 2020 +0200 Adding a mechanism to filter per prefix commit df0035d Merge: d7a53d7 56f53d0 Author: Markos Chandras <hwoarang@users.noreply.github.com> Date: Tue Jun 16 08:23:51 2020 +0100 Merge pull request beatlabs#4 from beatlabs/fix-tag-deletion Fix bug when deleting branches with delete_tags=true commit 56f53d0 Author: Markos Chandras <markos@chandras.me> Date: Mon Jun 15 14:28:57 2020 +0100 Fix bug when deleting branches with delete_tags=true Fix a bug where a branch deletion will fail with 422 whene delete_tags is true. This is because the logic was broken and the wrong endpoint was used to delete the object. commit d7a53d7 Merge: dbfa3f3 0698a3a Author: Markos Chandras <hwoarang@users.noreply.github.com> Date: Mon Jun 15 08:38:42 2020 +0100 Merge pull request beatlabs#3 from beatlabs/enhance-debug-log delete-old-brances: Add option to dump the curl output on failures commit 0698a3a Author: Markos Chandras <markos@chandras.me> Date: Fri Jun 12 10:36:47 2020 +0100 delete-old-brances: Add option to dump the curl output on failures Redirect output to a debug file which can then dump when the delete request fails commit dbfa3f3 Merge: 375cfc4 c0cb74b Author: Markos Chandras <hwoarang@users.noreply.github.com> Date: Thu Jun 4 09:43:10 2020 +0100 Merge pull request beatlabs#2 from beatlabs/fix-for-tags delete-old-branches: Also fetch tags during initial git fetch commit c0cb74b Author: Markos Chandras <markos@chandras.me> Date: Thu Jun 4 09:07:12 2020 +0100 Also fetch tags during initial git fetch We need to have the tags present on the repo to be able to examine their history This also updates the release action to the latest commit to fix an issue with commit filtering. commit 375cfc4 Merge: 75a26c7 3fe627f Author: Markos Chandras <hwoarang@users.noreply.github.com> Date: Thu Jun 4 09:01:31 2020 +0100 Merge pull request beatlabs#1 from beatlabs/add-tag-support Add support for deleting old tags as well commit 3fe627f Author: Markos Chandras <markos@chandras.me> Date: Wed Jun 3 10:58:39 2020 +0100 Add support for deleting old tags as well It might also be beneficial to get rid of old tags so add a new `delete_tags` option for that which defaults to `false` to preserve the existing behavior. commit 75a26c7 Author: Markos Chandras <markos@chandras.me> Date: Fri May 22 14:36:18 2020 +0100 README: Delete Release badge The badge only makes sense for tags so no point in having it in the README file.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Add main and master branches as default branches so as to be
excluded from deletion. Also, add an option for user to override the
default behavior.