Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
c12ba5c
feat(pr-title): Add a step to re-request checks when PR title is valid
chris3ware Mar 6, 2025
3fc6592
refactor(pr-check): Add PR check workflow
chris3ware Mar 6, 2025
aa34d2b
fix(pr-title): Add write permissions for checks
chris3ware Mar 6, 2025
30e3b77
fix(pr-check): Add write permissions for checks
chris3ware Mar 6, 2025
26db80e
fix(pr-title): Add missing EOF
chris3ware Mar 6, 2025
be5a580
refactor(pr-title): Use ghcommit-action to trigger new checks
chris3ware Mar 6, 2025
0b0ac64
fix(pr-title): Use GITHUB_TOKEN instead of pr-approval-token
chris3ware Mar 6, 2025
20b64ce
fix(pr-title): Add contents write for github token
chris3ware Mar 6, 2025
55dce40
Merge 20b64cee82de0642a0420533b356976f1d5ab0ed into bc931d1da784e8e41…
chris3ware Mar 6, 2025
1eba33a
fix(pr-title): Create empty commit to trigger new checks
github-actions[bot] Mar 6, 2025
3d0a40d
fix(pr-title): Use fine grained PAT in commit step
chris3ware Mar 6, 2025
429551d
Merge remote-tracking branch 'refs/remotes/origin/feat-pr-title-reche…
chris3ware Mar 6, 2025
a9e48cc
fix(pr-title): Use correct action secret name
chris3ware Mar 6, 2025
28b6a19
refactor(pr-title): Use `gh api` to get check run ID and conclusion
chris3ware Mar 6, 2025
01fcebd
fix(pr-check): Add checks permission to validate-pr-title job
chris3ware Mar 6, 2025
1c77386
fix(pr-title): Use pr event head sha for checks id
chris3ware Mar 6, 2025
806f05c
chore(pr-title): Add dump-github-context step
chris3ware Mar 6, 2025
b04e4da
fix(pr-title): Remove unnecessary `|` operator before jq
chris3ware Mar 6, 2025
6165747
feat(pr-title): Add check to echo check conclusion
chris3ware Mar 6, 2025
e29275e
feat(pr-title): Add job to output conclusion
chris3ware Mar 6, 2025
5b09e50
fix(pr-title): Add output as environment variable
chris3ware Mar 6, 2025
10bb3a8
refactor(pr-title): Move get conclusion step to its own job
chris3ware Mar 6, 2025
763fd2e
refactor(pr-check): Remove steps for accessing checks api
chris3ware Mar 6, 2025
4290d0e
chore(pr-check): Enforce all checks
chris3ware Mar 6, 2025
d9c295c
fix(checks): Add auto-approve-pr to ignore_pattern
chris3ware Mar 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
"delete-run",
"dep-review",
"get-token",
"pr-check",
"pr-title",
"ossf",
"release",
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/pr-check.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: PR Check
on:
pull_request:
types: [opened, edited, reopened, synchronize]

# Disable permissions for all available scopes
permissions: {}

jobs:
validate-pr-title:
name: Validate PR title
permissions:
contents: read
pull-requests: write
uses: 3ware/workflows/.github/workflows/pr-title.yaml@feat-pr-title-recheck

enforce-all-checks:
name: Checks
needs: [validate-pr-title]
permissions:
checks: read
uses: 3ware/workflows/.github/workflows/wait-for-checks.yaml@61d14ca4e861fc9c11acacc7d80a10a78775a4e3 # 4.11.0
secrets: inherit
6 changes: 2 additions & 4 deletions .github/workflows/pr-title.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: Validate PR title

on:
pull_request:
types: [opened, edited, reopened]
branches: [main]
workflow_call: {}

# Disable permissions for all available scopes
Expand Down Expand Up @@ -50,7 +47,7 @@ jobs:

Please update the title to be ${{ env.MAX_PR_TITLE_LENGTH }} characters or less. If you need help, feel free to ask! 😊

- name: Exit if PR title is too long
- name: Long title summary
if: ${{ fromJson(env.PR_TITLE_LENGTH) > fromJson(env.MAX_PR_TITLE_LENGTH) }}
run: |
echo "### :x: Pull Request title is invalid" >> $GITHUB_STEP_SUMMARY
Expand Down Expand Up @@ -127,6 +124,7 @@ jobs:
- name: Delete PR comment on resolution
# Delete comment if the error message is null or the PR title is the correct length
if: ${{ steps.validate-pr-title.outputs.error_message == null }}
id: delete-comment
uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 # v2.9.0
with:
header: pr-title-error
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/wait-for-checks.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: Checks

on:
pull_request:
types: [opened, reopened, synchronize]
branches: [main]
workflow_call: {}

# Disable permissions for all available scopes
Expand All @@ -26,10 +23,9 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
# check run "auto-approve-pr" is completed with conclusion "cancelled" (unsuccessful) when skipped
# auto-approve-pr should run on the conclusion of enforce-all-checks, so checks should not check for auto-approve-pr
ignore: auto-approve-pr
# ignore any pattern before '/ enforce-all-checks' for calling workflows
# For example if the calling workflow job name is 'Checks' the path to ignore is 'Checks / enforce-all-checks'
ignore_pattern: .*\/ enforce-all-checks
ignore_pattern: .*\/ (enforce-all-checks|auto-approve-pr)

# Approve PR raised by 3ware-release[bot] to upgrade trunk on trunk branches
# after all checks have passed.
Expand Down