newrelic / nr1-browser-analyzer

NR1 Browser Analyzer allows you to understand the impact and performance of your website.
https://github.com/newrelic/nr1-browser-analyzer/discussions
Apache License 2.0
19 stars 22 forks source link

fix: uses GH API to disable/enable branch protection so committing works #43

Closed jbeveland27 closed 4 years ago

jbeveland27 commented 4 years ago

Context: Supplying a repo Admin's Personal Access Token with the correct permissions should allow them to push commits from within a GitHub Action (as is the case when the third_party_notices are generated). However, I've not been able to get this to work. This was also a problem when running semantic-release. Basically, supplying a personal access token to override the github_token seems broken when branch protection is enabled.

In light of that, this change modifies the workflow to utilize the GitHub API via actions/github-script to disable/enable branch protection. Basically it disables branch protection, performs the commit, then re-enables the same settings that were present before.

newrelicbot commented 4 years ago

:tada: This PR is included in version 1.3.0 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket: