Skip to content

Conversation

sina-hide
Copy link
Contributor

Beforehand issue trackers could be defined in the repository configuration only. They were stored in the .git directory. As a consequence each SourceGit user had to configure issue trackers for himself.

Now additional issue tracker rules are read from an existing .issuetracker file (#1424). An issue tracker configured by a user has a higher priority than an issue tracker read from .issuetracker.

This allows to share issue trackers between team members.

SourceGit does not (yet?) write into the .issuetracker file. But using git config allows the user to easily construct issue tracker rules for the .issuetracker file, where even the escaping of the backslash in '#(\d+)' is done correctly.

A .issuetracker file was added to SourceGit. It was created by executing the following commands in a bash shell, where the current directory was the repository root:

cat >.issuetracker <<EOF
# Integration with Issue Tracker
#
# (note that '\' need to be escaped).

EOF
git config set --file .issuetracker issuetracker.GitHub.regex '#(\d+)'
git config set --file .issuetracker issuetracker.GitHub.url \
  'https://github.com/sourcegit-scm/sourcegit/issues/$1'

@sina-hide sina-hide force-pushed the support-.issuetracker-file branch 2 times, most recently from 33325df to ed327fd Compare July 13, 2025 00:12
Beforehand issue trackers could be defined in the repository
configuration only.  They were stored in the `.git` directory.  As a
consequence each SourceGit user had to configure issue trackers for
himself.

Now additional issue tracker rules are read from an existing
`.issuetracker` file (sourcegit-scm#1424).  An issue tracker configured by a user has
a higher priority than an issue tracker read from `.issuetracker`.

This allows to share issue trackers between team members.

SourceGit does not (yet?) write into the `.issuetracker` file.  But
using `git config` allows the user to easily construct issue tracker
rules for the `.issuetracker` file, where even the escaping of the
backslash in '#(\d+)' is done correctly.

A `.issuetracker` file was added to SourceGit.  It was created by
executing the following commands in a bash shell, where the current
directory was the repository root:

```bash
cat >.issuetracker <<EOF
# Integration with Issue Tracker
#
# (note that '\' need to be escaped).

EOF
git config set --file .issuetracker issuetracker.GitHub.regex '#(\d+)'
git config set --file .issuetracker issuetracker.GitHub.url \
  'https://github.com/sourcegit-scm/sourcegit/issues/$1'
```
@sina-hide sina-hide force-pushed the support-.issuetracker-file branch from ed327fd to 6de9147 Compare July 17, 2025 21:44
@sina-hide
Copy link
Contributor Author

I've rebased onto the current develop branch.

@love-linger
Copy link
Collaborator

I've pushed my implementation of this feature.

Now you can share issuetracker rules by enable Share this rule in .issuetracker file option

image

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