Skip to content

italia/publiccode-issueopener

Repository files navigation

publiccode-issueopener

License Join the #publiccode channel Get invited

English | Italiano

publiccode-issueopener is a Python-based automation bot designed to ensure the correctness of publiccode.yml files in GitHub repositories.

This bot gets the list of repositories in the Italian software catalog through the developers-italia-api, checks the validity of the publiccode.yml file for errors, logs them, and opens GitHub issues accordingly.

This aids in maintaining the high quality of software catalog metadata, and eventually ensures smooth public code sharing and reuse across different administrations.

🚀 Features

  • Automated issue generation: Any detected errors in the publiccode.yml file automatically trigger the creation of GitHub issues.
  • publiccode.yml compliance: Ensures publiccode.yml files adhere to the Standard set by the publiccode.yml schema.

Screenshot

publiccode-issueopener will open issues looking like this:

image

💻 Getting Started

Prerequisites

  • Python 3.9 or higher

Install the required Python libraries using pip:

pip install -r requirements.txt

Installation

Clone the repository to your local machine.

git clone https://github.com/italia/publiccode-issueopener
cd publiccode-issueopener

🎮 Usage

You can run the script with the following command:

./publiccode-issueopener.py [--since NUMBER_OF_DAYS]

The --since option defines the number of past days to analyze in the logs. By default, the script checks the past day's logs for any publiccode.yml errors.

Environment Variables

To use the bot, you'll need to set some environment variables in your system:

  • BOT_GITHUB_TOKEN: (required) The GitHub token for the bot, used to authenticate when opening issues in repositories
  • GITHUB_USERNAME: The username of the GitHub bot that will open the issues. Default is publiccode-validator-bot
  • API_BASEURL: The base URL for the API used to retreive the errors in publiccode.yml files. Default is https://api.developers.italia.it/v1

🤝 Contributing

We always welcome contributions! Feel free to open issues, fork the repository or submit a Pull Request.

🔗 Related Projects

👥 Maintainers

This software is maintained by the Developers Italia team.

📄 License

Copyright© 2022-present - Presidency of the Council of Ministers (Italy)

This software is released under the EUPL-1.2 license. Please see the LICENSE file for more details.

About

The Publiccode Issue Opener repository

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published