Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Address pinned issues #2

Conversation

AndreiLobanovich
Copy link

@AndreiLobanovich AndreiLobanovich commented Jun 21, 2023

Description:
Now issues and pull request are received through GraphQL API. This is needed because default API has no isPinned field.
Now action skips any issue that is pinned

Related issue:
actions#990

Check list:

  • Mark if documentation changes are required.
  • Mark if tests were added or updated to cover the changes.

@@ -1,5 +1,5 @@
import {Issue} from '../classes/issue';

export function isPullRequest(issue: Readonly<Issue>): boolean {
return !!issue.pull_request;
return !!issue.pullRequest;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer Boolean(issue.pullRequest)

see https://eslint.org/docs/latest/rules/no-implicit-coercion

query ($owner: String!, $repo: String!, $issueEndCursor: String, $pullRequestEndCursor: String) {
repository(owner: $owner, name: $repo) {
issues(first: 100, after: $issueEndCursor, states: OPEN) {
nodes {
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

some day it become necessary to fetch number to use it as issue ID

created_at: IsoDateString;
updated_at: IsoDateString;
createdAt: IsoDateString;
updatedAt: IsoDateString;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As soon as the rest API is dropped it might have sense to make these properties Date to avoid the converting to dates here and there throught the code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants