Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nixos/first-time-contribution-tagger
Tags contributions of a first time contributor in your repo with a specified label [maintainer=@Janik-Haag]
https://github.com/nixos/first-time-contribution-tagger
automation github nixpkgs
Last synced: 8 days ago
JSON representation
Tags contributions of a first time contributor in your repo with a specified label [maintainer=@Janik-Haag]
- Host: GitHub
- URL: https://github.com/nixos/first-time-contribution-tagger
- Owner: NixOS
- License: agpl-3.0
- Created: 2023-06-13T18:49:21.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-11T02:41:53.000Z (11 months ago)
- Last Synced: 2024-04-15T12:49:40.478Z (10 months ago)
- Topics: automation, github, nixpkgs
- Language: Python
- Homepage:
- Size: 83 KB
- Stars: 6
- Watchers: 8
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# first-time-contribution-tagger
Tags PRs of first time contributors in a GitHub repo with a pre specified label and has builtin caching.## Usage
This repository also contains a Nix flake. It can be used in a NixOS configuration like this:
1. Add flake to inputs:
```nix
first-time-contribution-tagger = {
url = "github:Janik-Haag/first-time-contribution-tagger";
inputs.nixpkgs.follows = "nixpkgs"; #optional
}
```
2. Adding output:
```nix
outputs = inputs@{ self, nixpkgs, first-time-contribution-tagger, ... }:
```
3. Import NixOS module
```nix
imports = [ first-time-contribution-tagger.nixosModule ];
```
4. Configure the module:
```nix
{ ... }: {
services.first-time-contribution-tagger = {
enable = true;
interval = "*:0/10";
environment = {
FIRST_TIME_CONTRIBUTION_LABEL="12. first-time contribution";
FIRST_TIME_CONTRIBUTION_CACHE="/var/lib/first-time-contribution-tagger/cache";
FIRST_TIME_CONTRIBUTION_REPO="nixpkgs";
FIRST_TIME_CONTRIBUTION_ORG="NixOS";
};
environmentFile = "/root/first-time-contribution-tagger.env";
};
}
```5. Adding the cache
If you go to the [releases page](https://github.com/Janik-Haag/first-time-contribution-tagger/releases) you will find two .pickle files, copy both of them to your specified cache directory. If the directory doesn't exist just create it. Then set the permissions, f.e. `chmod -R 666 $FIRST_TIME_CONTRIBUTION_CACHE`6. Rebuild your system config
```sh
sudo nixos-rebuild switch --flake .#
```