Skip to content

Instantly share code, notes, and snippets.

View wajda's full-sized avatar

Alex Vayda wajda

View GitHub Profile
@wajda
wajda / add-issue-to-project.yml
Created April 3, 2022 23:00
GH Action to automatically add newly created issues to a project
name: Add issue to project
on:
issues:
types:
- opened
jobs:
track_issue:
runs-on: ubuntu-latest
steps:
- name: Get project data
@wajda
wajda / zenhub-2-projects(beta)-migration.md
Last active April 3, 2022 23:13
How to migrate from ZenHub to GitHub Projects(beta)

The process of migrating from ZenHub to GH Projects (beta) is as follows:

  1. Prepare a GitHub Project(beta)
    Create a GH project(beta) and configure workflow statuses that mimic your ZenHub workflow.

  2. Get GitHub workflow status IDs
    Run the following command to get the IDs of the workflow statuses:

@wajda
wajda / gh-update-issues-status.sh
Created April 2, 2022 22:35
Updates project (beta) items' status according to status labels (st-...-status_id)
#!/bin/bash
: '
Copyright 2022 ABSA Group Limited
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@wajda
wajda / gh-get-workflow-items.sh
Last active April 1, 2022 17:56
List the GitHub Project (beta) workflow statuses' names and IDs
#!/bin/bash
: '
Copyright 2022 ABSA Group Limited
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
@wajda
wajda / gh-add-issues-to-project.sh
Last active April 2, 2022 17:47
Load all issues of a selected GitHub repository into a "Project (beta)"
#!/bin/bash
: '
Copyright 2022 ABSA Group Limited
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
export abstract class Lens<A, B> {
protected constructor(
public get: (A) => B | undefined,
public set: (A, B) => A) {
}
public andThen<C>(inner: Lens<B, C>) {
return new CompositeLens<A, B, C>(this, inner)
}