Skip to content

Commit

Permalink
ci: ignore PR automerge failure
Browse files Browse the repository at this point in the history
  • Loading branch information
pozil committed Nov 14, 2024
1 parent f355f23 commit d5cb54c
Show file tree
Hide file tree
Showing 69 changed files with 1,110 additions and 354 deletions.
1 change: 1 addition & 0 deletions .github/workflows/packaging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ jobs:

# Approve and mark PR for auto merge
- name: 'Approve and mark PR for auto merge'
continue-on-error: true
run: |
gh pr review --approve "$PR_NUMBER"
gh pr merge --auto --squash "$PR_NUMBER"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ by the AccountTriggerHandler
## Methods
### `public static void justWriteALogStatement(String toLog)`

Method exists to demonstrate what it might look like to call a service layer method from a trigger handler.
Method exists to demonstrate what it might look like to
call a service layer method from a trigger handler.

#### Parameters

Expand All @@ -35,11 +36,17 @@ AccountServiceLayer.justWriteALogStatement('Hello World');
```


### `public static void changeShippingStreet(List<Account> accounts, System accessLevel)`
### `public static void changeShippingStreet(List<Account> accounts, System.AccessLevel accessLevel)`

`SUPPRESSWARNINGS`

Changes the account's Shipping Street field to a hardcoded value. You should do this kind of work in a before trigger, but this is a demo. Note: This method contains a false-positive PMD viloation around not checking FLS/CRUD before doing DML. This is because PMD is unaware of what the CanTheUser call right before it is doing - namely checking CRUD.
Changes the account's Shipping Street field to a hardcoded
value. You should do this kind of work in a before trigger, but this is a
demo.

Note: This method contains a false-positive PMD viloation around not
checking FLS/CRUD before doing DML. This is because PMD is unaware of
what the CanTheUser call right before it is doing - namely checking CRUD.

#### Parameters

Expand All @@ -57,7 +64,8 @@ System.debug([SELECT Name, ShippingStreet FROM Account WHERE Id in : accounts]);

### `public static List<Account> incrementCounterInDescription(List<Account> incomingAccounts, Boolean save)`

Increments a counter stored in the Description field. Demonstration method of the kind of work a service layer may do.
Increments a counter stored in the Description field.
Demonstration method of the kind of work a service layer may do.

#### Parameters

Expand All @@ -84,7 +92,9 @@ System.debug([SELECT Name, Description FROM Account WHERE Id in : accounts]);

`TESTVISIBLE`

Updates a list of accounts if the user has access to update the Account Object. Demonstrates simple usage of Security.stripInacessible(), and DML with a try/catch block.
Updates a list of accounts if the user has access to update
the Account Object. Demonstrates simple usage of
Security.stripInacessible(), and DML with a try/catch block.

#### Parameters

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@ In this example we show how to sort all the accounts by their country names in a

No param constructor. Assigns sort order as ascending by default

### `public AccountShippingCountryComparator(AccountShippingCountryComparator order)`
### `public AccountShippingCountryComparator(AccountShippingCountryComparator.SortOrder order)`

Constructor accepting sort order as ascending/descending. Use this constructor to *control* the sort order.
Constructor accepting sort order as ascending/descending. Use
this constructor to *control* the sort order.

#### Parameters

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ AccountTriggerHandler
## Constructors
### `public AccountTriggerHandler()`

Constructor that sets class variables based on Trigger context vars
Constructor that sets class variables based on Trigger
context vars

---
## Fields
Expand Down Expand Up @@ -52,7 +53,8 @@ Constructor that sets class variables based on Trigger context vars
## Methods
### `public override void beforeInsert()`

Before Insert context method. Called automatically by the trigger framework this class extends.
Before Insert context method. Called automatically by the
trigger framework this class extends.

#### Example
```apex
Expand All @@ -65,7 +67,8 @@ insert accounts;

### `public override void afterInsert()`

after insert context method. Called automatically by the trigger framework this class extends
after insert context method. Called automatically by the
trigger framework this class extends

#### Example
```apex
Expand All @@ -78,7 +81,8 @@ insert accounts;

### `public override void beforeUpdate()`

before update context method. Called automatically by the trigger framework this class extends
before update context method. Called automatically by the
trigger framework this class extends

#### Example
```apex
Expand All @@ -95,7 +99,14 @@ update accounts;

`SUPPRESSWARNINGS`

after update context method. Called automatically by the trigger framework this class extends Note: this method contains a PMD false-positive report about CRUD checking before insert. However, trigger code is run in system mode, regardless of users, so it doesn't make sense to check for Account and Task permissions. This code is therefore only safe to execute in the context of a trigger.
after update context method. Called automatically by the
trigger framework this class extends

Note: this method contains a PMD false-positive report about CRUD
checking before insert. However, trigger code is run in system mode,
regardless of users, so it doesn't make sense to check for Account and
Task permissions. This code is therefore only safe to execute in the
context of a trigger.

#### Example
```apex
Expand All @@ -112,7 +123,14 @@ update accounts;

`SUPPRESSWARNINGS`

before delete context method. Called automatically by the trigger framework this class extends Note: this method contains a PMD false-positive report about CRUD checking before insert. However, trigger code is run in system mode, regardless of users, so it doesn't make sense to check for Account and Task permissions. This code is therefore only safe to execute in the context of a trigger.
before delete context method. Called automatically by the
trigger framework this class extends

Note: this method contains a PMD false-positive report about CRUD
checking before insert. However, trigger code is run in system mode,
regardless of users, so it doesn't make sense to check for Account and
Task permissions. This code is therefore only safe to execute in the
context of a trigger.

#### Example
```apex
Expand All @@ -127,7 +145,14 @@ delete accounts;

`SUPPRESSWARNINGS`

after delete context method. Called automatically by the trigger framework this class extends Note: this method contains a PMD false-positive report about CRUD checking before insert. However, trigger code is run in system mode, regardless of users, so it doesn't make sense to check for Account and Task permissions. This code is therefore only safe to execute in the context of a trigger.
after delete context method. Called automatically by the
trigger framework this class extends

Note: this method contains a PMD false-positive report about CRUD
checking before insert. However, trigger code is run in system mode,
regardless of users, so it doesn't make sense to check for Account and
Task permissions. This code is therefore only safe to execute in the
context of a trigger.

#### Example
```apex
Expand All @@ -142,7 +167,14 @@ delete accounts;

`SUPPRESSWARNINGS`

after undelete context method. Called automatically by the trigger framework this class extends Note: this method contains a PMD false-positive report about CRUD checking before insert. However, trigger code is run in system mode, regardless of users, so it doesn't make sense to check for Account and Task permissions. This code is therefore only safe to execute in the context of a trigger.
after undelete context method. Called automatically by the
trigger framework this class extends

Note: this method contains a PMD false-positive report about CRUD
checking before insert. However, trigger code is run in system mode,
regardless of users, so it doesn't make sense to check for Account and
Task permissions. This code is therefore only safe to execute in the
context of a trigger.

#### Example
```apex
Expand All @@ -159,7 +191,9 @@ undelete accounts;
*Inherited*


This is main brokering method that is called by the trigger. It's responsible for determining the proper context, and calling the correct method
This is main brokering method that is called by the trigger.
It's responsible for determining the proper context, and calling the
correct method

#### Example
```apex
Expand All @@ -172,7 +206,9 @@ AccountTriggerHandler.run();
*Inherited*


Allows developers to prevent trigger loops, or allow a limited number of them by setting the maximum number of times this trigger is called.
Allows developers to prevent trigger loops, or allow
a limited number of them by setting the maximum number of times
this trigger is called.

#### Parameters

Expand Down Expand Up @@ -206,7 +242,8 @@ this.clearMaxLoopCount();
*Inherited*


Allows developers to conditionally bypass (disable) other triggers that *also* implement this triggerHandler
Allows developers to conditionally bypass (disable)
other triggers that *also* implement this triggerHandler

#### Parameters

Expand All @@ -225,7 +262,8 @@ TriggerHandler.bypass('AccountTriggerHandler');
*Inherited*


Removes a given trigger handler class name from the list of bypassed trigger handlers.
Removes a given trigger handler class name from
the list of bypassed trigger handlers.

#### Parameters

Expand All @@ -244,7 +282,8 @@ TriggerHandler.clearBypass('AccountTriggerHandler');
*Inherited*


Allows developers to check whether a given trigger handler class is currently bypassed.
Allows developers to check whether a given trigger
handler class is currently bypassed.

#### Parameters

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ in an org.
## Methods
### `public static String getGroupFromClassBody(ApexClass klass)`

Extracts the `@group` annotation from a class' body. Also demonstrates the use of Regex matchers in Apex.
Extracts the `@group` annotation from a class' body.
Also demonstrates the use of Regex matchers in Apex.

#### Parameters

Expand All @@ -39,7 +40,8 @@ System.debug(ApexClassUtilities.getGroupFromClassBody(klass));

### `public static List<String> getRelatedClassesFromClassBody(ApexClass klass)`

Extracts the `@see` annotations from a class' body. Also demonstrates the use of Regex matchers in Apex.
Extracts the `@see` annotations from a class' body.
Also demonstrates the use of Regex matchers in Apex.

#### Parameters

Expand Down
Loading

0 comments on commit d5cb54c

Please sign in to comment.