-
Notifications
You must be signed in to change notification settings - Fork 31
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
Support for monorepo #19
Comments
I figured out a workaround for now. Going to leave this open until the maintainer replies, though. WorkaroundCreate multiple yml files and use e.g. # .github/workflows/ticket-check-ui
name: Pull Request Description
on:
pull_request:
types: ['opened', 'edited', 'reopened', 'synchronize']
paths:
- 'libs/ui/**'
jobs:
jira_ticket:
name: jira ticket check
runs-on: ubuntu-latest
steps:
- name: Check jira for ticket
uses: neofinancial/ticket-check-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
ticketLink: 'https://invisible.atlassian.net/browse/DS-%ticketNumber%'
ticketPrefix: 'DS-'
titleRegex: '^DS-(?<ticketNumber>\d+)'
branchRegex: '^DS-(?<ticketNumber>\d+)'
bodyRegex: 'DS-(?<ticketNumber>\d+)'
bodyURLRegex: 'http(s?):\/\/(invisible.atlassian.net)(\/browse)\/(DS\-)(?<ticketNumber>\d+)' # .github/workflows/ticket-check-portal
name: Pull Request Description
on:
pull_request:
types: ['opened', 'edited', 'reopened', 'synchronize']
paths:
- 'libs/portal/**'
jobs:
jira_ticket:
name: jira ticket check
runs-on: ubuntu-latest
steps:
- name: Check jira for ticket
uses: neofinancial/ticket-check-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
ticketLink: 'https://invisible.atlassian.net/browse/POR-%ticketNumber%'
ticketPrefix: 'POR-'
titleRegex: '^POR-(?<ticketNumber>\d+)'
branchRegex: '^POR-(?<ticketNumber>\d+)'
bodyRegex: 'POR-(?<ticketNumber>\d+)'
bodyURLRegex: 'http(s?):\/\/(invisible.atlassian.net)(\/browse)\/(POR\-)(?<ticketNumber>\d+)' Note that the names need to be exactly the same on the job e.g. To make it pass for all other paths (e.g. if you changing github actions or some other config and dont have a jira board for that to go) add a # .github/workflows/ticket-check-fake
name: fake
on:
pull_request:
types: ['opened', 'edited', 'reopened', 'synchronize']
paths-ignore:
- 'libs/ui/**'
- 'libs/flow/**'
- 'apps/flow/**'
jobs:
jira_ticket:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2 |
@cyrus-za We also use a monorepo and have the same issue. For now I added support for By this you can use: jobs:
check-jira-ticket:
runs-on: ubuntu-latest
steps:
- name: Check JIRA ticket
uses: bang-olufsen/ticket-check-action@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
ticketLink: 'https://invisible.atlassian.net/browse/%ticketPrefix%-%ticketNumber%'
ticketPrefix: '(?<ticketPrefix>\w+)-'
titleRegex: '^(?<ticketPrefix>\w+)-(?<ticketNumber>\d+)' |
@jeppefrandsen would you consider removing https://github.com/bang-olufsen/ticket-check-action/blob/master/src/index.ts#L133 from your fork? It seems that it's redefining |
@brandonbirdj I am unfortunately not in that company anymore but could move it to my private account or new company (where I also use it) if it will not be fixed in this repo. |
We running a monorepo and thus got a jira board for each project. The regex part can be figured out manually if need be, but the ticket-link and ticket-prefix needs to be dynamicly set.
Maybe something like in our PR template we add
Which will render
Project
Then based on what gets checked, it will use that prefix?
If that won't work, maybe a way to generically check for a ticket number provided in title or something and use that.
I am open for ideas
The text was updated successfully, but these errors were encountered: