Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
102 changed files
with
5,973 additions
and
2,451 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# This workflow checks open PRs for merge conflicts and labels them when conflicts are found | ||
name: Check for merge conflicts | ||
|
||
# Run whenever the "main" branch is updated | ||
# NOTE: This means merge conflicts are only checked for when a PR is merged to main. | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
triage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# See: https://github.com/mschilde/auto-label-merge-conflicts/ | ||
- name: Auto-label PRs with merge conflicts | ||
uses: mschilde/auto-label-merge-conflicts@v2.0 | ||
# Add "merge conflict" label if a merge conflict is detected. Remove it when resolved. | ||
# Note, the authentication token is created automatically | ||
# See: https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token | ||
with: | ||
CONFLICT_LABEL_NAME: 'merge conflict' | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# Ignore errors | ||
continue-on-error: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
dspace-api/src/main/java/org/dspace/app/bulkedit/MetadataExportCli.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/** | ||
* The contents of this file are subject to the license and copyright | ||
* detailed in the LICENSE and NOTICE files at the root of the source | ||
* tree and available online at | ||
* | ||
* http://www.dspace.org/license/ | ||
*/ | ||
package org.dspace.app.bulkedit; | ||
|
||
import org.apache.commons.cli.ParseException; | ||
|
||
public class MetadataExportCli extends MetadataExport { | ||
|
||
@Override | ||
protected String getFileNameForExportFile() { | ||
return commandLine.getOptionValue('f'); | ||
} | ||
|
||
@Override | ||
public void setup() throws ParseException { | ||
super.setup(); | ||
// Check a filename is given | ||
if (!commandLine.hasOption('f')) { | ||
throw new ParseException("Required parameter -f missing!"); | ||
} | ||
} | ||
|
||
@Override | ||
protected void logHelpInfo() { | ||
handler.logInfo("\nfull export: metadata-export -f filename"); | ||
handler.logInfo("partial export: metadata-export -i handle -f filename"); | ||
} | ||
} |
26 changes: 26 additions & 0 deletions
26
dspace-api/src/main/java/org/dspace/app/bulkedit/MetadataExportCliScriptConfiguration.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/** | ||
* The contents of this file are subject to the license and copyright | ||
* detailed in the LICENSE and NOTICE files at the root of the source | ||
* tree and available online at | ||
* | ||
* http://www.dspace.org/license/ | ||
*/ | ||
package org.dspace.app.bulkedit; | ||
|
||
import java.io.OutputStream; | ||
|
||
import org.apache.commons.cli.Options; | ||
|
||
public class MetadataExportCliScriptConfiguration extends MetadataExportScriptConfiguration<MetadataExportCli> { | ||
|
||
|
||
@Override | ||
public Options getOptions() { | ||
Options options = super.getOptions(); | ||
options.addOption("f", "file", true, "destination where you want file written"); | ||
options.getOption("f").setType(OutputStream .class); | ||
options.getOption("f").setRequired(true); | ||
super.options = options; | ||
return options; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.