Skip to content
Closed
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/auto_merged_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Auto_PR_Mered
on:
pull_request:
permissions:
contents: write

jobs:
auto-merge-eclipse:
runs-on: ubuntu-latest
if: >
github.event.pull_request.user.login == 'cx-bot-ghinternal' &&
contains(github.event.pull_request.title, 'Eclipse Plugin Release')
steps:
- name: Checkout repository
uses: actions/checkout@v3

- name: Enable auto-merge for eligible PRs
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.ECLIPSE_SITE_TOKEN }}
run: gh pr merge --auto --squash "$PR_URL"

- name: Auto approve PRs
uses: hmarr/auto-approve-action@f0939ea97e9205ef24d872e76833fa908a770363
with:
github-token: ${{ secrets.ECLIPSE_SITE_TOKEN }}
35 changes: 35 additions & 0 deletions .github/workflows/jira-id-validation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Jira ID Validation in GH PRs or Branch Names

on:
pull_request:
types: [opened, reopened, synchronize, edited]
branches: [main, master]

concurrency:
group: jira-validation-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
validate-jira-id:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
repository: CheckmarxDev/Repository-Rules
token: ${{ secrets.GH_TOKEN }}
ref: AST-137615 # branch to test

- name: Install Dependencies
run: pip install requests

- name: Validate Jira ID
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_REPOSITORY: ${{ github.repository }}
PR_NUMBER: ${{ github.event.pull_request.number }}
BRANCH_NAME: ${{ github.head_ref }}
JIRA_USER: ${{ secrets.JIRA_EMAIL }}
JIRA_API_TOKEN: ${{ secrets.JIRA_CX_TOKEN }}
BACKDOOR_KEYWORD: ${{ secrets.BACKDOOR_KEYWORD }}
run: python scripts/jira_id_validation.py
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#
#
#
Loading