Skip to content

Commit ce2702f

Browse files
committed
Initial commit
0 parents  commit ce2702f

File tree

11 files changed

+7206
-0
lines changed

11 files changed

+7206
-0
lines changed

.github/workflows/tests.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Test
2+
on:
3+
push:
4+
branches:
5+
- master
6+
pull_request:
7+
jobs:
8+
test:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Get Stars and License
13+
uses: ./
14+
id: sample
15+
with:
16+
repo: "italia/publiccode-parser-action"
17+
- name: Check Stars and License
18+
run: |
19+
test -n "${{ steps.sample.outputs.stars }}"
20+
echo "${{ steps.sample.outputs.stars }}"
21+
test -n "${{ steps.sample.outputs.license }}"
22+
echo "${{ steps.sample.outputs.license }}"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
node_modules

CONTRIBUTING.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Contributing
2+
3+
🙇‍♀️ Thank you for contributing!

LICENSE

Lines changed: 274 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,274 @@
1+
European Union Public Licence
2+
V. 1.2
3+
4+
EUPL © the European Union 2007, 2016
5+
6+
This European Union Public Licence (the ‘EUPL’) applies to the Work (as
7+
defined below) which is provided under the terms of this Licence. Any use of
8+
the Work, other than as authorised under this Licence is prohibited (to the
9+
extent such use is covered by a right of the copyright holder of the Work).
10+
11+
The Work is provided under the terms of this Licence when the Licensor (as
12+
defined below) has placed the following notice immediately following the
13+
copyright notice for the Work: “Licensed under the EUPL”, or has expressed by
14+
any other means his willingness to license under the EUPL.
15+
16+
1. Definitions
17+
18+
In this Licence, the following terms have the following meaning:
19+
— ‘The Licence’: this Licence.
20+
— ‘The Original Work’: the work or software distributed or communicated by the
21+
‘Licensor under this Licence, available as Source Code and also as
22+
‘Executable Code as the case may be.
23+
— ‘Derivative Works’: the works or software that could be created by the
24+
‘Licensee, based upon the Original Work or modifications thereof. This
25+
‘Licence does not define the extent of modification or dependence on the
26+
‘Original Work required in order to classify a work as a Derivative Work;
27+
‘this extent is determined by copyright law applicable in the country
28+
‘mentioned in Article 15.
29+
— ‘The Work’: the Original Work or its Derivative Works.
30+
— ‘The Source Code’: the human-readable form of the Work which is the most
31+
convenient for people to study and modify.
32+
33+
— ‘The Executable Code’: any code which has generally been compiled and which
34+
is meant to be interpreted by a computer as a program.
35+
— ‘The Licensor’: the natural or legal person that distributes or communicates
36+
the Work under the Licence.
37+
— ‘Contributor(s)’: any natural or legal person who modifies the Work under
38+
the Licence, or otherwise contributes to the creation of a Derivative Work.
39+
— ‘The Licensee’ or ‘You’: any natural or legal person who makes any usage of
40+
the Work under the terms of the Licence.
41+
— ‘Distribution’ or ‘Communication’: any act of selling, giving, lending,
42+
renting, distributing, communicating, transmitting, or otherwise making
43+
available, online or offline, copies of the Work or providing access to its
44+
essential functionalities at the disposal of any other natural or legal
45+
person.
46+
47+
2. Scope of the rights granted by the Licence
48+
49+
The Licensor hereby grants You a worldwide, royalty-free, non-exclusive,
50+
sublicensable licence to do the following, for the duration of copyright
51+
vested in the Original Work:
52+
53+
— use the Work in any circumstance and for all usage,
54+
— reproduce the Work,
55+
— modify the Work, and make Derivative Works based upon the Work,
56+
— communicate to the public, including the right to make available or display
57+
the Work or copies thereof to the public and perform publicly, as the case
58+
may be, the Work,
59+
— distribute the Work or copies thereof,
60+
— lend and rent the Work or copies thereof,
61+
— sublicense rights in the Work or copies thereof.
62+
63+
Those rights can be exercised on any media, supports and formats, whether now
64+
known or later invented, as far as the applicable law permits so.
65+
66+
In the countries where moral rights apply, the Licensor waives his right to
67+
exercise his moral right to the extent allowed by law in order to make
68+
effective the licence of the economic rights here above listed.
69+
70+
The Licensor grants to the Licensee royalty-free, non-exclusive usage rights
71+
to any patents held by the Licensor, to the extent necessary to make use of
72+
the rights granted on the Work under this Licence.
73+
74+
3. Communication of the Source Code
75+
76+
The Licensor may provide the Work either in its Source Code form, or as
77+
Executable Code. If the Work is provided as Executable Code, the Licensor
78+
provides in addition a machine-readable copy of the Source Code of the Work
79+
along with each copy of the Work that the Licensor distributes or indicates,
80+
in a notice following the copyright notice attached to the Work, a repository
81+
where the Source Code is easily and freely accessible for as long as the
82+
Licensor continues to distribute or communicate the Work.
83+
84+
4. Limitations on copyright
85+
86+
Nothing in this Licence is intended to deprive the Licensee of the benefits
87+
from any exception or limitation to the exclusive rights of the rights owners
88+
in the Work, of the exhaustion of those rights or of other applicable
89+
limitations thereto.
90+
91+
5. Obligations of the Licensee
92+
93+
The grant of the rights mentioned above is subject to some restrictions and
94+
obligations imposed on the Licensee. Those obligations are the following:
95+
96+
Attribution right: The Licensee shall keep intact all copyright, patent or
97+
trademarks notices and all notices that refer to the Licence and to the
98+
disclaimer of warranties. The Licensee must include a copy of such notices and
99+
a copy of the Licence with every copy of the Work he/she distributes or
100+
communicates. The Licensee must cause any Derivative Work to carry prominent
101+
notices stating that the Work has been modified and the date of modification.
102+
103+
Copyleft clause: If the Licensee distributes or communicates copies of the
104+
Original Works or Derivative Works, this Distribution or Communication will be
105+
done under the terms of this Licence or of a later version of this Licence
106+
unless the Original Work is expressly distributed only under this version of
107+
the Licence — for example by communicating ‘EUPL v. 1.2 only’. The Licensee
108+
(becoming Licensor) cannot offer or impose any additional terms or conditions
109+
on the Work or Derivative Work that alter or restrict the terms of the
110+
Licence.
111+
112+
Compatibility clause: If the Licensee Distributes or Communicates Derivative
113+
Works or copies thereof based upon both the Work and another work licensed
114+
under a Compatible Licence, this Distribution or Communication can be done
115+
under the terms of this Compatible Licence. For the sake of this clause,
116+
‘Compatible Licence’ refers to the licences listed in the appendix attached to
117+
this Licence. Should the Licensee's obligations under the Compatible Licence
118+
conflict with his/her obligations under this Licence, the obligations of the
119+
Compatible Licence shall prevail.
120+
121+
Provision of Source Code: When distributing or communicating copies of the
122+
Work, the Licensee will provide a machine-readable copy of the Source Code or
123+
indicate a repository where this Source will be easily and freely available
124+
for as long as the Licensee continues to distribute or communicate the Work.
125+
126+
Legal Protection: This Licence does not grant permission to use the trade
127+
names, trademarks, service marks, or names of the Licensor, except as required
128+
for reasonable and customary use in describing the origin of the Work and
129+
reproducing the content of the copyright notice.
130+
131+
6. Chain of Authorship
132+
133+
The original Licensor warrants that the copyright in the Original Work granted
134+
hereunder is owned by him/her or licensed to him/her and that he/she has the
135+
power and authority to grant the Licence.
136+
137+
Each Contributor warrants that the copyright in the modifications he/she
138+
brings to the Work are owned by him/her or licensed to him/her and that he/she
139+
has the power and authority to grant the Licence.
140+
141+
Each time You accept the Licence, the original Licensor and subsequent
142+
Contributors grant You a licence to their contributions to the Work, under the
143+
terms of this Licence.
144+
145+
7. Disclaimer of Warranty
146+
147+
The Work is a work in progress, which is continuously improved by numerous
148+
Contributors. It is not a finished work and may therefore contain defects or
149+
‘bugs’ inherent to this type of development.
150+
151+
For the above reason, the Work is provided under the Licence on an ‘as is’
152+
basis and without warranties of any kind concerning the Work, including
153+
without limitation merchantability, fitness for a particular purpose, absence
154+
of defects or errors, accuracy, non-infringement of intellectual property
155+
rights other than copyright as stated in Article 6 of this Licence.
156+
157+
This disclaimer of warranty is an essential part of the Licence and a
158+
condition for the grant of any rights to the Work.
159+
160+
8. Disclaimer of Liability
161+
162+
Except in the cases of wilful misconduct or damages directly caused to natural
163+
persons, the Licensor will in no event be liable for any direct or indirect,
164+
material or moral, damages of any kind, arising out of the Licence or of the
165+
use of the Work, including without limitation, damages for loss of goodwill,
166+
work stoppage, computer failure or malfunction, loss of data or any commercial
167+
damage, even if the Licensor has been advised of the possibility of such
168+
damage. However, the Licensor will be liable under statutory product liability
169+
laws as far such laws apply to the Work.
170+
171+
9. Additional agreements
172+
173+
While distributing the Work, You may choose to conclude an additional
174+
agreement, defining obligations or services consistent with this Licence.
175+
However, if accepting obligations, You may act only on your own behalf and on
176+
your sole responsibility, not on behalf of the original Licensor or any other
177+
Contributor, and only if You agree to indemnify, defend, and hold each
178+
Contributor harmless for any liability incurred by, or claims asserted against
179+
such Contributor by the fact You have accepted any warranty or additional
180+
liability.
181+
182+
10. Acceptance of the Licence
183+
184+
The provisions of this Licence can be accepted by clicking on an icon ‘I
185+
agree’ placed under the bottom of a window displaying the text of this Licence
186+
or by affirming consent in any other similar way, in accordance with the rules
187+
of applicable law. Clicking on that icon indicates your clear and irrevocable
188+
acceptance of this Licence and all of its terms and conditions.
189+
190+
Similarly, you irrevocably accept this Licence and all of its terms and
191+
conditions by exercising any rights granted to You by Article 2 of this
192+
Licence, such as the use of the Work, the creation by You of a Derivative Work
193+
or the Distribution or Communication by You of the Work or copies thereof.
194+
195+
11. Information to the public
196+
197+
In case of any Distribution or Communication of the Work by means of
198+
electronic communication by You (for example, by offering to download the Work
199+
from a remote location) the distribution channel or media (for example, a
200+
website) must at least provide to the public the information requested by the
201+
applicable law regarding the Licensor, the Licence and the way it may be
202+
accessible, concluded, stored and reproduced by the Licensee.
203+
204+
12. Termination of the Licence
205+
206+
The Licence and the rights granted hereunder will terminate automatically upon
207+
any breach by the Licensee of the terms of the Licence. Such a termination
208+
will not terminate the licences of any person who has received the Work from
209+
the Licensee under the Licence, provided such persons remain in full
210+
compliance with the Licence.
211+
212+
13. Miscellaneous
213+
214+
Without prejudice of Article 9 above, the Licence represents the complete
215+
agreement between the Parties as to the Work.
216+
217+
If any provision of the Licence is invalid or unenforceable under applicable
218+
law, this will not affect the validity or enforceability of the Licence as a
219+
whole. Such provision will be construed or reformed so as necessary to make it
220+
valid and enforceable.
221+
222+
The European Commission may publish other linguistic versions or new versions
223+
of this Licence or updated versions of the Appendix, so far this is required
224+
and reasonable, without reducing the scope of the rights granted by the
225+
Licence. New versions of the Licence will be published with a unique version
226+
number.
227+
228+
All linguistic versions of this Licence, approved by the European Commission,
229+
have identical value. Parties can take advantage of the linguistic version of
230+
their choice.
231+
232+
14. Jurisdiction
233+
234+
Without prejudice to specific agreement between parties,
235+
— any litigation resulting from the interpretation of this License, arising
236+
between the European Union institutions, bodies, offices or agencies, as a
237+
Licensor, and any Licensee, will be subject to the jurisdiction of the Court
238+
of Justice of the European Union, as laid down in article 272 of the Treaty
239+
on the Functioning of the European Union,
240+
— any litigation arising between other parties and resulting from the
241+
interpretation of this License, will be subject to the exclusive
242+
jurisdiction of the competent court where the Licensor resides or conducts
243+
its primary business.
244+
245+
15. Applicable Law
246+
247+
Without prejudice to specific agreement between parties,
248+
— this Licence shall be governed by the law of the European Union Member State
249+
where the Licensor has his seat, resides or has his registered office,
250+
— this licence shall be governed by Belgian law if the Licensor has no seat,
251+
residence or registered office inside a European Union Member State.
252+
253+
Appendix
254+
255+
‘Compatible Licences’ according to Article 5 EUPL are:
256+
— GNU General Public License (GPL) v. 2, v. 3
257+
— GNU Affero General Public License (AGPL) v. 3
258+
— Open Software License (OSL) v. 2.1, v. 3.0
259+
— Eclipse Public License (EPL) v. 1.0
260+
— CeCILL v. 2.0, v. 2.1
261+
— Mozilla Public Licence (MPL) v. 2
262+
— GNU Lesser General Public Licence (LGPL) v. 2.1, v. 3
263+
— Creative Commons Attribution-ShareAlike v. 3.0 Unported (CC BY-SA 3.0) for
264+
works other than software
265+
— European Union Public Licence (EUPL) v. 1.1, v. 1.2
266+
— Québec Free and Open-Source Licence — Reciprocity (LiLiQ-R) or
267+
Strong Reciprocity (LiLiQ-R+)
268+
269+
— The European Commission may update this Appendix to later versions of the
270+
above licences without producing a new version of the EUPL, as long as they
271+
provide the rights granted in Article 2 of this Licence and protect the
272+
covered Source Code from exclusive appropriation.
273+
— All other changes or additions to this Appendix require the production of a
274+
new EUPL version.

README.md

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# GitHub JavaScript action template
2+
3+
[![Join the #publiccode channel](https://img.shields.io/badge/Slack%20channel-%23publiccode-blue.svg?logo=slack)](https://developersitalia.slack.com/messages/CAM3F785T)
4+
[![Get invited](https://slack.developers.italia.it/badge.svg)](https://slack.developers.italia.it/)
5+
6+
This is a template repository for [creating a GitHub JavaScript action](https://docs.github.com/en/actions/creating-actions/creating-a-javascript-action).
7+
8+
Click `Use this template` button to create your action based on this template.
9+
10+
A sample action to get GitHub star counts and license from a given repository.
11+
12+
## Inputs
13+
14+
The following inputs briefly explained here are fully declared and documented in the [action.yaml](action.yaml):
15+
16+
* `repo` [**Required**] - GitHub repository to fetch (default `${{ github.repository }}`)
17+
18+
* `github_token` [**Optional**] - GitHub token to interact with GitHub API (default `${{ github.token }}`)
19+
20+
## Examples
21+
22+
Include this action in your repo by creating
23+
`.github/workflows/js-action-template.yml`and edit where needed:
24+
25+
```yml
26+
on: [push, pull_request]
27+
28+
jobs:
29+
examplejob:
30+
runs-on: ubuntu-latest
31+
name: Get Stars and License
32+
steps:
33+
- uses: actions/checkout@v2
34+
- uses: italia/js-action-template@v1
35+
with:
36+
repo: "italia/publiccode-parser-action"
37+
```
38+
39+
## Build the action
40+
41+
Install dependencies
42+
43+
```sh
44+
npm i
45+
```
46+
47+
Build the action
48+
49+
```sh
50+
npm run build
51+
```
52+
53+
## Contributing
54+
55+
Contributing is always appreciated.
56+
Feel free to open issues, fork or submit a Pull Request.
57+
If you want to know more about how to add new fields, check out [CONTRIBUTING.md](CONTRIBUTING.md).
58+
In order to support other country-specific extensions in addition to Italy some
59+
refactoring might be needed.
60+
61+
## Maintainers
62+
63+
This software is maintained by the
64+
[Developers Italia](https://developers.italia.it/) team.
65+
66+
## License
67+
68+
© 2021 Dipartimento per la Trasformazione Digitale - Presidenza del Consiglio dei
69+
Ministri
70+
71+
Licensed under the EUPL.
72+
The version control system provides attribution for specific lines of code.
73+
74+
## Remarks
75+
76+
This GitHub Action is published in the Github Marketplace.
77+
As such, you can find the [Terms of Service here](https://docs.github.com/en/free-pro-team@latest/github/site-policy/github-marketplace-terms-of-service).
78+
Also, [here](https://docs.github.com/en/free-pro-team@latest/github/site-policy/github-marketplace-developer-agreement)
79+
you can find the GitHub Marketplace Developer Agreement.

0 commit comments

Comments
 (0)