Skip to content

Remove the requirement for jira in opensource#29

Open
layfield-ccdc wants to merge 4 commits intomainfrom
remove-opensource-jira
Open

Remove the requirement for jira in opensource#29
layfield-ccdc wants to merge 4 commits intomainfrom
remove-opensource-jira

Conversation

@layfield-ccdc
Copy link

Better experience for external contributors

Copy link

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

Removes the Jira ID requirement for “ccdc-opensource” repositories to improve the contributor experience for external PRs.

Changes:

  • Added get_repo() to detect the current repository (owner/repo) in CI and locally.
  • Updated check_commit_msg to skip checks for opensource repos, and adjusted call sites/tests accordingly.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

main/githooks.py Outdated
Comment on lines 150 to 155
def get_repo():
'''Get the repo name in the format of "owner/repo"'''
if _is_github_event():
return os.environ['GITHUB_REPOSITORY']
else:
return _get_output(['git', 'config', '--get', 'remote.origin.url']).strip().split(':')[-1].rstrip('.git')
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

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

New behavior is introduced in get_repo() (CI vs local parsing) but there’s no unit test coverage for it. Since this file already contains unittest coverage for commit message validation, add tests for get_repo() (at least HTTPS and SSH remote formats), and also add a focused test that verifies opensource repos bypass only the Jira requirement (and still enforce file-size rules if that’s the intended policy).

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants