Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MIJN-8302 pr title check #123

Merged
merged 2 commits into from
May 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
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