Skip to content

Commit 4bda0eb

Browse files
committed
New version under new name
Repository was transferred to github.com/intra2net and the plugin is now called "Note Diff". The copyright notice and other strings were fixed accordingly. The version was adjusted such that 2.0.0 corresponds to the version of the plugin that works on MantisBT v2 and a Github Actions workflow was added to generate tarballs and zip packages when tags are pushed upstream.
1 parent 2803232 commit 4bda0eb

26 files changed

+128
-41
lines changed

.github/workflows/main.yml

+64
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Create Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10
7+
8+
jobs:
9+
build:
10+
name: Create Release
11+
runs-on: ubuntu-latest
12+
steps:
13+
# `github.ref` is in the form /refs/tags/vx.x.x so we need to extract the tagname
14+
# to correctly fill asset_name (which will be the actual name for downloaded files)
15+
- name: Set variables
16+
id: vars
17+
run: |
18+
echo "::set-output name=product::NoteDiff-${GITHUB_REF/refs\/tags\/v/}"
19+
20+
- name: Checkout code
21+
uses: actions/checkout@v2
22+
23+
- name: Build packages
24+
id: build_packages
25+
# before creating the archives, make sure to exclude the files we don't want.
26+
# however, leave .gitattributes uncommitted -- we want these files present in
27+
# the "source" packages generated by github when we create a tag
28+
run: |
29+
echo ".github export-ignore" >> .gitattributes
30+
git archive --worktree-attributes --format tar.gz --prefix ${{ steps.vars.outputs.product }}/ -o ./NoteDiff.tar.gz ${{ github.ref }}
31+
git archive --worktree-attributes --format zip --prefix ${{ steps.vars.outputs.product }}/ -o ./NoteDiff.zip ${{ github.ref }}
32+
33+
- name: Create Release
34+
id: create_release
35+
uses: actions/create-release@v1
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
38+
with:
39+
tag_name: ${{ github.ref }}
40+
release_name: Release ${{ github.ref }}
41+
draft: false
42+
prerelease: false
43+
44+
- name: Upload Release Tarball
45+
id: upload-release-tarball
46+
uses: actions/upload-release-asset@v1
47+
env:
48+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49+
with:
50+
upload_url: ${{ steps.create_release.outputs.upload_url }}
51+
asset_path: ./NoteDiff.tar.gz
52+
asset_name: ${{ steps.vars.outputs.product }}.tar.gz
53+
asset_content_type: application/gzip
54+
55+
- name: Upload Release Zip
56+
id: upload-release-zip
57+
uses: actions/upload-release-asset@v1
58+
env:
59+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60+
with:
61+
upload_url: ${{ steps.create_release.outputs.upload_url }}
62+
asset_path: ./NoteDiff.zip
63+
asset_name: ${{ steps.vars.outputs.product }}.zip
64+
asset_content_type: application/zip

IssuesDiff.php renamed to NoteDiff/NoteDiff.php

+14-14
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,29 @@
11
<?php
22

3-
# IssuesDiff - a MantisBT plugin that adds a visual diff between revisions
4-
#
5-
# You should have received a copy of the GNU General Public License
6-
# along with IssuesDiff. If not, see <http://www.gnu.org/licenses/>.
3+
/**
4+
* Note Diff - a MantisBT plugin to diff revisions of notes and issue descriptions
5+
*
6+
* You should have received a copy of the GNU General Public License
7+
* along with Note Diff. If not, see <http://www.gnu.org/licenses/>.
8+
*
9+
* @copyright Copyright (C) 2020 Intra2net AG - www.intra2net.com
10+
*/
711

8-
/**
9-
* @copyright Copyright (C) 2017 Samir Aguiar for Intra2net AG - www.intra2net.com
10-
*/
11-
12-
class IssuesDiffPlugin extends MantisPlugin {
12+
class NoteDiffPlugin extends MantisPlugin {
1313

1414
public function register() {
1515
$this->name = plugin_lang_get("title");
1616
$this->description = plugin_lang_get("description");
1717
$this->page = '';
1818

19-
$this->version = "1.1";
19+
$this->version = "2.0.0";
2020
$this->requires = array(
21-
"MantisCore" => "2.5.0",
21+
"MantisCore" => "2.1.0",
2222
);
2323

24-
$this->author = "Samir Aguiar";
25-
$this->contact = "samirjaguiar@gmail.com";
26-
$this->url = "https://github.com/samiraguiar/issues-diff";
24+
$this->author = "Intra2net AG";
25+
$this->contact = "opensource@intra2net.com";
26+
$this->url = "https://github.com/intra2net/mantisbt-note-diff";
2727
}
2828

2929
public function hooks() {

files/css/diff_style.css renamed to NoteDiff/files/css/diff_style.css

+12-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
/**
2+
* Note Diff - a MantisBT plugin to diff revisions of notes and issue descriptions
3+
*
4+
* You should have received a copy of the GNU General Public License
5+
* along with Note Diff. If not, see <http://www.gnu.org/licenses/>.
6+
*
7+
* @copyright Copyright (C) 2020 Intra2net AG - www.intra2net.com
8+
*/
9+
110
form.diff-form select {
211
position: relative;
312
top: 1;
@@ -7,18 +16,18 @@ form.diff-form input.diff-form-submit {
716
position: relative;
817
}
918

10-
.issue-diff-area {
19+
.note-diff-area {
1120
background-color: #F9F9F9;
1221
}
1322

14-
form.diff-form .issue-diff-separator {
23+
form.diff-form .note-diff-separator {
1524
font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, Courier, monospace;
1625
padding: 10% 0;
1726
left: 2;
1827
position: relative;
1928
}
2029

21-
.issue-diff-area tr td.Right {
30+
.note-diff-area tr td.Right {
2231
text-align: left;
2332
}
2433

files/js/add_diff_view_link.js renamed to NoteDiff/files/js/add_diff_view_link.js

+9
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
1+
/**
2+
* Note Diff - a MantisBT plugin to diff revisions of notes and issue descriptions
3+
*
4+
* You should have received a copy of the GNU General Public License
5+
* along with Note Diff. If not, see <http://www.gnu.org/licenses/>.
6+
*
7+
* @copyright Copyright (C) 2020 Intra2net AG - www.intra2net.com
8+
*/
9+
110
(function() {
211
var baseAnchor = document.getElementById("view-diff-anchor");
312
var diffPageUrl = baseAnchor.getAttribute('data-base-href');

NoteDiff/lang/strings_english.txt

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
<?php
2+
3+
/**
4+
* Note Diff - a MantisBT plugin to diff revisions of notes and issue descriptions
5+
*
6+
* You should have received a copy of the GNU General Public License
7+
* along with Note Diff. If not, see <http://www.gnu.org/licenses/>.
8+
*
9+
* @copyright Copyright (C) 2020 Intra2net AG - www.intra2net.com
10+
*/
11+
12+
$s_plugin_NoteDiff_title = 'Note Diff';
13+
$s_plugin_NoteDiff_description = 'Shows a visual diff between issues revisions';
14+
$s_plugin_NoteDiff_menu_title = 'View Diff';
15+
$s_plugin_NoteDiff_revision_range= 'Revision range';
16+
$s_plugin_NoteDiff_diff= 'Diff';
17+
$s_plugin_NoteDiff_view= 'View';

pages/bug_revision_diff_page.php renamed to NoteDiff/pages/bug_revision_diff_page.php

+7-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
<?php
2-
# IssuesDiff - a MantisBT plugin that adds a visual diff between revisions
3-
#
4-
# You should have received a copy of the GNU General Public License
5-
# along with IssuesDiff. If not, see <http://www.gnu.org/licenses/>.
62

73
/**
8-
* @copyright Copyright (C) 2017 Samir Aguiar for Intra2net AG - www.intra2net.com
4+
* Note Diff - a MantisBT plugin to diff revisions of notes and issue descriptions
95
*
10-
* Parts of this code were taken from MantisBT `bug_revision_view_page.php`.
6+
* You should have received a copy of the GNU General Public License
7+
* along with Note Diff. If not, see <http://www.gnu.org/licenses/>.
8+
*
9+
* @copyright Copyright (C) 2020 Intra2net AG - www.intra2net.com
1110
*/
1211

1312
require_once( 'core.php' );
@@ -138,7 +137,7 @@ function show_diff($t_prev_revision, $t_last_revision)
138137
echo $t_label . ' ' . plugin_lang_get('diff');
139138
?>
140139
</th>
141-
<td colspan="3" class="issue-diff-area">
140+
<td colspan="3" class="note-diff-area">
142141
<?php
143142
echo $diff->render($renderer);
144143
?>
@@ -233,7 +232,7 @@ function get_options_list($revisions, $selected_id) {
233232
<select name="prev">
234233
<?php echo get_options_list($t_bug_revisions, $previous_rev_id); ?>
235234
</select>
236-
<span class="issue-diff-separator"> ... </span>
235+
<span class="note-diff-separator"> ... </span>
237236
<select name="last">
238237
<?php
239238
reset($t_bug_revisions);

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# MantisBT Issues Diff
2-
MantisBT Plugin to get a visual diff between issues revisions.
1+
# MantisBT Note Diff
2+
MantisBT Plugin to get a visual diff between the revisions of a note or an issue description.
33

44
### For MantisBT v2
5-
![issues_diff_plugin_v2](http://i.imgur.com/ZVfeFLt.png)
5+
![note_diff_plugin_v2](http://i.imgur.com/ZVfeFLt.png)
66

77
### For MantisBT v1
8-
![issues diff plugin_v1](http://i.imgur.com/STu5oHB.png)
8+
![note_diff plugin_v1](http://i.imgur.com/STu5oHB.png)
99

10-
Copyright (C) 2017 Samir Aguiar for Intra2net AG - www.intra2net.com
10+
Copyright (C) 2020 Intra2net AG - www.intra2net.com

lang/strings_english.txt

-11
This file was deleted.

0 commit comments

Comments
 (0)