Skip to content

Releases: CasperWA/push-protected

v2.16.0

12 Jul 08:32
Compare
Choose a tag to compare

Use Python 3.11 throughout

Update and conform the code base and all development-related code (CI/CD workflows and more) to expect a Python 3.11 interpreter.

Conform more to standard GitHub Actions behavior

Extend the default for acceptable conclusions (the acceptable_conclusions input) for the action to exit in a successful state to include the skipped conclusion. It previously only included the success conclusion. Thanks to @MattiSG for this extension.

Changelog

v2.16.0 (2024-07-12)

Full Changelog

Closed issues:

  • Mirror GitHub interpretation in default acceptable conclusions #249
  • Be explicit and match up Python versions #217

Merged pull requests:

* This Changelog was automatically generated by github_changelog_generator

v2.15.0

02 Nov 00:22
Compare
Choose a tag to compare

Extend inputs & support GH Enterprise

GH Enterprise is supported by using a variable base URL for GH and the GH REST API.

New inputs:

  • acceptable_conclusions: Conclusion states that will not result in errors and a failure.
  • fail_fast: Toggle failing as soon as a status check concludes in a state not part of acceptable_conclusions.
  • gh_rest_api_base_url: The GH REST API base URL, defaults to https://api.github.com. For more information about this value, see the GH docs.
  • post_sleep: Set the seconds the action should sleep after waiting for status checks to conclude.

Changed inputs:

  • pre_sleep: Renamed input for the old sleep input.
  • sleep: Deprecated. It is now called pre_sleep instead.

Changelog

v2.15.0 (2023-11-02)

Full Changelog

Implemented enhancements:

  • State of checks #149
  • Make post-sleep a user input #136

Fixed bugs:

  • Reinstate and deprecate the sleep input #209

Closed issues:

  • Support GH enterprise #201
  • Error logged when check is skipped #153

Merged pull requests:

* This Changelog was automatically generated by github_changelog_generator

v2.14.0

28 Sep 08:04
Compare
Choose a tag to compare

Support GitHub App tokens

Instead of checking the user role, the protected key is expected to be available for all branches, providing support for GitHub App tokens, which do not have a user role per se.
This means if the response for checking a branch's protected key returns anything than a successful response with a protected key of value true, the branch will be considered non-protected, or it will raise, ending the action run due to insufficient rights.

This was brought up and tested by @Shahaed.

Changelog

v2.14.0 (2022-09-28)

Full Changelog

Implemented enhancements:

  • Allow using Github App Token #144

Merged pull requests:

* This Changelog was automatically generated by github_changelog_generator

v2.13.0

15 Aug 09:55
Compare
Choose a tag to compare

Git-LFS support

Added Git-LFS support, thanks to @jbcpollak.

Also added a "Sponsor" button and implemented minor development dependency updates.

Changelog

v2.13.0 (2022-08-15)

Full Changelog

Merged pull requests:

* This Changelog was automatically generated by github_changelog_generator

v2.12.0

11 Jul 10:13
Compare
Choose a tag to compare

Sleep after checks have finished

Sleep 5 seconds after all status checks have returned as "finished".
This value will be made a user input and will be released as a patch update.

Changelog

v2.12.0 (2022-07-11)

Full Changelog

Merged pull requests:

  • Sleep 5 seconds after status checks are done #131 (gao-sun)

* This Changelog was automatically generated by github_changelog_generator

v2.11.0

01 Jul 14:45
Compare
Choose a tag to compare

New input path

The input allows users to specify the working directory of the action relative to $GITHUB_WORKSPACE.

Changelog

v2.11.0 (2022-07-01)

Full Changelog

Implemented enhancements:

  • Add path input #128

Merged pull requests:

* This Changelog was automatically generated by github_changelog_generator

v2.10.0

14 Apr 07:31
Compare
Choose a tag to compare

Hot-fix for multi-user vulnerability

As reported by @juris in #114, the implemented fix for a multi-user vulnerability (CVE-2022-24765) left the action without the rights to change or manipulate the checked out files and folders. This release fixes this issue by adding the root workspace directory as a git safe directory.

Changelog

v2.10.0 (2022-04-14)

Full Changelog

Fixed bugs:

  • GH GraphQL variable update for auto-merge workflow #100

Closed issues:

  • Looks like git update for CVE-2022-24765 broke the action #114

Merged pull requests:

* This Changelog was automatically generated by github_changelog_generator

v2.9.0

17 Jan 10:32
Compare
Choose a tag to compare

Check user (PAT) permissions

The API call to check whether a branch is protected or not has been updated, and can be done with the lowest of permission rights, however, at the same time, if the branch is protected, it is checked whether the user (PAT) has "admin" permission, since this is the only level that allows toggling review-protected branches, as well as getting the information about which checks are currently running.

The README has been updated with information about these permissions needed for certain use cases.

Furthermore, a debug parameter has been added to toggle set -x in the entrypoint.sh script. This is only intended for debugging purposes.

Changelog

v2.9.0 (2022-01-17)

Full Changelog

Implemented enhancements:

  • Warn or error upon using token without proper rights #94
  • Add debug option #93

Closed issues:

  • Not clear which scope should I use to enable unprotect_reviews option #60

Merged pull requests:

* This Changelog was automatically generated by github_changelog_generator

v2.8.0

03 Jan 16:19
Compare
Choose a tag to compare

From master to main

The default branch of the repository has been changed to main. As has the the default value for the branch parameter.
To keep some backwards compatibility for users who exploit that master was the default branch parameter value up to now, this is a last resort fallback value for the branch parameter, should the main branch not exist on the remote (in the target GitHub repository).

This fallback implementation also leeds to an intrinsic sanity check for whether or not the specified target branch exists on the remote (in the target GitHub repository) at all. Should this not be the case, the action will fail immediately.

IMPORTANT: If you are using master as the default branch for your repository and not defining either of the branch or ref parameters, while also having a main branch in your repository, this action will not work as you expect from this version and onwards. There is an easy fix for this, however; specify the branch parameter to be master:

name: Pushing to protected 'master' branch
uses: CasperWA/push-protected@v2
with:
  token: ${{ secrets.PUSH_TO_PROTECTED_BRANCH }}
  branch: master  # This parameter should be explicitly set, to make sure the `master` branch is the target branch.

Again, if you are in the above situation, but do not have a main branch in your repository, then the action will keep working as it always has. However, it is highly recommended to either change you default branch name to main or explicitly set either the branch or ref parameter.

Changelog

v2.8.0 (2022-01-03)

Full Changelog

Implemented enhancements:

  • Update this repository's default branch to main #84
  • Change default branch name to match GitHub #80

Fixed bugs:

  • Force pushing tags when updating master #88
  • Problem with CI #86

Merged pull requests:

* This Changelog was automatically generated by github_changelog_generator

v2.7.0

15 Dec 13:26
Compare
Choose a tag to compare

New ref argument

A new ref argument has been added. It is mutually exclusive with the branch argument, meaning one cannot specify both. If neither are specified the action has the same behavior as previously, using the default for branch ("master").
The value for ref is a git ref for a branch, e.g., refs/heads/master.

The changelog generation has also been optimized, avoiding vMAJOR versions as well as the ci_test test tag.

Changelog

v2.7.0 (2021-12-15)

Full Changelog

Implemented enhancements:

  • Consider adding ref #61

Fixed bugs:

  • Finding the "previous version" for adding changelog info to release not working #77

Merged pull requests:

* This Changelog was automatically generated by github_changelog_generator