Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: github/branch-deploy
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v8.1.1
Choose a base ref
...
head repository: github/branch-deploy
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: main
Choose a head ref
Loading
Showing with 22,083 additions and 11,046 deletions.
  1. +19 −0 .github/dependabot.yml
  2. +3 −1 .github/workflows/actions-config-validation.yml
  3. +5 −3 .github/workflows/codeql-analysis.yml
  4. +3 −2 .github/workflows/lint.yml
  5. +2 −1 .github/workflows/old/sample-workflow.yml
  6. +4 −2 .github/workflows/package-check.yml
  7. +3 −2 .github/workflows/test.yml
  8. +41 −0 .github/workflows/update-latest-release-tag.yml
  9. +1 −1 .node-version
  10. +111 −17 README.md
  11. +65 −15 __tests__/functions/actions-status.test.js
  12. +22 −0 __tests__/functions/admin.test.js
  13. +306 −0 __tests__/functions/branch-ruleset-checks.test.js
  14. +6 −6 __tests__/functions/check-input.test.js
  15. +166 −0 __tests__/functions/commit-safety-checks.test.js
  16. +386 −0 __tests__/functions/deployment-confirmation.test.js
  17. +258 −2 __tests__/functions/deployment.test.js
  18. +77 −0 __tests__/functions/environment-targets.test.js
  19. +91 −7 __tests__/functions/help.test.js
  20. +24 −1 __tests__/functions/identical-commit-check.test.js
  21. +105 −0 __tests__/functions/label.test.js
  22. +73 −2 __tests__/functions/lock.test.js
  23. +170 −0 __tests__/functions/outdated-check.test.js
  24. +87 −0 __tests__/functions/params.test.js
  25. +223 −46 __tests__/functions/post-deploy-message.test.js
  26. +197 −155 __tests__/functions/post-deploy.test.js
  27. +34 −2 __tests__/functions/post.test.js
  28. +1,848 −131 __tests__/functions/prechecks.test.js
  29. +5 −5 __tests__/functions/string-to-array.test.js
  30. +19 −0 __tests__/functions/timestamp.test.js
  31. +4 −3 __tests__/functions/trigger-check.test.js
  32. +21 −0 __tests__/functions/truncate-comment-body.test.js
  33. +54 −8 __tests__/functions/unlock-on-merge.test.js
  34. +28 −9 __tests__/functions/unlock.test.js
  35. +53 −0 __tests__/functions/valid-branch-name.test.js
  36. +261 −0 __tests__/functions/valid-deployment-order.test.js
  37. +7 −5 __tests__/functions/valid-permissions.test.js
  38. +700 −14 __tests__/main.test.js
  39. +198 −0 __tests__/schemas/action.schema.yml
  40. +28 −0 __tests__/templates/test_deployment_message.md
  41. +34 −0 __tests__/version.test.js
  42. +87 −3 action.yml
  43. +1 −1 badges/coverage.svg
  44. +10,294 −4,769 dist/index.js
  45. +1 −1 dist/index.js.map
  46. +164 −38 dist/licenses.txt
  47. +1 −1 dist/sourcemap-register.js
  48. BIN docs/assets/deployment-approved.png
  49. BIN docs/assets/deployment-rejected.png
  50. BIN docs/assets/deployment-timeout.png
  51. BIN docs/assets/ignore-ci-checks.png
  52. BIN docs/assets/only-using-checks-for-one-ci-job.png
  53. BIN docs/assets/pr-reviews.png
  54. BIN docs/assets/required-ci-checks-example.png
  55. BIN docs/assets/required-ci-checks.png
  56. BIN docs/assets/rules/mismatch_pull_request_dismiss_stale_reviews_on_push.png
  57. BIN docs/assets/rules/mismatch_pull_request_require_code_owner_review.png
  58. BIN docs/assets/rules/mismatch_pull_request_required_approving_review_count.png
  59. BIN docs/assets/rules/mismatch_required_status_checks_strict_required_status_checks_policy.png
  60. BIN docs/assets/rules/missing_deletion.png
  61. BIN docs/assets/rules/missing_non_fast_forward.png
  62. BIN docs/assets/rules/missing_pull_request.png
  63. BIN docs/assets/rules/missing_required_deployments.png
  64. BIN docs/assets/update-branch-setting.png
  65. +74 −0 docs/branch-rulesets.md
  66. +84 −0 docs/checks.md
  67. +13 −2 docs/custom-deployment-messages.md
  68. +77 −0 docs/deploying-commit-SHAs.md
  69. +52 −0 docs/deployment-confirmation.md
  70. +35 −0 docs/deployment-payload.md
  71. +48 −0 docs/enforced-deployment-order.md
  72. +47 −36 docs/examples.md
  73. +41 −0 docs/maintainer-guide.md
  74. +2 −0 docs/merge-commit-strategy.md
  75. +154 −0 docs/outdated_mode.md
  76. +29 −3 docs/parameters.md
  77. +8 −1 docs/usage.md
  78. +255 −0 events/context.json
  79. +2,519 −5,335 package-lock.json
  80. +15 −16 package.json
  81. +42 −6 script/release
  82. +13 −8 src/functions/action-status.js
  83. +7 −3 src/functions/admin.js
  84. +3 −0 src/functions/api-headers.js
  85. +138 −0 src/functions/branch-ruleset-checks.js
  86. +1 −1 src/functions/check-input.js
  87. +7 −1 src/functions/check-lock-file.js
  88. +101 −0 src/functions/commit-safety-checks.js
  89. +164 −0 src/functions/deployment-confirmation.js
  90. +146 −1 src/functions/deployment.js
  91. +5 −2 src/functions/deprecated-checks.js
  92. +26 −5 src/functions/environment-targets.js
  93. +63 −3 src/functions/help.js
  94. +27 −4 src/functions/identical-commit-check.js
  95. +135 −0 src/functions/inputs.js
  96. +78 −0 src/functions/label.js
  97. +24 −11 src/functions/lock.js
  98. +5 −2 src/functions/naked-command-check.js
  99. +80 −0 src/functions/outdated-check.js
  100. +15 −0 src/functions/params.js
  101. +103 −36 src/functions/post-deploy-message.js
  102. +162 −60 src/functions/post-deploy.js
  103. +40 −21 src/functions/post.js
  104. +368 −83 src/functions/prechecks.js
  105. +4 −1 src/functions/react-emote.js
  106. +1 −1 src/functions/string-to-array.js
  107. +25 −0 src/functions/suggested-rulesets.js
  108. +11 −0 src/functions/templates/error.js
  109. +6 −0 src/functions/timestamp.js
  110. +2 −2 src/functions/trigger-check.js
  111. +33 −0 src/functions/truncate-comment-body.js
  112. +30 −9 src/functions/unlock-on-merge.js
  113. +13 −3 src/functions/unlock.js
  114. +20 −0 src/functions/valid-branch-name.js
  115. +89 −0 src/functions/valid-deployment-order.js
  116. +12 −9 src/functions/valid-permissions.js
  117. +332 −128 src/main.js
  118. +9 −0 src/version.js
19 changes: 19 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
version: 2
updates:
- package-ecosystem: github-actions
directory: "/"
groups:
github-actions:
patterns:
- "*"
schedule:
interval: monthly
- package-ecosystem: npm
directory: "/"
groups:
npm-dependencies:
patterns:
- "*"
schedule:
interval: monthly
4 changes: 3 additions & 1 deletion .github/workflows/actions-config-validation.yml
Original file line number Diff line number Diff line change
@@ -15,9 +15,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: actions-config-validation
uses: GrantBirki/json-yaml-validate@3add42f5fa8bfff04a3fe664d27a316736257ef1 # pin@v2.3.1
uses: GrantBirki/json-yaml-validate@947ae8ac60c83cf78e4e00b3170ff8bee61f5248 # pin@v3.3.0
with:
comment: "true" # enable comment mode
yaml_schema: "__tests__/schemas/action.schema.yml"
8 changes: 5 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -27,15 +27,17 @@ jobs:
steps:
- name: checkout
uses: actions/checkout@v4
with:
persist-credentials: false

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}

- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
5 changes: 3 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@ on:
push:
branches:
- main
- 'releases/*'

permissions:
contents: read
@@ -14,9 +13,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: setup node
uses: actions/setup-node@v3.8.1
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: 'npm'
3 changes: 2 additions & 1 deletion .github/workflows/old/sample-workflow.yml
Original file line number Diff line number Diff line change
@@ -9,6 +9,7 @@
# deployments: write
# contents: write
# checks: read
# statuses: read

# jobs:
# sample:
@@ -29,7 +30,7 @@
# - uses: actions/checkout@2541b1294d2704b0964813337f33b291d3f8596b # pin@v3.0.2
# if: ${{ steps.branch-deploy.outputs.continue == 'true' }}
# with:
# ref: ${{ steps.branch-deploy.outputs.ref }}
# ref: ${{ steps.branch-deploy.outputs.sha }}

# # Do some fake "noop" deployment logic here
# - name: fake noop deploy
6 changes: 4 additions & 2 deletions .github/workflows/package-check.yml
Original file line number Diff line number Diff line change
@@ -16,9 +16,11 @@ jobs:

steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: setup node
uses: actions/setup-node@v3.8.1
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: 'npm'
@@ -39,7 +41,7 @@ jobs:
id: diff

# If index.js was different than expected, upload the expected version as an artifact
- uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # pin@v3.1.2
- uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # pin@v4.6.2
if: ${{ failure() && steps.diff.conclusion == 'failure' }}
with:
name: dist
5 changes: 3 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -4,7 +4,6 @@ on:
push:
branches:
- main
- 'releases/*'

permissions:
contents: read
@@ -14,9 +13,11 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false

- name: setup node
uses: actions/setup-node@v3.8.1
uses: actions/setup-node@v4
with:
node-version-file: .node-version
cache: 'npm'
41 changes: 41 additions & 0 deletions .github/workflows/update-latest-release-tag.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Update Latest Release Tag
run-name: Update ${{ github.event.inputs.major_version_tag }} with ${{ github.event.inputs.source_tag }}

on:
workflow_dispatch:
inputs:
source_tag:
description: 'The tag or reference to use as the source (example: v8.0.0)'
required: true
default: vX.X.X
major_version_tag:
description: 'The major release tag to update with the source (example: v8)'
required: true
default: vX

permissions:
contents: write

jobs:
tag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: git config
run: |
git config user.name github-actions
git config user.email github-actions@github.com
- name: tag new target
env:
SOURCE_TAG: ${{ github.event.inputs.source_tag }}
MAJOR_VERSION_TAG: ${{ github.event.inputs.major_version_tag }}
run: git tag -f ${MAJOR_VERSION_TAG} ${SOURCE_TAG}

- name: push new tag
env:
MAJOR_VERSION_TAG: ${{ github.event.inputs.major_version_tag }}
run: git push origin ${MAJOR_VERSION_TAG} --force
2 changes: 1 addition & 1 deletion .node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
20.6.0
22.13.1
Loading