Skip to content

PDP-473: Create pr-workflow.yaml #202

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

Conversation

SameeraPriyathamTadikonda
Copy link
Contributor

No description provided.

@Copilot Copilot AI review requested due to automatic review settings June 6, 2025 22:48
Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

Adds a new GitHub Actions workflow to enforce JIRA ticket IDs in pull request titles by invoking a centralized reusable workflow.

  • Introduce .github/workflows/pr-workflow.yaml defining a pull_request_target–triggered job.
  • Leverage marklogic/pr-workflows reusable workflow for JIRA ID validation.
  • Pass the PR title as input to the reusable workflow.


on:
# Using pull_request_target instead of pull_request to handle PRs from forks
pull_request_target:
Copy link
Preview

Copilot AI Jun 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using pull_request_target grants the workflow elevated permissions on forked PRs. Consider adding a minimal permissions block to restrict GITHUB_TOKEN scopes to only what's needed (e.g., read-only for pull requests) to reduce security risks.

Copilot uses AI. Check for mistakes.

jira-pr-check:
name: 🏷️ Validate JIRA ticket ID
# Use the reusable workflow from the central repository
uses: marklogic/pr-workflows/.github/workflows/jira-id-check.yml@main
Copy link
Preview

Copilot AI Jun 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pin the reusable workflow reference to a specific tag or commit SHA instead of @main to ensure reproducible runs and avoid unexpected changes when the central repo updates.

Suggested change
uses: marklogic/pr-workflows/.github/workflows/jira-id-check.yml@main
uses: marklogic/pr-workflows/.github/workflows/jira-id-check.yml@v1.2.3

Copilot uses AI. Check for mistakes.

@@ -0,0 +1,16 @@
name: 🏷️ JIRA ID Validator

on:
Copy link
Preview

Copilot AI Jun 6, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider adding a concurrency stanza at the workflow level to cancel in-progress runs for the same PR (e.g., concurrency: { group: 'pr-${{ github.event.pull_request.number }}', cancel-in-progress: true }), preventing overlapping validations.

Copilot uses AI. Check for mistakes.

@SameeraPriyathamTadikonda SameeraPriyathamTadikonda merged commit a778d27 into marklogic:develop Jun 9, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants