summaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorqwerty287 <80460567+qwerty287@users.noreply.github.com>2021-12-17 22:29:09 +0100
committerGitHub <noreply@github.com>2021-12-17 21:29:09 +0000
commit4cbc865d835eb49722d22f8ac5019ccc17582a16 (patch)
tree2a679577d7d6560a8f45aba6a06d945e75e85e82 /templates
parent4bbbf356547557bd6b36d1d6cb73540a5febf120 (diff)
downloadgitea-4cbc865d835eb49722d22f8ac5019ccc17582a16.tar.gz
gitea-4cbc865d835eb49722d22f8ac5019ccc17582a16.zip
Add option to define refs in issue templates (#17842)
Adds a markdown header option `ref` that allows you to set the ref the issue should belong.
Diffstat (limited to 'templates')
-rw-r--r--templates/repo/issue/branch_selector_field.tmpl8
-rw-r--r--templates/swagger/v1_json.tmpl4
2 files changed, 8 insertions, 4 deletions
diff --git a/templates/repo/issue/branch_selector_field.tmpl b/templates/repo/issue/branch_selector_field.tmpl
index cb7d37fb90..9c3e62ea59 100644
--- a/templates/repo/issue/branch_selector_field.tmpl
+++ b/templates/repo/issue/branch_selector_field.tmpl
@@ -1,5 +1,5 @@
{{if and (not .Issue.IsPull) (not .PageIsComparePull)}}
-<input id="ref_selector" name="ref" type="hidden" value="{{.Issue.Ref}}">
+<input id="ref_selector" name="ref" type="hidden" value="{{.Reference}}">
<input id="editing_mode" name="edit_mode" type="hidden" value="{{(or .IsIssueWriter .HasIssuesOrPullsWritePermission)}}">
<form method="POST" action="{{$.RepoLink}}/issues/{{.Issue.Index}}/ref" id="update_issueref_form">
{{$.CsrfTokenHtml}}
@@ -7,7 +7,7 @@
<div class="ui {{if not .HasIssuesOrPullsWritePermission}}disabled{{end}} floating filter select-branch dropdown" data-no-results="{{.i18n.Tr "repo.pulls.no_results"}}">
<div class="ui basic small button">
- <span class="text branch-name">{{if .Issue.Ref}}{{$.RefEndName}}{{else}}{{.i18n.Tr "repo.issues.no_ref"}}{{end}}</span>
+ <span class="text branch-name">{{if .Reference}}{{$.RefEndName}}{{else}}{{.i18n.Tr "repo.issues.no_ref"}}{{end}}</span>
{{if .HasIssuesOrPullsWritePermission}}{{svg "octicon-triangle-down" 14 "dropdown icon"}}{{end}}
</div>
<div class="menu">
@@ -32,7 +32,7 @@
</div>
</div>
<div id="branch-list" class="scrolling menu reference-list-menu {{if not .Issue}}new-issue{{end}}">
- {{if .Issue.Ref}}
+ {{if .Reference}}
<div class="item text small" data-id="" data-id-selector="#ref_selector"><strong><a href="#">{{$.i18n.Tr "repo.clear_ref"}}</a></strong></div>
{{end}}
{{range .Branches}}
@@ -40,7 +40,7 @@
{{end}}
</div>
<div id="tag-list" class="scrolling menu reference-list-menu {{if not .Issue}}new-issue{{end}}" style="display: none">
- {{if .Issue.Ref}}
+ {{if .Reference}}
<div class="item text small" data-id="" data-id-selector="#ref_selector"><strong><a href="#">{{.i18n.Tr "repo.clear_ref"}}</a></strong></div>
{{end}}
{{range .Tags}}
diff --git a/templates/swagger/v1_json.tmpl b/templates/swagger/v1_json.tmpl
index 6bbc093481..2735914d25 100644
--- a/templates/swagger/v1_json.tmpl
+++ b/templates/swagger/v1_json.tmpl
@@ -15578,6 +15578,10 @@
"type": "string",
"x-go-name": "Name"
},
+ "ref": {
+ "type": "string",
+ "x-go-name": "Ref"
+ },
"title": {
"type": "string",
"x-go-name": "Title"
*/ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
# AspectJ

AspectJ is:
- a seamless aspect-oriented extension to the Java programming language
- Java platform compatible
- easy to learn and use

AspectJ enables:
- clean modularization of crosscutting concerns, such as error checking and handling, synchronization, context-sensitive behavior, performance optimizations, monitoring and logging, debugging support, and multi-object protocols

## Building

AspectJ has a multi-module Maven build. Although various modules produce intermediate results, the key artifacts at the end of the build are:

* `aspectjrt` - the AspectJ runtime
* `aspectjweaver` - the AspectJ weaver
* `aspectjtools` - the AspectJ compiler
* `aspectjmatcher` - the AspectJ matcher

These are the artifacts published to Maven Central for each release. In addition, there is an installer that can be run with `java -jar` to install AspectJ onto Windows/Mac/Linux. This installer is produced by the `installer` sub-module.

In the root of a cloned AspectJ simply run:

```shell
./mvnw clean install
```

You can also use a reasonably recent (3.6.3+), locally installed Maven installation instead of the Maven wrapper script.

This will build all the modules, run all the tests and install the key artifacts in your local repository.
Once built, access the Maven dependencies from your local repository or run the installer to install AspectJ locally:
```
java -jar installer/target/aspectj-<VERSION>.jar
```

## Running the tests in Eclipse

Once you have imported all the projects using `m2e`, there is a special module called `run-all-junit-tests` and within that a `RunTheseBeforeYouCommitTests` class that can be run with the JUnit launcher to execute thousands of tests.
Ensure you run this with a JDK - the more recent the better since some tests will not execute on older JDKs - tests that verify language features that only exist in the more up to date JDK version.

## Documentation for AspectJ users

* [Complete documentation quicklinks](https://www.eclipse.org/aspectj/docs.php)
* [Setting up a development environment](docs/developer/IDE.md)
* [Getting started with AspectJ](https://www.eclipse.org/aspectj/doc/released/progguide/starting.html)
* [Programming Guide](https://www.eclipse.org/aspectj/doc/released/progguide/index.html)
* [READMEs for each version of AspectJ](docs/dist/doc)
* [AspectJ Java version compatibility](docs/dist/doc/JavaVersionCompatibility.md)

## Documentation for AspectJ developers

* [How to contribute to AspectJ](CONTRIBUTING.md)
* [How to release AspectJ](docs/developer/RELEASE.md)
* [Maven build options (profiles, properties)](docs/developer/BUILD.md)

## Maven releases

AspectJ is published to maven central under the `org.aspectj` groupID: https://search.maven.org/search?q=g:org.aspectj