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

Commit f8fb337

Browse files
committed
update action and readme
1 parent 6402ef3 commit f8fb337

File tree

2 files changed

+4
-117
lines changed

2 files changed

+4
-117
lines changed

.github/workflows/test.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,3 @@ jobs:
1414
- uses: actions/checkout@v1
1515
- run: npm ci
1616
- run: npm test
17-
18-
# test action works running from the graph
19-
test:
20-
runs-on: ubuntu-latest
21-
steps:
22-
- uses: actions/checkout@v1
23-
- uses: ./
24-
with:
25-
milliseconds: 1000

README.md

Lines changed: 4 additions & 108 deletions
Original file line numberDiff line numberDiff line change
@@ -1,114 +1,10 @@
11

22
<p align="center">
3-
<a href="https://github.com/actions/javascript-action/actions"><img alt="javscript-action status" src="https://github.com/actions/javascript-action/workflows/units-test/badge.svg"></a>
3+
<a href="https://github.com/jonabc/sync-task-issues"><img alt="javscript-action status" src="https://github.com/jonabc/sync-task-issues/workflows/units-test/badge.svg"></a>
44
</p>
55

6-
# Create a JavaScript Action
6+
# Mark references to issues and PRs as complete
77

8-
Use this template to bootstrap the creation of a JavaScript action.:rocket:
8+
This GH Action finds checkbox list item cross-references to an issue or pull request from an event and marks the references as complete.
99

10-
This template includes tests, linting, a validation workflow, publishing, and versioning guidance.
11-
12-
If you are new, there's also a simpler introduction. See the [Hello World JavaScript Action](https://github.com/actions/hello-world-javascript-action)
13-
14-
## Create an action from this template
15-
16-
Click the `Use this Template` and provide the new repo details for your action
17-
18-
## Code in Master
19-
20-
Install the dependencies
21-
```bash
22-
$ npm install
23-
```
24-
25-
Run the tests :heavy_check_mark:
26-
```bash
27-
$ npm test
28-
29-
PASS ./index.test.js
30-
✓ throws invalid number (3ms)
31-
wait 500 ms (504ms)
32-
test runs (95ms)
33-
34-
...
35-
```
36-
37-
## Change action.yml
38-
39-
The action.yml contains defines the inputs and output for your action.
40-
41-
Update the action.yml with your name, description, inputs and outputs for your action.
42-
43-
See the [documentation](https://help.github.com/en/articles/metadata-syntax-for-github-actions)
44-
45-
## Change the Code
46-
47-
Most toolkit and CI/CD operations involve async operations so the action is run in an async function.
48-
49-
```javascript
50-
const core = require('@actions/core');
51-
...
52-
53-
async function run() {
54-
try {
55-
...
56-
}
57-
catch (error) {
58-
core.setFailed(error.message);
59-
}
60-
}
61-
62-
run()
63-
```
64-
65-
See the [toolkit documentation](https://github.com/actions/toolkit/blob/master/README.md#packages) for the various packages.
66-
67-
## Package for distribution
68-
69-
GitHub Actions will run the entry point from the action.yml. Packaging assembles the code into one file that can be checked in to Git, enabling fast and reliable execution and preventing the need to check in node_modules.
70-
71-
Actions are run from GitHub repos. Packaging the action will create a packaged action in the dist folder.
72-
73-
Run package
74-
75-
```bash
76-
npm run package
77-
```
78-
79-
Since the packaged index.js is run from the dist folder.
80-
81-
```bash
82-
git add dist
83-
```
84-
85-
## Create a release branch
86-
87-
Users shouldn't consume the action from master since that would be latest code and actions can break compatibility between major versions.
88-
89-
Checkin to the v1 release branch
90-
91-
```bash
92-
$ git checkout -b v1
93-
$ git commit -a -m "v1 release"
94-
```
95-
96-
```bash
97-
$ git push origin v1
98-
```
99-
100-
Your action is now published! :rocket:
101-
102-
See the [versioning documentation](https://github.com/actions/toolkit/blob/master/docs/action-versioning.md)
103-
104-
## Usage
105-
106-
You can now consume the action by referencing the v1 branch
107-
108-
```yaml
109-
uses: actions/javascript-action@v1
110-
with:
111-
milliseconds: 1000
112-
```
113-
114-
See the [actions tab](https://github.com/actions/javascript-action/actions) for runs of this action! :rocket:
10+
This action uses the GitHub GraphQL API to find references, and updates each reference's body. The action specifically looks for checkbox list items that are unchecked `- [ ] <any text>(url | #number)<any text>` and marks them complete -> `- [x]`.

0 commit comments

Comments
 (0)