Skip to content
This repository was archived by the owner on Jul 18, 2025. It is now read-only.

Commit f4ce3a3

Browse files
Merge branch 'master' of github.com:atomist-skills/git-repo-config-skill
2 parents 667daed + 9650849 commit f4ce3a3

File tree

11 files changed

+579
-402
lines changed

11 files changed

+579
-402
lines changed

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ CHANGELOG.md
33
**/graphql/schema.json
44
package-lock.json
55
/doc/
6+
/.atomist/

.prettierrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
{
44
"files": ["*.md", "*.markdown"],
55
"options": {
6+
"proseWrap": "always",
67
"tabWidth": 4
78
}
89
}

LICENSE

Lines changed: 208 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,208 @@
1+
Apache License
2+
3+
Version 2.0, January 2004
4+
5+
http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION,
6+
AND DISTRIBUTION
7+
8+
1. Definitions.
9+
10+
"License" shall mean the terms and conditions for use, reproduction,
11+
and distribution as defined by Sections 1 through 9 of this document.
12+
13+
"Licensor" shall mean the copyright owner or entity authorized by
14+
the copyright owner that is granting the License.
15+
16+
"Legal Entity" shall mean the union of the acting entity and all
17+
other entities that control, are controlled by, or are under common
18+
control with that entity. For the purposes of this definition,
19+
"control" means (i) the power, direct or indirect, to cause the
20+
direction or management of such entity, whether by contract or
21+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
22+
outstanding shares, or (iii) beneficial ownership of such entity.
23+
24+
"You" (or "Your") shall mean an individual or Legal Entity exercising
25+
permissions granted by this License.
26+
27+
"Source" form shall mean the preferred form for making modifications,
28+
including but not limited to software source code, documentation
29+
source, and configuration files.
30+
31+
"Object" form shall mean any form resulting from mechanical
32+
transformation or translation of a Source form, including but not
33+
limited to compiled object code, generated documentation, and
34+
conversions to other media types.
35+
36+
"Work" shall mean the work of authorship, whether in Source or
37+
Object form, made available under the License, as indicated by a
38+
copyright notice that is included in or attached to the work (an
39+
example is provided in the Appendix below).
40+
41+
"Derivative Works" shall mean any work, whether in Source or Object
42+
form, that is based on (or derived from) the Work and for which the
43+
editorial revisions, annotations, elaborations, or other modifications
44+
represent, as a whole, an original work of authorship. For the
45+
purposes of this License, Derivative Works shall not include works
46+
that remain separable from, or merely link (or bind by name) to the
47+
interfaces of, the Work and Derivative Works thereof.
48+
49+
"Contribution" shall mean any work of authorship, including the
50+
original version of the Work and any modifications or additions to
51+
that Work or Derivative Works thereof, that is intentionally
52+
submitted to Licensor for inclusion in the Work by the copyright
53+
owner or by an individual or Legal Entity authorized to submit on
54+
behalf of the copyright owner. For the purposes of this definition,
55+
"submitted" means any form of electronic, verbal, or written
56+
communication sent to the Licensor or its representatives, including
57+
but not limited to communication on electronic mailing lists, source
58+
code control systems, and issue tracking systems that are managed
59+
by, or on behalf of, the Licensor for the purpose of discussing and
60+
improving the Work, but excluding communication that is conspicuously
61+
marked or otherwise designated in writing by the copyright owner
62+
as "Not a Contribution."
63+
64+
"Contributor" shall mean Licensor and any individual or Legal Entity
65+
on behalf of whom a Contribution has been received by Licensor and
66+
subsequently incorporated within the Work.
67+
68+
2. Grant of Copyright License. Subject to the terms and conditions of
69+
this License, each Contributor hereby grants to You a perpetual,
70+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
71+
copyright license to reproduce, prepare Derivative Works of,
72+
publicly display, publicly perform, sublicense, and distribute the
73+
Work and such Derivative Works in Source or Object form.
74+
75+
3. Grant of Patent License. Subject to the terms and conditions of
76+
this License, each Contributor hereby grants to You a perpetual,
77+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
78+
(except as stated in this section) patent license to make, have
79+
made, use, offer to sell, sell, import, and otherwise transfer the
80+
Work, where such license applies only to those patent claims
81+
licensable by such Contributor that are necessarily infringed by
82+
their Contribution(s) alone or by combination of their Contribution(s)
83+
with the Work to which such Contribution(s) was submitted. If You
84+
institute patent litigation against any entity (including a
85+
cross-claim or counterclaim in a lawsuit) alleging that the Work
86+
or a Contribution incorporated within the Work constitutes direct
87+
or contributory patent infringement, then any patent licenses
88+
granted to You under this License for that Work shall terminate as
89+
of the date such litigation is filed.
90+
91+
4. Redistribution. You may reproduce and distribute copies of the Work
92+
or Derivative Works thereof in any medium, with or without
93+
modifications, and in Source or Object form, provided that You meet
94+
the following conditions:
95+
96+
(a) You must give any other recipients of the Work or Derivative
97+
Works a copy of this License; and
98+
99+
(b) You must cause any modified files to carry prominent notices
100+
stating that You changed the files; and
101+
102+
(c) You must retain, in the Source form of any Derivative Works
103+
that You distribute, all copyright, patent, trademark, and
104+
attribution notices from the Source form of the Work, excluding
105+
those notices that do not pertain to any part of the Derivative
106+
Works; and
107+
108+
(d) If the Work includes a "NOTICE" text file as part of its
109+
distribution, then any Derivative Works that You distribute
110+
must include a readable copy of the attribution notices contained
111+
within such NOTICE file, excluding those notices that do not
112+
pertain to any part of the Derivative Works, in at least one
113+
of the following places: within a NOTICE text file distributed
114+
as part of the Derivative Works; within the Source form or
115+
documentation, if provided along with the Derivative Works; or,
116+
within a display generated by the Derivative Works, if and
117+
wherever such third-party notices normally appear. The contents
118+
of the NOTICE file are for informational purposes only and do
119+
not modify the License. You may add Your own attribution notices
120+
within Derivative Works that You distribute, alongside or as
121+
an addendum to the NOTICE text from the Work, provided that
122+
such additional attribution notices cannot be construed as
123+
modifying the License.
124+
125+
You may add Your own copyright statement to Your modifications and
126+
may provide additional or different license terms and conditions
127+
for use, reproduction, or distribution of Your modifications, or
128+
for any such Derivative Works as a whole, provided Your use,
129+
reproduction, and distribution of the Work otherwise complies with
130+
the conditions stated in this License.
131+
132+
5. Submission of Contributions. Unless You explicitly state otherwise,
133+
any Contribution intentionally submitted for inclusion in the Work
134+
by You to the Licensor shall be under the terms and conditions of
135+
this License, without any additional terms or conditions.
136+
Notwithstanding the above, nothing herein shall supersede or modify
137+
the terms of any separate license agreement you may have executed
138+
with Licensor regarding such Contributions.
139+
140+
6. Trademarks. This License does not grant permission to use the trade
141+
names, trademarks, service marks, or product names of the Licensor,
142+
except as required for reasonable and customary use in describing
143+
the origin of the Work and reproducing the content of the NOTICE
144+
file.
145+
146+
7. Disclaimer of Warranty. Unless required by applicable law or agreed
147+
to in writing, Licensor provides the Work (and each Contributor
148+
provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES
149+
OR CONDITIONS OF ANY KIND, either express or implied, including,
150+
without limitation, any warranties or conditions of TITLE,
151+
NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR
152+
PURPOSE. You are solely responsible for determining the appropriateness
153+
of using or redistributing the Work and assume any risks associated
154+
with Your exercise of permissions under this License.
155+
156+
8. Limitation of Liability. In no event and under no legal theory,
157+
whether in tort (including negligence), contract, or otherwise,
158+
unless required by applicable law (such as deliberate and grossly
159+
negligent acts) or agreed to in writing, shall any Contributor be
160+
liable to You for damages, including any direct, indirect, special,
161+
incidental, or consequential damages of any character arising as a
162+
result of this License or out of the use or inability to use the
163+
Work (including but not limited to damages for loss of goodwill,
164+
work stoppage, computer failure or malfunction, or any and all
165+
other commercial damages or losses), even if such Contributor has
166+
been advised of the possibility of such damages.
167+
168+
9. Accepting Warranty or Additional Liability. While redistributing
169+
the Work or Derivative Works thereof, You may choose to offer, and
170+
charge a fee for, acceptance of support, warranty, indemnity, or
171+
other liability obligations and/or rights consistent with this
172+
License. However, in accepting such obligations, You may act only
173+
on Your own behalf and on Your sole responsibility, not on behalf
174+
of any other Contributor, and only if You agree to indemnify,
175+
defend, and hold each Contributor harmless for any liability
176+
incurred by, or claims asserted against, such Contributor by reason
177+
of your accepting any such warranty or additional liability. END
178+
OF TERMS AND CONDITIONS
179+
180+
APPENDIX: How to apply the Apache License to your work.
181+
182+
To apply the Apache License to your work, attach the following boilerplate
183+
notice, with the fields enclosed by brackets "[]" replaced with your own
184+
identifying information. (Don't include the brackets!) The text should
185+
be enclosed in the appropriate comment syntax for the file format. We
186+
also recommend that a file or class name and description of purpose be
187+
included on the same "printed page" as the copyright notice for easier
188+
identification within third-party archives.
189+
190+
Copyright [yyyy] [name of copyright owner]
191+
192+
Licensed under the Apache License, Version 2.0 (the "License");
193+
194+
you may not use this file except in compliance with the License.
195+
196+
You may obtain a copy of the License at
197+
198+
http://www.apache.org/licenses/LICENSE-2.0
199+
200+
Unless required by applicable law or agreed to in writing, software
201+
202+
distributed under the License is distributed on an "AS IS" BASIS,
203+
204+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
205+
206+
See the License for the specific language governing permissions and
207+
208+
limitations under the License.

README.md

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,9 @@
77
Choose a standard GitHub Repo configuration and apply it consistently across all
88
your repositories.
99

10-
The per Repo config options supported by GitHub are [documented here](https://developer.github.com/v3/repos/#update-a-repository). However, a good summary of the config options you can standardize is:
10+
The per Repo config options supported by GitHub are
11+
[documented here](https://developer.github.com/v3/repos/#update-a-repository).
12+
However, a good summary of the config options you can standardize is:
1113

1214
| Name | Type | Description |
1315
| :--------------------- | :------ | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
@@ -20,9 +22,12 @@ The per Repo config options supported by GitHub are [documented here](https://de
2022
| allow_rebase_merge | boolean | Either true to allow rebase-merging pull requests, or false to prevent rebase-merging. Default: true. |
2123
| delete_branch_on_merge | boolean | Either true to allow automatically deleting head branches when pull requests are merged, or false to prevent automatic deletion. Default: false |
2224

23-
Each configuration of this skill can select a set of options above and apply to them to a set of repositories selected by Topic. This will automation of statements like:
25+
Each configuration of this skill can select a set of options above and apply to
26+
them to a set of repositories selected by Topic. This will automation of
27+
statements like:
2428

25-
> all Repos with the topic `TopicName` should have wikis disabled, issues enabled, and only allow rebase merges.
29+
> all Repos with the topic `TopicName` should have wikis disabled, issues
30+
> enabled, and only allow rebase merges.
2631
2732
# Before you get started
2833

@@ -33,19 +38,22 @@ Connect and configure these integrations:
3338

3439
The **GitHub** integration must be configured in order to use this skill.
3540

36-
When the optional Slack integration is enabled, users can interact with this skill directly from Slack.
41+
When the optional Slack integration is enabled, users can interact with this
42+
skill directly from Slack.
3743

3844
# How to configure
3945

4046
1. **Configure Topic Selection**
4147

42-
Choose a Repo Topic. This will be used to select the set of Repositories to configure.
48+
Choose a Repo Topic. This will be used to select the set of Repositories to
49+
configure.
4350

4451
![screenshot1](docs/images/screenshot1.png)
4552

4653
2. **Configure your Desired Repository Configuration**
4754

48-
Please see [GitHub documentation for supported options](https://developer.github.com/v3/repos/#update-a-repository)
55+
Please see
56+
[GitHub documentation for supported options](https://developer.github.com/v3/repos/#update-a-repository)
4957

5058
![screenshot2](docs/images/screenshot2.png)
5159

@@ -60,7 +68,8 @@ When the optional Slack integration is enabled, users can interact with this ski
6068
- **Using a Cron schedule**
6169

6270
This skill can iterate over all of your Repos on a Schedule.
63-
For Repos marked with the appropriate Topic, the configuration will be applied.
71+
For Repos marked with the appropriate Topic, the configuration will be
72+
applied.
6473

6574
- **Run a sync from Slack**
6675

@@ -74,8 +83,7 @@ When the optional Slack integration is enabled, users can interact with this ski
7483
7584
---
7685
77-
Created by [Atomist][atomist].
78-
Need Help? [Join our Slack workspace][slack].
86+
Created by [Atomist][atomist]. Need Help? [Join our Slack workspace][slack].
7987
8088
[atomist]: https://atomist.com/ "Atomist - How Teams Deliver Software"
8189
[slack]: https://join.atomist.com/ "Atomist Community Slack"

index.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1+
/*
2+
* Copyright © 2020 Atomist, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
117
var api = require('@atomist/api-cljs/atomist.middleware');
218

319
var handleRepo = async function(repo, config, topic) {

0 commit comments

Comments
 (0)