Skip to content

Commit

Permalink
Add github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
bigorn0 committed Sep 6, 2024
1 parent 29003e4 commit 7bdc744
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 0 deletions.
11 changes: 11 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -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...

...
23 changes: 23 additions & 0 deletions .github/workflows/jira_link_to_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# 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: <username>:<api token from jira>
name: jira-description-action
on:
pull_request:
types: [opened, reopened]
jobs:
add-jira-description:
runs-on: ubuntu-latest
steps:
- uses: cakeinpanic/[email protected]
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'
fail-when-jira-issue-not-found: false
34 changes: 34 additions & 0 deletions .github/workflows/notif-push-to-slack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
#https://docs.github.com/en/webhooks/webhook-events-and-payloads#push
name: notify-push
on:
push:
branches:
- develop
jobs:
notify:
runs-on: ubuntu-latest
env:
AUTHOR: ${{ github.event.pusher.name }}
COMMIT_PUSH_SOURCE: ${{ secrets.COMMIT_PUSH_SOURCE }}
steps:
- name: notify slack
id: slack
if: ${{ env.AUTHOR == env.COMMIT_PUSH_SOURCE }}
uses: slackapi/[email protected]
with:
channel-id: 'develop-direct-pushes'
payload: |
{
"text": " ${{ github.event.head_commit.url }}",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "Push: ${{ github.event.head_commit.url }}"
}
}
]
}
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
19 changes: 19 additions & 0 deletions .github/workflows/trigger-pr-tests-plugins.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Trigger PR tests (Plugins)

on:
pull_request:
types: [auto_merge_enabled]

jobs:
trigger-pr-tests-plugins:
name: Trigger PR tests (Plugins)
runs-on: ubuntu-latest
steps:
- name: Call TeamCity API endpoint
run: |
curl \
-X POST \
-H 'Authorization: Bearer ${{ secrets.TEAMCITY_TRIGGER_TESTS_TOKEN }}' \
-H 'Content-Type: application/json' \
-d '{"branchName": "pull/${{ github.event.number }}", "buildType": {"id": "${{ vars.TEAMCITY_BUILD_ID_FOR_TESTING_PLUGIN_PR }}"}}' \
${{ vars.TEAMCITY_API_URL }}/buildQueue

0 comments on commit 7bdc744

Please sign in to comment.