Skip to content

Commit 0260e0c

Browse files
committed
Prepare repository for a ownership transfer
The repository will be transferred to github.com/intra2net, so it was restructured to match the repositories of other MantisBT plugins that are already there. A Github Actions workflow has been added to automate releases.
1 parent 7956f22 commit 0260e0c

File tree

5 files changed

+96
-20
lines changed

5 files changed

+96
-20
lines changed

.github/workflows/main.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
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::ProjectNotifications-${GITHUB_REF/refs\/tags\/v/}"
19+
- name: Checkout code
20+
uses: actions/checkout@v2
21+
22+
- name: Build packages
23+
id: build_packages
24+
# before creating the archives, make sure to exclude the files we don't want.
25+
# however, leave .gitattributes uncommitted -- we want these files present in
26+
# the "source" packages generated by github when we create a tag
27+
run: |
28+
echo ".github export-ignore" >> .gitattributes
29+
git archive --worktree-attributes --format tar.gz --prefix ${{ steps.vars.outputs.product }}/ -o ./ProjectNotifications.tar.gz ${{ github.ref }}
30+
git archive --worktree-attributes --format zip --prefix ${{ steps.vars.outputs.product }}/ -o ./ProjectNotifications.zip ${{ github.ref }}
31+
- name: Create Release
32+
id: create_release
33+
uses: actions/create-release@v1
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
with:
37+
tag_name: ${{ github.ref }}
38+
release_name: Release ${{ github.ref }}
39+
draft: false
40+
prerelease: false
41+
42+
- name: Upload Release Tarball
43+
id: upload-release-tarball
44+
uses: actions/upload-release-asset@v1
45+
env:
46+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
47+
with:
48+
upload_url: ${{ steps.create_release.outputs.upload_url }}
49+
asset_path: ./ProjectNotifications.tar.gz
50+
asset_name: ${{ steps.vars.outputs.product }}.tar.gz
51+
asset_content_type: application/gzip
52+
53+
- name: Upload Release Zip
54+
id: upload-release-zip
55+
uses: actions/upload-release-asset@v1
56+
env:
57+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58+
with:
59+
upload_url: ${{ steps.create_release.outputs.upload_url }}
60+
asset_path: ./ProjectNotifications.zip
61+
asset_name: ${{ steps.vars.outputs.product }}.zip
62+
asset_content_type: application/zip

ProjectNotifications.php renamed to ProjectNotifications/ProjectNotifications.php

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
<?php
22

3-
# ProjectNotifications - a MantisBT plugin that enables customization
4-
# of e-mail notifications on a per-project basis
5-
#
6-
# You should have received a copy of the GNU General Public License
7-
# along with ProjectNotifications. If not, see <http://www.gnu.org/licenses/>.
8-
93
/**
10-
* @copyright Copyright (C) 2018 Samir Aguiar for Intra2net AG - www.intra2net.com
4+
* Project Notifications - a MantisBT plugin that adds a reply button to issues
5+
*
6+
* You should have received a copy of the GNU General Public License
7+
* along with Project Notifications. If not, see <http://www.gnu.org/licenses/>.
8+
*
9+
* @copyright Copyright (C) 2020 Intra2net AG - www.intra2net.com
1110
*/
1211

1312
require_api( 'bug_api.php' );
@@ -28,9 +27,9 @@ public function register() {
2827
"MantisCore" => "2.5.0",
2928
);
3029

31-
$this->author = "Samir Aguiar";
32-
$this->contact = "samirjaguiar@gmail.com";
33-
$this->url = "https://github.com/samiraguiar/project-notifications";
30+
$this->author = "Intra2net AG";
31+
$this->contact = "opensource@intra2net.com";
32+
$this->url = "https://github.com/intra2net/mantisbt-project-notifications";
3433
}
3534

3635
public function hooks() {
@@ -41,7 +40,7 @@ public function hooks() {
4140
}
4241

4342
/**
44-
*
43+
*
4544
* @param string $p_event_name Event name.
4645
* @param integer $p_bug_id Bug id.
4746
* @param string $p_notify_type Notification type.
@@ -67,7 +66,7 @@ public function include_users( $p_event_name, $p_bug_id, $p_notify_type ) {
6766
}
6867

6968
/**
70-
*
69+
*
7170
* @param string $p_event_name Event name.
7271
* @param string $p_notify "1" if user should be notified, false otherwise.
7372
* @param string $p_pref_field Field in the database representing this notification settings.

files/config/notification_inc.php renamed to ProjectNotifications/files/config/notification_inc.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/**
4+
* Project Notifications - a MantisBT plugin that adds a reply button to issues
5+
*
6+
* You should have received a copy of the GNU General Public License
7+
* along with Project Notifications. If not, see <http://www.gnu.org/licenses/>.
8+
*
9+
* @copyright Copyright (C) 2020 Intra2net AG - www.intra2net.com
10+
*/
11+
312
/*
413
* Notification types:
514
* +--------------------------------------------------------------------+
@@ -28,7 +37,7 @@
2837
* for those projects. Note that you also need to disable notifications
2938
* on Mantis, otherwise you'll keep receiving notifications for every
3039
* project.
31-
*
40+
*
3241
* For projects and users not set here notifications will be sent
3342
* according to Mantis' settings.
3443
*/
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
<?php
2+
3+
/**
4+
* Project Notifications - a MantisBT plugin that adds a reply button to issues
5+
*
6+
* You should have received a copy of the GNU General Public License
7+
* along with Project Notifications. If not, see <http://www.gnu.org/licenses/>.
8+
*
9+
* @copyright Copyright (C) 2020 Intra2net AG - www.intra2net.com
10+
*/
11+
12+
$s_plugin_ProjectNotifications_title = 'Project Notifications';
13+
$s_plugin_ProjectNotifications_description = 'Enable per-project notifications';

lang/strings_english.txt

Lines changed: 0 additions & 7 deletions
This file was deleted.

0 commit comments

Comments
 (0)