Skip to content

Commit

Permalink
MIJN-8302 pr title check (#123)
Browse files Browse the repository at this point in the history
* Maintenance run 2024-05-06

* pr-title-check toegevoegd en dependabot dependency update

---------

Co-authored-by: timvanoostrom <[email protected]>
Co-authored-by: Roan Paulus <[email protected]>
  • Loading branch information
3 people authored May 6, 2024
1 parent 762f6d3 commit 2a2dc35
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 12 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/pr-title-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Taken from: https://levelup.gitconnected.com/enforcing-jira-ticket-formatting-in-github-pr-titles-and-commit-messages-78d9755568df
name: 'PR Title Check'
on:
pull_request:
types: [opened, edited, synchronize]
jobs:
check-title:
runs-on: ubuntu-latest
steps:
- name: Check PR title
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const payload = context.payload
const prTitle = payload.pull_request.title
// Titel moet beginnen met mijn-xxxx of Bump!
const jiraPattern = /(mijn-\d+|bump!)/gi
if (!jiraPattern.test(prTitle)) {
console.log('The PR title does not match JIRA ticket format!')
// Fails the workflow
core.setFailed('PR title does not match JIRA ticket format!')
} else {
console.log('PR title format is correct.')
}
23 changes: 11 additions & 12 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#
# This file is autogenerated by pip-compile with Python 3.9
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile --output-file=requirements.txt requirements-root.txt
Expand All @@ -14,15 +14,15 @@ azure-core==1.30.1
# msrest
azure-core-tracing-opentelemetry==1.0.0b11
# via azure-monitor-opentelemetry
azure-monitor-opentelemetry==1.4.0
azure-monitor-opentelemetry==1.4.1
# via -r requirements-root.txt
azure-monitor-opentelemetry-exporter==1.0.0b24
azure-monitor-opentelemetry-exporter==1.0.0b25
# via azure-monitor-opentelemetry
beautifulsoup4==4.12.3
# via -r requirements-root.txt
black==24.4.0
black==24.4.2
# via -r requirements-root.txt
blinker==1.7.0
blinker==1.8.1
# via flask
certifi==2024.2.2
# via
Expand All @@ -36,9 +36,9 @@ click==8.1.7
# via
# black
# flask
coverage==7.4.4
coverage==7.5.1
# via -r requirements-root.txt
cryptography==42.0.5
cryptography==42.0.6
# via
# -r requirements-root.txt
# jwcrypto
Expand All @@ -58,14 +58,13 @@ idna==3.7
# via requests
importlib-metadata==7.0.0
# via
# flask
# opentelemetry-api
# opentelemetry-instrumentation-flask
isodate==0.6.1
# via msrest
itsdangerous==2.1.2
itsdangerous==2.2.0
# via flask
jinja2==3.1.3
jinja2==3.1.4
# via flask
jwcrypto==1.5.6
# via -r requirements-root.txt
Expand Down Expand Up @@ -167,7 +166,7 @@ packaging==24.0
# opentelemetry-instrumentation-flask
pathspec==0.12.1
# via black
platformdirs==4.2.0
platformdirs==4.2.1
# via black
psutil==5.9.8
# via azure-monitor-opentelemetry-exporter
Expand Down Expand Up @@ -207,7 +206,7 @@ typing-extensions==4.11.0
# opentelemetry-sdk
urllib3==2.2.1
# via requests
werkzeug==3.0.2
werkzeug==3.0.3
# via flask
wrapt==1.16.0
# via
Expand Down

0 comments on commit 2a2dc35

Please sign in to comment.