Skip to content
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

Upgrade DSpace to CLARIN-DSpace #1118

Merged
merged 274 commits into from
Jun 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
274 commits
Select commit Hold shift + click to select a range
12834c6
Rename in project columns: To do -> Backlog
MajoBerger Apr 21, 2022
ff9707b
only run on pushes to main
MajoBerger Apr 21, 2022
8f5a401
PRs should not be in project
MajoBerger Apr 21, 2022
f3af9e6
Created README-dtq.md
Apr 11, 2022
5cfc3da
Created approximateDate local metadata type.
Apr 4, 2022
4d2b3f5
Added test to check existing metadata but doesn't works right
Apr 7, 2022
42eaf5c
Created test for added local metadata if exists.
Apr 11, 2022
994761d
Update ItemTest.java
milanmajchrak Apr 11, 2022
c70bdee
update issue assign action with new token
MajoBerger Apr 25, 2022
e13461e
upload github workflows - build and publish images on dtq-dev-present…
MajoBerger May 10, 2022
e4451c7
Created ACL and ACE classes
Apr 20, 2022
b5796a9
ACL works - input field with ACL are rendered based on the authorizat…
Apr 21, 2022
ebff198
Created tests for ACL
Apr 21, 2022
7ab8d30
Fixed checkstyle issues
Apr 21, 2022
96afe92
Remove unnecessary methods
Apr 21, 2022
8e8bbd6
Authorization based on groups works and done some refactoring.
Apr 22, 2022
5aa63ac
Added authors
Apr 22, 2022
47e425e
Fixed review issues
Apr 29, 2022
e1608e0
Fixed checkstyle issues
Apr 29, 2022
430fe78
Removed unsused acl definition in the input field
Apr 29, 2022
5a39ede
added missing lib to the Dockerfile.cli
Jun 13, 2022
e62761e
fixed adding of missing lib to the Dockerfile.cli
Jun 13, 2022
a404666
fixed harvester dependencies
Jun 14, 2022
5f409a1
removed xalan.jar from dspace/lib folder
Jun 14, 2022
c4039d3
removed xalan dependency duplicities
Jun 14, 2022
be21756
Changed upload file size to 3GB
Jun 1, 2022
07d62fd
Created a new local type and added a new input field for the bitstrea…
Jun 2, 2022
585ae2b
The file is loaded from the tomcat /temp and updated as bitstream
Jun 3, 2022
f302c2d
uploadFileFromURL must be in the end of the patch method because the …
Jun 3, 2022
e3cf85d
fixed checkstyle violation
Jun 3, 2022
24449f3
created test uploadFileBiggerThanUploadFileSizeLimit
Jun 3, 2022
3c65245
created test uploadFileBiggerThanUploadFileSizeLimit
Jun 6, 2022
a12ba1e
Remvoed checkstyle violations
Jun 6, 2022
2806dae
Added docs
Jun 6, 2022
cf38565
Added empty row
Jun 6, 2022
ce24bea
remove unsued dependency from pom
Jun 6, 2022
adfe987
refacroting
Jun 6, 2022
acc4363
Done requested changes
Jun 28, 2022
f68c363
fixed checkstyle violations
Jun 28, 2022
d06ec2c
Added build scripts
Jun 28, 2022
1354c12
don't hold local paths in repo, better names for build scripts
MajoBerger Jun 29, 2022
0305727
fix last
MajoBerger Jun 29, 2022
9bc9f8e
updated script names
Jun 30, 2022
1dca181
Separated config files, reverted dspace.cfg to original, introduced c…
MajoBerger Jul 8, 2022
360e8ee
For some items the date of creation is unknown or in date range.
milanmajchrak Jul 13, 2022
0b3ad24
Show funding suggestions for EU projects - openAIRE and non-EU projec…
milanmajchrak Jul 14, 2022
2ea9930
Internal/generate bat for tests (#94)
MajoBerger Jul 15, 2022
02ec261
dispatch images build
MajoBerger Jul 18, 2022
9561c1a
feature/se-2-type-bind-upstream. Copied from DSpace - 7.3.
milanmajchrak Jul 25, 2022
db27268
feature/se-11-improvements-after-testing changed configuration file, …
milanmajchrak Aug 1, 2022
b18b695
feature/se-9-upload-CMDI upload the cmdi file to the METADATA bundle
milanmajchrak Aug 1, 2022
32aec65
Load files from METADATA bundle in the removing file.
milanmajchrak Aug 3, 2022
841f4c2
feature/se-4-autocomplete-bad-behavior update solr queries if the sea…
milanmajchrak Aug 4, 2022
17e301f
feature/se-6-non-eu-funds-not-suggested MetadataValueRestRepository s…
milanmajchrak Aug 9, 2022
abb3734
fixed generating proper unit tests (#129)
MajoBerger Aug 11, 2022
9c8a2a2
internal/upgrade-building-script (#109)
Paurikova2 Aug 16, 2022
bea40f8
feature/pid-7-tombstone added metadata and changed Converter
milanmajchrak Aug 18, 2022
191ebed
added nginx redirect and instructions to wiki (#110)
MajoBerger Aug 22, 2022
48271d9
Using dataquest, not dspace image as a base
MajoBerger Aug 30, 2022
c2ed9b7
added MP to PR templates
MajoBerger Aug 31, 2022
786e641
skip overwrite prompt in our script
MajoBerger Sep 6, 2022
b26c133
United/clarin oai formats cmdi, olac, oai extensions,..
MajoBerger Sep 14, 2022
c48e264
feature/pid-4-config-handle-for-communities waiting for EPIC consort…
milanmajchrak Sep 19, 2022
8abf8d1
feature/pid-5-manage-handle-table handle administration, change globa…
Paurikova2 Sep 21, 2022
2b68fcf
Feature/pid-5-manage-handle-table-errors-correction (#155)
Paurikova2 Oct 3, 2022
f53a47c
feature/pid-5-fixed-handle-table-pagination (#158) and sorting
milanmajchrak Oct 4, 2022
7492d84
feature/dtq-dev-lf (#161) licensing framework
milanmajchrak Dec 2, 2022
06cbc33
internal/fix-lf-checkstyle-issues (#176)
milanmajchrak Jan 2, 2023
064e09f
internal/fix-failing-unit-test - wrong unit test
milanmajchrak Jan 4, 2023
38877c7
feature/aai-6-federated-login (#166) discojuice
milanmajchrak Jan 7, 2023
d437ad6
feature/aai-2-missing-idp-headers (#169)
milanmajchrak Jan 7, 2023
8dbd871
feature/laf-1-ref-box (#179)
milanmajchrak Jan 19, 2023
c61e595
feature/aai-1-federated-sso-groups (#170) the user is added to the gr…
milanmajchrak Jan 20, 2023
2abad82
feature/stat-1-create-api-track-events (#182) track the statistics - …
milanmajchrak Jan 24, 2023
4ebb567
internal/add-bibtex-crosswalk (#183)
MajoBerger Jan 30, 2023
d729267
Add property for the cache-server (#189) cache-server cfg property
milanmajchrak Jan 30, 2023
6634828
Update core-services.xml (#191) Changed Matomo tracker URL to `http:/…
milanmajchrak Jan 30, 2023
a847713
Updated yml for matomo docker compose
milanmajchrak Jan 31, 2023
0e8375b
Changed Matomo Tracker Auth Token
milanmajchrak Jan 31, 2023
3b1bc78
feature/laf-2-oai-update-after-db-change (#184) create, delete, updat…
MajoBerger Jan 31, 2023
03a0fce
feature/lf-4-import-license (#186) with python api
Paurikova2 Feb 1, 2023
877cc21
feature/laf-4-item-new-version (#177) new version of the Item has spe…
milanmajchrak Feb 2, 2023
970de39
Customize CLARIN-DSpace search facets. (#203)
milanmajchrak Feb 13, 2023
71e503f
Changed files to update DSPace to version 7.2.1 (#205) updated pom.xm…
milanmajchrak Feb 13, 2023
eb40d60
Internal discoveryrestcontrollerit tests are failing (#208) dateIssue…
milanmajchrak Feb 15, 2023
a22e534
internal/fixed-tracking-of-the-Solr-statistics. (#199) pulled code fr…
milanmajchrak Feb 16, 2023
8a0e06f
fixing-review-errors-1 (#211) ACL - component annotation, wrong issue…
milanmajchrak Feb 16, 2023
842fd38
fixed granting of the license
milanmajchrak Feb 20, 2023
d0ebf00
internal/missing-sending-of-email-with-token (#213)
milanmajchrak Feb 20, 2023
ce87fa2
expose port for remote debugging
MajoBerger Feb 22, 2023
cdc951f
updated scripts for debug access
MajoBerger Feb 23, 2023
2f80a4a
added execution permission
MajoBerger Feb 23, 2023
1c8befc
modified debug checking and starting
MajoBerger Feb 23, 2023
525525e
forgotten file for custom run
MajoBerger Feb 23, 2023
bb5ceb3
forgotten permissions as well
MajoBerger Feb 23, 2023
f274853
removal of useless comment
MajoBerger Mar 16, 2023
a5c0567
Updated database model following the new requirements from migration.…
milanmajchrak Apr 17, 2023
fed5608
migration2clarin7/notice-step-is-missing (#231)
milanmajchrak Apr 25, 2023
0bebdc4
migrate2clarin7/authors-name-surname-autocomplete (#235)
milanmajchrak Apr 25, 2023
fa0c279
migration2clarin7/fix different separator in crosswalks and added met…
milanmajchrak Apr 26, 2023
f61dff7
70-BE/license-page-missing-pagination-sorting (#250)
milanmajchrak Apr 28, 2023
23d8cb9
64-BE/user could see withdrawn items copied some code from vanilla (#…
milanmajchrak May 2, 2023
bdd9575
Added doc (#260)
milanmajchrak May 3, 2023
6b58fa8
93BE/hide-some-metadata-fields-from-full-item-page (#258)
milanmajchrak May 3, 2023
63c9de3
internal/migrate-clarin-dspace5-to-clarin-dspace7-continue (#220)
Paurikova2 May 3, 2023
9184158
96-BE/update-readme-with-issues (#264)
milanmajchrak May 3, 2023
734edc2
internal-BE/fix-failing-integration-tests (#268)
milanmajchrak May 3, 2023
4e02383
102-BE/cannot-read-big-file-by-readAllBytes (#277)
Paurikova2 May 11, 2023
4242438
103-be/shibboleth-login-wrong-error-page (#279)
milanmajchrak May 15, 2023
4e399a7
105-be/user-is-not-registered-after-shibboleth-login (#281)
milanmajchrak May 17, 2023
5954c65
88-BE/license-labels-are-missing-icons (#273)
Paurikova2 May 18, 2023
69d9602
110-be/imported-item-should-not-regenerate-certain-metadata-fields (#…
milanmajchrak May 22, 2023
4db7d05
Changed logging (#286)
milanmajchrak May 25, 2023
d4e0703
116 be/deleted bitstreams cannot be imported (#296)
milanmajchrak Jun 1, 2023
d8fca54
80-BE/import-tasklistitem (#300)
Paurikova2 Jun 2, 2023
4a750e4
throw exception soon and explain better (#308)
MajoBerger Jun 6, 2023
ea6b948
added commit (#306)
Paurikova2 Jun 14, 2023
8a30911
87-BE/adding-missing-attributes (#303)
Paurikova2 Jun 14, 2023
938084a
119-BE/remove-validation-of-deleted-bitstreams (#302)
Paurikova2 Jun 14, 2023
9fe1b52
added mvn argument fail-at-end (#319)
MajoBerger Jun 19, 2023
624378c
75-BE/missing-handles (#314)
Paurikova2 Jun 21, 2023
9455cf8
122-be/restricted-item-download-issues (#331)
milanmajchrak Jun 21, 2023
35606c5
Be/fixed bitstreams added user metadata (#295)
milanmajchrak Jun 21, 2023
30731a4
Removed not defined search options. (#337)
milanmajchrak Jun 22, 2023
19b1b0b
browse - Updated IT according to updated cfg (#339)
milanmajchrak Jun 22, 2023
8a835fb
add redeploy to dev-5 -> curl call to deploy action
MajoBerger Jun 30, 2023
4edb414
correct redeploy branch in github action
MajoBerger Jun 30, 2023
2dda27e
trigger docker images on correct branch
MajoBerger Jul 6, 2023
147a657
disable dspace v 7.2 on dev-5
MajoBerger Jul 21, 2023
ae542da
Upgrade CLARIN-DSpace to 7.5 (#344)
milanmajchrak Aug 4, 2023
69363f8
tul/merge-into-clarin-dspace (#402)
milanmajchrak Aug 8, 2023
45f843b
data-pump/update-non-migrated-tables (#403)
milanmajchrak Aug 10, 2023
f6f3609
ufal/be-date-duplicate-metadata-value (#416)
milanmajchrak Aug 11, 2023
a0bec7b
ufal/be-hidden-items-should-not-be-seen (#415)
milanmajchrak Aug 11, 2023
836cc10
ufal/be-add-missing-fileextension (#414)
milanmajchrak Aug 11, 2023
598b32a
Update issue assign to new project
MajoBerger Aug 21, 2023
cbf1d26
ufal/update-index-for-language (#424)
milanmajchrak Sep 4, 2023
ae5f901
internal/be-shibboleth-missing-headers-wrong-redirection
milanmajchrak Sep 4, 2023
956617c
ufal/be-wrong-citation-author-sequence (#417)
milanmajchrak Sep 4, 2023
c28b7b4
ufal/be-netid-not-to-be-mandatory
milanmajchrak Sep 4, 2023
9bb944d
added indexing scripts to docker image (#422)
MajoBerger Sep 5, 2023
7e8a63e
internal/update-localcfg-example
milanmajchrak Sep 6, 2023
a21ac02
internal/epic-pid-service-never-called (#431)
milanmajchrak Sep 12, 2023
6407922
ufal/be-confidence-authority-not-imported (#438)
milanmajchrak Sep 21, 2023
1e375a5
Ufal be/handleserver fix (#446)
MajoBerger Sep 28, 2023
ea73dc9
redeploy after build image
MajoBerger Sep 28, 2023
c778021
ufal/be-user_metadata-wrong-import (#440)
milanmajchrak Sep 28, 2023
2739872
WHY NULL OH NO (#448)
MajoBerger Sep 29, 2023
333930d
ufal/be-collection2item-table-is-not-migrated (#439)
milanmajchrak Oct 3, 2023
4c8a27a
ufal/be-22-54-download-preview-item (#444)
milanmajchrak Oct 4, 2023
19a3b84
ufal/be-find-item-by-handle
milanmajchrak Oct 27, 2023
4b46f4f
ufal/be-generate-preview-for-html
milanmajchrak Oct 30, 2023
3480d91
ufal/downloading-restricted-bitstreams-not-working-properly (#457)
milanmajchrak Nov 15, 2023
4a8f511
ufal/be-cannot-download-and-preview-files-after-migration (#454)
milanmajchrak Nov 15, 2023
bc1d68d
ufal/update-canonical-prefix-to-hdl (#460)
milanmajchrak Nov 23, 2023
ff9fbda
ufal/be-user-registration-missing (#463)
milanmajchrak Dec 1, 2023
9c72798
ufal/be-license-download-statistics (#462)
milanmajchrak Dec 1, 2023
ad81482
ufal/be-shibboleth-headers-encoding (#464)
milanmajchrak Dec 6, 2023
e59b393
using our dspace-dependencies
MajoBerger Dec 6, 2023
7401c08
ufal/be-fix-email-parameters
milanmajchrak Dec 13, 2023
f30d78a
ufal/be-provenance-subbmitter-missing (#469)
milanmajchrak Dec 13, 2023
51868b2
ufal/be-get-user-ip-address (#468)
milanmajchrak Dec 14, 2023
00b3671
ufal/publisher-ok-fix (#473)
milanmajchrak Dec 14, 2023
ddb5c93
ufal/zip-preview-configurable (#475)
milanmajchrak Dec 15, 2023
c53bc5f
ufal/fe-oversized-file-upload-message
milanmajchrak Dec 15, 2023
7c2b3ff
ufal/be-email-restricted-download
milanmajchrak Dec 21, 2023
2c1eea8
ufal/be-not-show-shib-welcome-page (#485)
milanmajchrak Dec 21, 2023
444f8ba
ufal/be-s3-customization (#481)
milanmajchrak Dec 21, 2023
8a21ff1
ufal/be-s3-checker-sync (#486)
milanmajchrak Dec 22, 2023
9a45f30
internal/load-version-from-file (#488)
milanmajchrak Jan 3, 2024
5535c3b
ufal/be-s3-checksum-fix (#487)
milanmajchrak Jan 3, 2024
8cb3088
internal/versioning (#491)
milanmajchrak Jan 5, 2024
708d795
ufal/comment-ever-failing-test
milanmajchrak Jan 5, 2024
d05d076
internal/verion-update-path (#492)
milanmajchrak Jan 8, 2024
f14ff76
internal/be-upgrade-clarin-dspace-7.6 (#497)
milanmajchrak Jan 27, 2024
9b2c6bc
Update docker.yml (#502)
milanmajchrak Jan 27, 2024
f79072a
Update docker.yml (#503)
milanmajchrak Jan 27, 2024
b57060a
Update docker.yml (#504)
milanmajchrak Jan 27, 2024
b4b0b1e
The cas.init() method is called in the VocabularyRestRepositoryIT#set…
milanmajchrak Jan 27, 2024
4b97947
Empty commit - run actions
milanmajchrak Jan 29, 2024
10d3f5e
use checkstyle before commit
Jan 29, 2024
a7d9a72
remove fix duplicate dependency
Feb 2, 2024
0a0e4cb
remove discofeed related fetching from obsolete discojuice servers (#…
vidiecan Feb 9, 2024
d677c52
ufal/cannot-upload-big-file (#533)
milanmajchrak Feb 12, 2024
7ad5ce0
ufal/license-agreement-wrong-behaviour (#534)
milanmajchrak Feb 15, 2024
4fbdc85
internal/discofeed-it (#535)
milanmajchrak Feb 15, 2024
d3dc661
allow running from branch rework-actions for testing
MajoBerger Feb 21, 2024
1c03d77
ufal/s3-check-etag (#537)
milanmajchrak Feb 21, 2024
4904678
ufal/allow-impersonating
milanmajchrak Feb 22, 2024
de883a6
correct branches for main gh actions
MajoBerger Feb 22, 2024
4bfd4a5
Rework actions (#540)
MajoBerger Feb 23, 2024
f07b789
extend possibilities for using version script (#542)
MajoBerger Feb 26, 2024
9d650d9
Fix all mistakes in the /home page (#543)
milanmajchrak Feb 27, 2024
ab6235e
reusable run provides links to run and it's ID
MajoBerger Feb 29, 2024
7f871fd
first attempt at tag release action
MajoBerger Feb 29, 2024
a31a367
also release images under github.sha
MajoBerger Feb 29, 2024
a570122
Improve version info, add release-tag action
MajoBerger Mar 1, 2024
ab780ae
add necessary option to tag-action
MajoBerger Mar 1, 2024
f708930
Fixed all mistakes in the Item View page (#551)
milanmajchrak Mar 14, 2024
8a35ae8
Fixed all mistakes in the Search page (#549)
milanmajchrak Mar 15, 2024
e98a095
Use `dc.contributor.other` metadata field for mapping the authors (#557)
milanmajchrak Mar 18, 2024
8bb213b
Added `edm.xml` registry (#559)
milanmajchrak Mar 18, 2024
d6ebf39
Updated shibboleth cfg properties (firstname, lastname, netid, email)…
milanmajchrak Mar 18, 2024
3623fd8
during release, retag cli image as well
MajoBerger Mar 21, 2024
76b1644
Recent submissions are loaded on the collection page. (#567)
milanmajchrak Mar 25, 2024
7b39246
Disabled showing `Accesioned sort option` by cfg (#568)
milanmajchrak Mar 26, 2024
d336845
Turned off signposting (#571)
milanmajchrak Mar 28, 2024
46afa35
Show all values for the Subject facet in the search page. (#569)
milanmajchrak Mar 28, 2024
f1f7818
Updated interpolation of Subject following the update from 7.6.1 (#620)
milanmajchrak Apr 11, 2024
d736a2b
use true, for cmdi crosswalk (#629)
MajoBerger Apr 11, 2024
c1cc5fc
migrate DIM2DataCite v4.5
MajoBerger Apr 17, 2024
d288e27
Updated `submission-forms.xml` following actual v5 `input-forms.xml` …
milanmajchrak Apr 23, 2024
83c6ef7
Added czech translation of submission-forms.xml (#636)
milanmajchrak Apr 23, 2024
841364b
Added a new log4j appender for logging file downloads into `file_down…
milanmajchrak Apr 23, 2024
3ec4d52
remove TUL references in code
MajoBerger Apr 23, 2024
3fd82e7
Synchronized spider config with ufal (#635)
milanmajchrak Apr 23, 2024
04e352f
The max file preview size is loaded from the cfg (#630)
milanmajchrak Apr 24, 2024
d2cfdf0
Added email validation and input/output encodings are loaded from the…
milanmajchrak Apr 25, 2024
590ad0e
Revert "Added email validation and input/output encodings are loaded …
milanmajchrak Apr 25, 2024
99e626c
load matomo url from cfg
MajoBerger Apr 29, 2024
13b2970
forgotten remove comment
MajoBerger Apr 30, 2024
7380d46
Reserve PID on the start of the submission. (#649)
milanmajchrak May 6, 2024
ad215e3
Upload big file differencies (#647)
milanmajchrak May 6, 2024
b229269
Updated indexing of the hidden Item for the OAI-PMH (#650)
milanmajchrak May 7, 2024
b5026dd
Send Authorization request if the User is not allowed to see restrict…
milanmajchrak May 7, 2024
43ce03a
Shibboleth login - Added email validation (#644)
milanmajchrak May 7, 2024
195fc75
Show Download all as ZIP button only when all conditions are met (#641)
milanmajchrak May 8, 2024
d6de6b1
fix problems displaying oai in various formats (#653)
MajoBerger May 13, 2024
d71e927
Set up dtoken for every bitstream of the zip file. (#652)
milanmajchrak May 13, 2024
2e8c525
Updated xoai.xml - changed filters, conditions, refactored (#631)
milanmajchrak May 13, 2024
3242faf
The bitstreams cannot be seen after the item is created (#657)
milanmajchrak May 16, 2024
15b836f
prevent empty argument errors (#655)
MajoBerger May 17, 2024
f9532cd
Edit Item's license (#654)
milanmajchrak May 20, 2024
3976a57
Changed DOI identifier to `dc.identifier.doi` (#661)
milanmajchrak May 20, 2024
26296a7
Complex input field issues (#651)
milanmajchrak May 20, 2024
ccd8dcb
Fixed the importing of the Item - if the Item has pre-registered PID …
milanmajchrak May 20, 2024
b7c28a9
local-typex differencies (#660)
milanmajchrak May 21, 2024
b2a8421
Ufal/add olac description (#662)
MajoBerger May 22, 2024
02d6655
add elg format (#658)
MajoBerger May 22, 2024
e3c8472
The Item should not be exposed by the OAI
milanmajchrak May 23, 2024
ca5c92b
Fix not exposing the Item by the OAI (#667)
milanmajchrak May 24, 2024
00456dc
add extra appender for warns (#668)
MajoBerger May 24, 2024
1d683d9
Update Item's date metadata - do not remove dc.date.issued (#669)
milanmajchrak May 30, 2024
fe7192b
Fix encoding problems in refbox endpoint (#670)
MajoBerger May 31, 2024
225d92d
solr log modification (#671)
MajoBerger May 31, 2024
63d5434
Cherry picked and resolved conflicts. The submission-forms.xml and it…
milanmajchrak Jun 3, 2024
55444f5
The submission cz translation has the same required fields than the e…
milanmajchrak Jun 6, 2024
254ab5d
added cesilko cmdi file that works well (#676)
MajoBerger Jun 7, 2024
9349a9a
Internal/synchro test (#678)
MajoBerger Jun 19, 2024
b89eb6f
Fetched right files from origin/dtq-dev
milanmajchrak Jun 19, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
22 changes: 0 additions & 22 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

20 changes: 0 additions & 20 deletions .github/ISSUE_TEMPLATE/feature_request.md

This file was deleted.

10 changes: 10 additions & 0 deletions .github/actions/project-management-action/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Container image that runs your code
FROM alpine:3.10

RUN apk add --no-cache --no-progress curl jq

# Copies your code file from your action repository to the filesystem path `/` of the container
COPY entrypoint.sh /entrypoint.sh
RUN chmod 777 /entrypoint.sh
# Code file to execute when the docker container starts up (`entrypoint.sh`)
ENTRYPOINT ["/entrypoint.sh"]
21 changes: 21 additions & 0 deletions .github/actions/project-management-action/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2019 Sergio Pintaldi

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
132 changes: 132 additions & 0 deletions .github/actions/project-management-action/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
# GitHub Action for Assign to One Project

[![Docker Cloud Automated build](https://img.shields.io/docker/cloud/automated/srggrs/assign-one-project-github-action)][docker]
[![Docker Cloud Build Status](https://img.shields.io/docker/cloud/build/srggrs/assign-one-project-github-action)][docker]
[![Docker Pulls](https://img.shields.io/docker/pulls/srggrs/assign-one-project-github-action)][docker]
[![GitHub license](https://img.shields.io/github/license/srggrs/assign-one-project-github-action.svg)][license]
![Latest Version](https://img.shields.io/github/v/release/srggrs/assign-one-project-github-action?color=orange&label=latest%20release)

[docker]: https://hub.docker.com/r/srggrs/assign-one-project-github-action
[license]: https://github.com/srggrs/assign-one-project-github-action/blob/master/LICENSE

Automatically add an issue or pull request to specific [GitHub Project](https://help.github.com/articles/about-project-boards/) when you __create__ and/or __label__ them. By default, the issues are assigned to the __`To do`__ column and the pull requests to the __`In progress`__ one, so make sure you have those columns in your project dashboard. But the workflow __allowed you to specify the column name as input__, so you can assign the issues/PRs based on a set of conditions to a specific column of a specific project.

## Latest features:

* included `issue_comment` as trigger for this action.
* added project pagination for searching 100+ GitHub projects.

## Acknowledgment & Motivations

This action has been modified from the original action from [masutaka](https://github.com/masutaka/github-actions-all-in-one-project). I needed to fix it as the original docker container would not build. Also I think the GitHub Action syntax changed a bit.

I would like to thank @SunRunAway for adding the labelling functionality and custom column input.

## Inputs

### `project`

**Required** The url of the project to be assigned to.

### `column_name`

The column name of the project, defaults to `'To do'` for issues and `'In progress'` for pull requests.

## Example usage

Examples of action:

### Repository project

```yaml
name: Auto Assign to Project(s)

on:
issues:
types: [opened, labeled]
pull_request:
types: [opened, labeled]
issue_comment:
types: [created]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

jobs:
assign_one_project:
runs-on: ubuntu-latest
name: Assign to One Project
steps:
- name: Assign NEW issues and NEW pull requests to project 2
uses: srggrs/[email protected]
if: github.event.action == 'opened'
with:
project: 'https://github.com/srggrs/assign-one-project-github-action/projects/2'

- name: Assign issues and pull requests with `bug` label to project 3
uses: srggrs/[email protected]
if: |
contains(github.event.issue.labels.*.name, 'bug') ||
contains(github.event.pull_request.labels.*.name, 'bug')
with:
project: 'https://github.com/srggrs/assign-one-project-github-action/projects/3'
column_name: 'Labeled'
```

#### __Notes__
Be careful of using the conditions above (opened and labeled issues/PRs) because in such workflow, if the issue/PR is opened and labeled at the same time, it will be assigned to __both__ projects!


You can use any combination of conditions. For example, to assign new issues or issues labeled with 'mylabel' to a project column, use:
```yaml
...

if: |
github.event_name == 'issues' &&
(
github.event.action == 'opened' ||
contains(github.event.issue.labels.*.name, 'mylabel')
)
...
```

### Organisation or User project

Generate a token from the Organisation settings or User Settings and add it as a secret in the repository secrets as `MY_GITHUB_TOKEN`

```yaml
name: Auto Assign to Project(s)

on:
issues:
types: [opened, labeled]
pull_request_target:
types: [opened, labeled]
issue_comment:
types: [created]
env:
MY_GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }}

jobs:
assign_one_project:
runs-on: ubuntu-latest
name: Assign to One Project
steps:
- name: Assign NEW issues and NEW pull requests to project 2
uses: srggrs/[email protected]
if: github.event.action == 'opened'
with:
project: 'https://github.com/srggrs/assign-one-project-github-action/projects/2'

- name: Assign issues and pull requests with `bug` label to project 3
uses: srggrs/[email protected]
if: |
contains(github.event.issue.labels.*.name, 'bug') ||
contains(github.event.pull_request.labels.*.name, 'bug')
with:
project: 'https://github.com/srggrs/assign-one-project-github-action/projects/3'
column_name: 'Labeled'
```

## [Change Log](./CHANGELOG.md)

Please refer to the list of changes [here](./CHANGELOG.md)
22 changes: 22 additions & 0 deletions .github/actions/project-management-action/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# action.yml
name: 'Assign to One Project'
description: 'Assign new/labeled Issue or Pull Request to a specific project dashboard column'
author: srggrs
inputs:
project:
description: 'The url of the project to be assigned to.'
required: true
column_name:
description: 'The column name of the project, defaults to "To do" for issues and "In progress" for pull requests.'
required: false

runs:
using: 'docker'
image: 'Dockerfile'
args:
- ${{ inputs.project }}
- ${{ inputs.column_name }}

branding:
icon: 'box'
color: 'red'
150 changes: 150 additions & 0 deletions .github/actions/project-management-action/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,150 @@
#!/bin/sh -l

PROJECT_URL="$INPUT_PROJECT"
if [ -z "$PROJECT_URL" ]; then
echo "Project input variable is not defined." >&2
exit 1
fi

get_project_type() {
_PROJECT_URL="$1"

case "$_PROJECT_URL" in
https://github.com/orgs/*)
echo "org"
;;
https://github.com/users/*)
echo "user"
;;
https://github.com/*/projects/*)
echo "repo"
;;
*)
echo "Invalid Project URL: '$_PROJECT_URL' . Please pass a valid Project URL in the project input variable" >&2
exit 1
;;
esac

unset _PROJECT_URL
}

get_next_url_from_headers() {
_HEADERS_FILE=$1
grep -i '^link' "$_HEADERS_FILE" | tr ',' '\n'| grep \"next\" | sed 's/.*<\(.*\)>.*/\1/'
}

find_project_id() {
_PROJECT_TYPE="$1"
_PROJECT_URL="$2"

case "$_PROJECT_TYPE" in
org)
_ORG_NAME=$(echo "$_PROJECT_URL" | sed -e 's@https://github.com/orgs/\([^/]\+\)/projects/[0-9]\+@\1@')
_ENDPOINT="https://api.github.com/orgs/$_ORG_NAME/projects?per_page=100"
;;
user)
_USER_NAME=$(echo "$_PROJECT_URL" | sed -e 's@https://github.com/users/\([^/]\+\)/projects/[0-9]\+@\1@')
_ENDPOINT="https://api.github.com/users/$_USER_NAME/projects?per_page=100"
;;
repo)
_ENDPOINT="https://api.github.com/repos/$GITHUB_REPOSITORY/projects?per_page=100"
;;
esac

_NEXT_URL="$_ENDPOINT"

while : ; do

_PROJECTS=$(curl -s -X GET -u "$GITHUB_ACTOR:$TOKEN" --retry 3 \
-H 'Accept: application/vnd.github.inertia-preview+json' \
-D /tmp/headers \
"$_NEXT_URL")

_PROJECTID=$(echo "$_PROJECTS" | jq -r ".[] | select(.html_url == \"$_PROJECT_URL\").id")
_NEXT_URL=$(get_next_url_from_headers '/tmp/headers')

if [ "$_PROJECTID" != "" ]; then
echo "$_PROJECTID"
elif [ "$_NEXT_URL" == "" ]; then
echo "No project was found." >&2
exit 1
fi
done

unset _PROJECT_TYPE _PROJECT_URL _ORG_NAME _USER_NAME _ENDPOINT _PROJECTS _PROJECTID _NEXT_URL
}

find_column_id() {
_PROJECT_ID="$1"
_INITIAL_COLUMN_NAME="$2"

_COLUMNS=$(curl -s -X GET -u "$GITHUB_ACTOR:$TOKEN" --retry 3 \
-H 'Accept: application/vnd.github.inertia-preview+json' \
"https://api.github.com/projects/$_PROJECT_ID/columns")


echo "$_COLUMNS" | jq -r ".[] | select(.name == \"$_INITIAL_COLUMN_NAME\").id"
unset _PROJECT_ID _INITIAL_COLUMN_NAME _COLUMNS
}

PROJECT_TYPE=$(get_project_type "${PROJECT_URL:?<Error> required this environment variable}")

if [ "$PROJECT_TYPE" = org ] || [ "$PROJECT_TYPE" = user ]; then
if [ -z "$MY_GITHUB_TOKEN" ]; then
echo "MY_GITHUB_TOKEN not defined" >&2
exit 1
fi

TOKEN="$MY_GITHUB_TOKEN" # It's User's personal access token. It should be secret.
else
if [ -z "$GITHUB_TOKEN" ]; then
echo "GITHUB_TOKEN not defined" >&2
exit 1
fi

TOKEN="$GITHUB_TOKEN" # GitHub sets. The scope in only the repository containing the workflow file.
fi

INITIAL_COLUMN_NAME="$INPUT_COLUMN_NAME"
if [ -z "$INITIAL_COLUMN_NAME" ]; then
# assing the column name by default
INITIAL_COLUMN_NAME='To do'
if [ "$GITHUB_EVENT_NAME" == "pull_request" ] || [ "$GITHUB_EVENT_NAME" == "pull_request_target" ]; then
echo "changing column name for PR event"
INITIAL_COLUMN_NAME='In progress'
fi
fi


PROJECT_ID=$(find_project_id "$PROJECT_TYPE" "$PROJECT_URL")
INITIAL_COLUMN_ID=$(find_column_id "$PROJECT_ID" "${INITIAL_COLUMN_NAME:?<Error> required this environment variable}")

if [ -z "$INITIAL_COLUMN_ID" ]; then
echo "Column name '$INITIAL_COLUMN_ID' is not found." >&2
exit 1
fi

case "$GITHUB_EVENT_NAME" in
issues|issue_comment)
ISSUE_ID=$(jq -r '.issue.id' < "$GITHUB_EVENT_PATH")

# Add this issue to the project column
curl -s -X POST -u "$GITHUB_ACTOR:$TOKEN" --retry 3 \
-H 'Accept: application/vnd.github.inertia-preview+json' \
-d "{\"content_type\": \"Issue\", \"content_id\": $ISSUE_ID}" \
"https://api.github.com/projects/columns/$INITIAL_COLUMN_ID/cards"
;;
pull_request|pull_request_target)
PULL_REQUEST_ID=$(jq -r '.pull_request.id' < "$GITHUB_EVENT_PATH")

# Add this pull_request to the project column
curl -s -X POST -u "$GITHUB_ACTOR:$TOKEN" --retry 3 \
-H 'Accept: application/vnd.github.inertia-preview+json' \
-d "{\"content_type\": \"PullRequest\", \"content_id\": $PULL_REQUEST_ID}" \
"https://api.github.com/projects/columns/$INITIAL_COLUMN_ID/cards"
;;
*)
echo "Nothing to be done on this action: '$GITHUB_EVENT_NAME'" >&2
exit 1
;;
esac
Loading
Loading