From e6d0304372f5137f7c52d3125b03dba686408d59 Mon Sep 17 00:00:00 2001 From: Ugo Bechameil Date: Fri, 21 Jun 2024 17:11:00 +0200 Subject: [PATCH 1/4] add PR template and auto link to JIRA tasks action --- .github/PULL_REQUEST_TEMPLATE.md | 11 +++++++++++ .github/workflows/jira_link_to_pr.yml | 22 ++++++++++++++++++++++ 2 files changed, 33 insertions(+) create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/workflows/jira_link_to_pr.yml diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..5999623 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,11 @@ +## Content + +You have no Jira task for this PR? Describe your changes here... + +... + +## Technical details + +You feel the need to provide technical explanations? You can do it here... + +... diff --git a/.github/workflows/jira_link_to_pr.yml b/.github/workflows/jira_link_to_pr.yml new file mode 100644 index 0000000..068cf31 --- /dev/null +++ b/.github/workflows/jira_link_to_pr.yml @@ -0,0 +1,22 @@ +# https://github.com/marketplace/actions/jira-description +# Requires a JIRA REST api token: https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/ +# https://id.atlassian.com/manage-profile/security/api-tokens to generate one with you username +# Configure the JIRA_TOKEN secret as a repository action secret as described below: +# follow the pattern: : +name: jira-description-action +on: + pull_request: + types: [opened, reopened] +jobs: + add-jira-description: + runs-on: ubuntu-latest + steps: + - uses: cakeinpanic/jira-description-action@v0.4.0 + name: jira-description-action + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + jira-token: ${{ secrets.JIRA_TOKEN }} + jira-base-url: https://hackolade.atlassian.net + skip-branches: '^(develop|main|master)$' #optional + jira-project-key: 'HCK' #optional + use: 'both' From 09bb05c9906214c1269bc98fc5a2d11b7326793b Mon Sep 17 00:00:00 2001 From: Ugo Bechameil Date: Sun, 23 Jun 2024 10:43:58 +0200 Subject: [PATCH 2/4] update auto link to JIRA tasks action --- .github/workflows/jira_link_to_pr.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/jira_link_to_pr.yml b/.github/workflows/jira_link_to_pr.yml index 068cf31..b638db6 100644 --- a/.github/workflows/jira_link_to_pr.yml +++ b/.github/workflows/jira_link_to_pr.yml @@ -20,3 +20,4 @@ jobs: skip-branches: '^(develop|main|master)$' #optional jira-project-key: 'HCK' #optional use: 'both' + fail-when-jira-issue-not-found: false From a1c488cc313f25844f8bedff39ad019227c1ffa0 Mon Sep 17 00:00:00 2001 From: Ugo Bechameil Date: Sun, 23 Jun 2024 10:48:15 +0200 Subject: [PATCH 3/4] update auto link to JIRA tasks action --- .github/workflows/jira_link_to_pr.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/jira_link_to_pr.yml b/.github/workflows/jira_link_to_pr.yml index b638db6..1ffc365 100644 --- a/.github/workflows/jira_link_to_pr.yml +++ b/.github/workflows/jira_link_to_pr.yml @@ -17,7 +17,7 @@ jobs: github-token: ${{ secrets.GITHUB_TOKEN }} jira-token: ${{ secrets.JIRA_TOKEN }} jira-base-url: https://hackolade.atlassian.net - skip-branches: '^(develop|main|master)$' #optional - jira-project-key: 'HCK' #optional + skip-branches: '^(develop|main|master)$' + jira-project-key: 'HCK' use: 'both' fail-when-jira-issue-not-found: false From 7458de30ece1650a313854ed64175b764295d180 Mon Sep 17 00:00:00 2001 From: Ugo Bechameil Date: Sun, 23 Jun 2024 10:54:45 +0200 Subject: [PATCH 4/4] update PR template --- .github/PULL_REQUEST_TEMPLATE.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 5999623..cc3f71e 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,3 +1,8 @@ +# Author advertizement! + +>[!CAUTION] +Don't forget to check that the base branch for the PR is '''develop''' and not the default '''main''' branch! + ## Content You have no Jira task for this PR? Describe your changes here...