Skip to content

Commit

Permalink
Release 1.2.4 (#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
m4rii0 authored Sep 5, 2024
1 parent bde96a4 commit ba173df
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [1.2.4] - 2024-09-05

### Fixed

- Broken issue details after GitHub added new [Issue Types](https://github.com/orgs/community/discussions/112806) and [Sub-issues](https://github.com/orgs/community/discussions/131957)

## [1.2.3] - 2024-09-05

### Fixed
Expand Down
8 changes: 4 additions & 4 deletions src/helper.user.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// ==UserScript==
// @name Github helper
// @namespace https://github.com/m4rii0
// @version 1.2.3
// @version 1.2.4
// @description Github helper to speed up your work
// @author m4rii0
// @match https://github.com/*
Expand Down Expand Up @@ -101,17 +101,17 @@
}

const getBranchName = () => {
let title = document.querySelector('h1 > bdi.js-issue-title').innerText;
let title = document.querySelector('[data-testid="issue-title"], h1 > bdi.js-issue-title').textContent;
title = title
.trim()
.toLowerCase()
.replaceAll(' ', '-')
.replace(/[^\w\-]+/g, '');

let issueId = document.querySelector('h1 > .f1-light').innerText;
let issueId = document.querySelector('[data-testid="issue-title"] + div>a, h1 > .f1-light').textContent;
issueId = issueId.replace('#', '');

let kind = [...document.querySelectorAll('.js-issue-labels a span')].map(e => e.innerText).find(e => e.startsWith('kind/'));
let kind = [...document.querySelectorAll('[data-testid="issue-labels"] > a > span, .js-issue-labels > a > span')].map(e => e.textContent).find(e => e.startsWith('kind/'));
if (!kind) kind = 'CHANGEME';

kind = kind.replace('kind/', '');
Expand Down

0 comments on commit ba173df

Please sign in to comment.