Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/tsubasaogawa/issue2atom

This script generates Atom feed from GitHub Issues.
https://github.com/tsubasaogawa/issue2atom

githubactions issues python3

Last synced: 16 days ago
JSON representation

This script generates Atom feed from GitHub Issues.

Awesome Lists containing this project

README

        

# issue2atom action

## Overview

This script generates ATOM feed from GitHub Issues.

### Generated ATOM feed sample

Target issue is [octocat/hello-world](https://github.com/octocat/hello-world/issues)

```xml

tag:issue2atom,2006-01-02:/octocat/hello-world/issues
octocat/hello-world - GitHub Issues
2022-03-26T15:02:35.517122+00:00

octocat


python-feedgen
GitHub Issues of octocat/hello-world

tag:issue2atom,2006-01-02:/octocat/hello-world/issues/2237
Check This out
2022-03-25T05:46:38+00:00
<p>This is a test body</p>

This is a test body...
2022-03-25T05:45:05+00:00

:

```

## Usage

### (a) Use GitHub Actions

See also [sample.yml](https://github.com/tsubasaogawa/issue2atom/blob/main/.github/workflows/sample.yml)

1. Copy this repository to your GitHub account using [template](https://docs.github.com/en/repositories/creating-and-managing-repositories/creating-a-repository-from-a-template).
1. Fix .github/workflows/sample.yml
- Cron schedule
- Inputs of issue2atom action
1. Run this GitHub Actions workflow manually
1. Publish GitHub Pages using `gh-pages` branch
1. Browse https://.github.io////atom.xml

NOTE: sample.yml overwrites (i.e. force pushes) `gh-pages` branch.

#### Inputs

|key|description|required|default|
|---|-----------|--------|-------|
|user|Target GitHub user name|true|octocat|
|repo|Target GitHub repository name|true|hello-world|
|max_issue_num|The number of issues included in ATOM|false|10|
|per_page|The number of request issues|false|30|
|shorten_length|Length of <summary> section|false|100|
|atom_base_url|Parent URL of ATOM file.
ex) https://foo.github.io/issue2atom when ATOM URL of octocat/hello-world is https://foo.github.io/issue2atom/octocat/hello-world/atom.xml|false|''|
|allow_pr|Allow pull request or not|false|false|

#### Outputs

|key|description|
|---|-----------|
|status_code|Status code from Github API|
|atom_file_path|ATOM file path|
|atom_file_size|ATOM file size|

#### Example

```yaml
# Generate ATOM feed in an instance by GitHub Actions
uses: tsubasaogawa/issue2atom-action@v3
with:
user: "octocat"
repo: "hello-world"
max_issue_num: 10
```

### (b) Run on local machine

```bash
docker build -t tsubasaogawa/issue2atom:latest .
docker run --rm -t -e USER=octocat -e REPO=hello-world -e STDOUT_ATOM=true tsubasaogawa/issue2atom:latest > atom.xml
```

## Development

See Usage (b).