Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
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
20 changes: 20 additions & 0 deletions .github/workflows/jira-link-pr.yml-disabled
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Link PR to Jira Ticket
on:
pull_request:
types: [opened, edited, synchronize]

permissions:
contents: read
pull-requests: read

jobs:
link-jira:
uses: mohamadjaara/jira-description-action@master
with:
jira-base-url: https://wearezeta.atlassian.net
jira-ticket-regex: '[A-Z]+-[0-9]+'
skip-actors: 'dependabot[bot],AndroidBob'
skip-branches: '^(production-release|main|master|release\/v\d+)$'
repository-owner-check: 'wireapp'
secrets:
jira-token: ${{ secrets.JIRA_TOKEN }}
33 changes: 20 additions & 13 deletions .github/workflows/jira-lint-and-link.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,34 @@
name: Link and Lint PR with Jira Ticket Number
on:
merge_group:
pull_request:
types: [opened, edited, synchronize]

permissions:
contents: read
pull-requests: write

jobs:
add-jira-description:
get-version:
runs-on: ubuntu-latest
# Run only if the PR is not from a Fork / external contributor
if: ${{ github.repository_owner == 'wireapp' }}
outputs:
version_name: ${{ steps.version.outputs.version_name }}
steps:
- name: Check for Dependabot
if: github.actor == 'dependabot[bot]' || github.actor == 'AndroidBob'
run: echo "PR created by Dependabot or AndroidBob, exiting successfully" && exit 0
- name: Get version name from source
id: version
run: |
VERSION=$(curl -s https://raw.githubusercontent.com/${{ github.repository }}/${{ github.head_ref || github.ref_name }}/build-logic/plugins/src/main/kotlin/AndroidCoordinates.kt | grep 'const val versionName' | sed -E 's/.*"([^"]+)".*/\1/')
echo "version_name=$VERSION" >> $GITHUB_OUTPUT

- uses: cakeinpanic/[email protected]
name: jira-description-action
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
jira-token: ${{ secrets.JIRA_TOKEN }}
jira-base-url: https://wearezeta.atlassian.net
skip-branches: '^(production-release|main|master|release\/v\d+)$' #optional
fail-when-jira-issue-not-found: true
add-jira-description:
needs: get-version
uses: wireapp/.github/.github/workflows/jira-link-pr-reusable.yml@mo/ci/jira-linking-gh-action # TODO: replace with commit hash
with:
skip-branches: '^(production-release|main|master|release\/v\d+)$'
skip-actors: 'dependabot[bot],AndroidBob'
version-name: ${{ needs.get-version.outputs.version_name }}
fix-version-regex: '(?:^|[\s\-_])(v?\d+\.\d+(?:\.\d+)?(?:[\-\+][\w\.\-]*)?)'
secrets:
github-token: ${{ secrets.GITHUB_TOKEN }}
jira-token: ${{ secrets.JIRA_TOKEN }}
Loading